aws_sdk_computeoptimizer/client/get_effective_recommendation_preferences.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`GetEffectiveRecommendationPreferences`](crate::operation::get_effective_recommendation_preferences::builders::GetEffectiveRecommendationPreferencesFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`resource_arn(impl Into<String>)`](crate::operation::get_effective_recommendation_preferences::builders::GetEffectiveRecommendationPreferencesFluentBuilder::resource_arn) / [`set_resource_arn(Option<String>)`](crate::operation::get_effective_recommendation_preferences::builders::GetEffectiveRecommendationPreferencesFluentBuilder::set_resource_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the resource for which to confirm effective recommendation preferences. Only EC2 instance and Auto Scaling group ARNs are currently supported.</p><br>
7 /// - On success, responds with [`GetEffectiveRecommendationPreferencesOutput`](crate::operation::get_effective_recommendation_preferences::GetEffectiveRecommendationPreferencesOutput) with field(s):
8 /// - [`enhanced_infrastructure_metrics(Option<EnhancedInfrastructureMetrics>)`](crate::operation::get_effective_recommendation_preferences::GetEffectiveRecommendationPreferencesOutput::enhanced_infrastructure_metrics): <p>The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences that you might have set at the resource, account, and organization level.</p> <p>A status of <code>Active</code> confirms that the preference is applied in the latest recommendation refresh, and a status of <code>Inactive</code> confirms that it's not yet applied to recommendations.</p> <p>To validate whether the preference is applied to your last generated set of recommendations, review the <code>effectiveRecommendationPreferences</code> value in the response of the <code>GetAutoScalingGroupRecommendations</code> and <code>GetEC2InstanceRecommendations</code> actions.</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>
9 /// - [`external_metrics_preference(Option<ExternalMetricsPreference>)`](crate::operation::get_effective_recommendation_preferences::GetEffectiveRecommendationPreferencesOutput::external_metrics_preference): <p>The provider of the external metrics recommendation preference. Considers all applicable preferences that you might have set at the account and organization level.</p> <p>If the preference is applied in the latest recommendation refresh, an object with a valid <code>source</code> value appears in the response. If the preference isn't applied to the recommendations already, then this object doesn't appear in the response.</p> <p>To validate whether the preference is applied to your last generated set of recommendations, review the <code>effectiveRecommendationPreferences</code> value in the response of the <code>GetEC2InstanceRecommendations</code> actions.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html">Enhanced infrastructure metrics</a> in the <i>Compute Optimizer User Guide</i>.</p>
10 /// - [`look_back_period(Option<LookBackPeriodPreference>)`](crate::operation::get_effective_recommendation_preferences::GetEffectiveRecommendationPreferencesOutput::look_back_period): <p>The number of days the utilization metrics of the Amazon Web Services resource are analyzed.</p> <p>To validate that the preference is applied to your last generated set of recommendations, review the <code>effectiveRecommendationPreferences</code> value in the response of the GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions.</p>
11 /// - [`utilization_preferences(Option<Vec::<UtilizationPreference>>)`](crate::operation::get_effective_recommendation_preferences::GetEffectiveRecommendationPreferencesOutput::utilization_preferences): <p>The resource’s CPU and memory utilization preferences, such as threshold and headroom, that were used to generate rightsizing recommendations. It considers all applicable preferences that you set at the resource, account, and organization level.</p> <p>To validate that the preference is applied to your last generated set of recommendations, review the <code>effectiveRecommendationPreferences</code> value in the response of the GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions.</p>
12 /// - [`preferred_resources(Option<Vec::<EffectivePreferredResource>>)`](crate::operation::get_effective_recommendation_preferences::GetEffectiveRecommendationPreferencesOutput::preferred_resources): <p>The resource type values that are considered as candidates when generating rightsizing recommendations. This object resolves any wildcard expressions and returns the effective list of candidate resource type values. It also considers all applicable preferences that you set at the resource, account, and organization level.</p> <p>To validate that the preference is applied to your last generated set of recommendations, review the <code>effectiveRecommendationPreferences</code> value in the response of the GetAutoScalingGroupRecommendations or GetEC2InstanceRecommendations actions.</p>
13 /// - On failure, responds with [`SdkError<GetEffectiveRecommendationPreferencesError>`](crate::operation::get_effective_recommendation_preferences::GetEffectiveRecommendationPreferencesError)
14 pub fn get_effective_recommendation_preferences(
15 &self,
16 ) -> crate::operation::get_effective_recommendation_preferences::builders::GetEffectiveRecommendationPreferencesFluentBuilder {
17 crate::operation::get_effective_recommendation_preferences::builders::GetEffectiveRecommendationPreferencesFluentBuilder::new(
18 self.handle.clone(),
19 )
20 }
21}