// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`PutRecommendationPreferences`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_type(ResourceType)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::resource_type) / [`set_resource_type(Option<ResourceType>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_resource_type):<br>required: **true**<br><p>The target resource type of the recommendation preference to create.</p> <p>The <code>Ec2Instance</code> option encompasses standalone instances and instances that are part of Auto Scaling groups. The <code>AutoScalingGroup</code> option encompasses only instances that are part of an Auto Scaling group.</p><br>
/// - [`scope(Scope)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::scope) / [`set_scope(Option<Scope>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_scope):<br>required: **false**<br><p>An object that describes the scope of the recommendation preference to create.</p> <p>You can create recommendation preferences at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Activating enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p><note> <p>You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope name of <code>ResourceArn</code> and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This will configure the preference for all instances that are part of the specified Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling group. You can create recommendation preferences at the resource level only for standalone instances.</p> </note><br>
/// - [`enhanced_infrastructure_metrics(EnhancedInfrastructureMetrics)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::enhanced_infrastructure_metrics) / [`set_enhanced_infrastructure_metrics(Option<EnhancedInfrastructureMetrics>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_enhanced_infrastructure_metrics):<br>required: **false**<br><p>The status of the enhanced infrastructure metrics recommendation preference to create or update.</p> <p>Specify the <code>Active</code> status to activate the preference, or specify <code>Inactive</code> to deactivate the preference.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/enhanced-infrastructure-metrics.html">Enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p><br>
/// - [`inferred_workload_types(InferredWorkloadTypesPreference)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::inferred_workload_types) / [`set_inferred_workload_types(Option<InferredWorkloadTypesPreference>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_inferred_workload_types):<br>required: **false**<br><p>The status of the inferred workload types recommendation preference to create or update.</p><note> <p>The inferred workload type feature is active by default. To deactivate it, create a recommendation preference.</p> </note> <p>Specify the <code>Inactive</code> status to deactivate the feature, or specify <code>Active</code> to activate it.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/inferred-workload-types.html">Inferred workload types</a> in the <i>Compute Optimizer User Guide</i>.</p><br>
/// - [`external_metrics_preference(ExternalMetricsPreference)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::external_metrics_preference) / [`set_external_metrics_preference(Option<ExternalMetricsPreference>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_external_metrics_preference):<br>required: **false**<br><p>The provider of the external metrics recommendation preference to create or update.</p> <p>Specify a valid provider in the <code>source</code> field to activate the preference. To delete this preference, see the <code>DeleteRecommendationPreferences</code> action.</p> <p>This preference can only be set for the <code>Ec2Instance</code> resource type.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html">External metrics ingestion</a> in the <i>Compute Optimizer User Guide</i>.</p><br>
/// - [`look_back_period(LookBackPeriodPreference)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::look_back_period) / [`set_look_back_period(Option<LookBackPeriodPreference>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_look_back_period):<br>required: **false**<br><p>The preference to control the number of days the utilization metrics of the Amazon Web Services resource are analyzed. When this preference isn't specified, we use the default value <code>DAYS_14</code>.</p><note> <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p> </note><br>
/// - [`utilization_preferences(UtilizationPreference)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::utilization_preferences) / [`set_utilization_preferences(Option<Vec::<UtilizationPreference>>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_utilization_preferences):<br>required: **false**<br><p>The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. When this preference isn't specified, we use the following default values.</p> <p>CPU utilization:</p> <ul> <li> <p><code>P99_5</code> for threshold</p></li> <li> <p><code>PERCENT_20</code> for headroom</p></li> </ul> <p>Memory utilization:</p> <ul> <li> <p><code>PERCENT_20</code> for headroom</p></li> </ul><note> <ul> <li> <p>You can only set CPU and memory utilization preferences for the Amazon EC2 instance resource type.</p></li> <li> <p>The threshold setting isn’t available for memory utilization.</p></li> </ul> </note><br>
/// - [`preferred_resources(PreferredResource)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::preferred_resources) / [`set_preferred_resources(Option<Vec::<PreferredResource>>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_preferred_resources):<br>required: **false**<br><p>The preference to control which resource type values are considered when generating rightsizing recommendations. You can specify this preference as a combination of include and exclude lists. You must specify either an <code>includeList</code> or <code>excludeList</code>. If the preference is an empty set of resource type values, an error occurs.</p><note> <p>You can only set this preference for the Amazon EC2 instance and Auto Scaling group resource types.</p> </note><br>
/// - [`savings_estimation_mode(SavingsEstimationMode)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::savings_estimation_mode) / [`set_savings_estimation_mode(Option<SavingsEstimationMode>)`](crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::set_savings_estimation_mode):<br>required: **false**<br><p>The status of the savings estimation mode preference to create or update.</p> <p>Specify the <code>AfterDiscounts</code> status to activate the preference, or specify <code>BeforeDiscounts</code> to deactivate the preference.</p> <p>Only the account manager or delegated administrator of your organization can activate this preference.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/savings-estimation-mode.html"> Savings estimation mode</a> in the <i>Compute Optimizer User Guide</i>.</p><br>
/// - On success, responds with [`PutRecommendationPreferencesOutput`](crate::operation::put_recommendation_preferences::PutRecommendationPreferencesOutput)
/// - On failure, responds with [`SdkError<PutRecommendationPreferencesError>`](crate::operation::put_recommendation_preferences::PutRecommendationPreferencesError)
pub fn put_recommendation_preferences(
&self,
) -> crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder {
crate::operation::put_recommendation_preferences::builders::PutRecommendationPreferencesFluentBuilder::new(self.handle.clone())
}
}