Skip to content

PutRecommendationPreferencesRequest

Source code in docs_src/capo_compute_optimizer/types/put_recommendation_preferences_request.py
class PutRecommendationPreferencesRequest(TypedDict, closed=True):
    resource_type: "capo_compute_optimizer.types.resource_type.ResourceType"
    """<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>"""
    scope: NotRequired["capo_compute_optimizer.types.scope.Scope"]
    """<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>"""
    enhanced_infrastructure_metrics: NotRequired[
        "capo_compute_optimizer.types.enhanced_infrastructure_metrics.EnhancedInfrastructureMetrics"
    ]
    """<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>"""
    inferred_workload_types: NotRequired[
        "capo_compute_optimizer.types.inferred_workload_types_preference.InferredWorkloadTypesPreference"
    ]
    """<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>"""
    external_metrics_preference: NotRequired[
        "capo_compute_optimizer.types.external_metrics_preference.ExternalMetricsPreference"
    ]
    """<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 <a>DeleteRecommendationPreferences</a> 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>"""
    look_back_period: NotRequired[
        "capo_compute_optimizer.types.look_back_period_preference.LookBackPeriodPreference"
    ]
    """<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> <p>You can only set this preference for the Amazon EC2 instance, Auto Scaling group, Amazon EBS volume, Amazon ECS service on Fargate, Amazon RDS DB instance, and Aurora DB cluster storage resource types. </p> <note> <ul> <li> <p>Lookback period preferences for Amazon EC2 instances, Amazon EBS volumes, Amazon ECS services, Amazon RDS DB instances, and Aurora DB cluster storage resource types can be set at the organization, account, and resource levels.</p> </li> <li> <p>Auto Scaling group lookback preferences can only be set at the resource level.</p> </li> <li> <p>Amazon EBS volume lookback preferences can be set at the organization, account, and resource levels.</p> </li> <li> <p>Amazon ECS service on Fargate lookback preferences can be set at the organization, account, and resource levels.</p> </li> <li> <p>Amazon RDS DB instance lookback preferences can be set at the organization, account, and resource levels.</p> </li> <li> <p>Aurora DB cluster storage lookback preferences can be set at the organization, account, and resource levels.</p> </li> <li> <p>Changing the lookback period for Amazon EBS volumes to 14 days does not affect the 32-day lookback period used to determine whether an Amazon EBS volume is unattached.</p> </li> </ul> </note>"""
    utilization_preferences: NotRequired[
        "capo_compute_optimizer.types.utilization_preferences.UtilizationPreferences"
    ]
    """<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>"""
    preferred_resources: NotRequired[
        "capo_compute_optimizer.types.preferred_resources.PreferredResources"
    ]
    """<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, Auto Scaling group, Amazon EBS volume, Amazon ECS service, Amazon RDS DB instance, and Aurora DB cluster storage resource types.</p> </note>"""
    savings_estimation_mode: NotRequired[
        "capo_compute_optimizer.types.savings_estimation_mode.SavingsEstimationMode"
    ]
    """<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>"""

enhanced_infrastructure_metrics instance-attribute

enhanced_infrastructure_metrics: NotRequired[EnhancedInfrastructureMetrics]

The status of the enhanced infrastructure metrics recommendation preference to create or update.

Specify the Active status to activate the preference, or specify Inactive to deactivate the preference.

For more information, see Enhanced infrastructure metrics in the Compute Optimizer User Guide.

external_metrics_preference instance-attribute

external_metrics_preference: NotRequired[ExternalMetricsPreference]

The provider of the external metrics recommendation preference to create or update.

Specify a valid provider in the source field to activate the preference. To delete this preference, see the DeleteRecommendationPreferences action.

This preference can only be set for the Ec2Instance resource type.

For more information, see External metrics ingestion in the Compute Optimizer User Guide.

inferred_workload_types instance-attribute

inferred_workload_types: NotRequired[InferredWorkloadTypesPreference]

The status of the inferred workload types recommendation preference to create or update.

The inferred workload type feature is active by default. To deactivate it, create a recommendation preference.

Specify the Inactive status to deactivate the feature, or specify Active to activate it.

For more information, see Inferred workload types in the Compute Optimizer User Guide.

look_back_period instance-attribute

look_back_period: NotRequired[LookBackPeriodPreference]

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 DAYS_14.

You can only set this preference for the Amazon EC2 instance, Auto Scaling group, Amazon EBS volume, Amazon ECS service on Fargate, Amazon RDS DB instance, and Aurora DB cluster storage resource types.

  • Lookback period preferences for Amazon EC2 instances, Amazon EBS volumes, Amazon ECS services, Amazon RDS DB instances, and Aurora DB cluster storage resource types can be set at the organization, account, and resource levels.

  • Auto Scaling group lookback preferences can only be set at the resource level.

  • Amazon EBS volume lookback preferences can be set at the organization, account, and resource levels.

  • Amazon ECS service on Fargate lookback preferences can be set at the organization, account, and resource levels.

  • Amazon RDS DB instance lookback preferences can be set at the organization, account, and resource levels.

  • Aurora DB cluster storage lookback preferences can be set at the organization, account, and resource levels.

  • Changing the lookback period for Amazon EBS volumes to 14 days does not affect the 32-day lookback period used to determine whether an Amazon EBS volume is unattached.

preferred_resources instance-attribute

preferred_resources: NotRequired[PreferredResources]

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 includeList or excludeList. If the preference is an empty set of resource type values, an error occurs.

You can only set this preference for the Amazon EC2 instance, Auto Scaling group, Amazon EBS volume, Amazon ECS service, Amazon RDS DB instance, and Aurora DB cluster storage resource types.

resource_type instance-attribute

resource_type: ResourceType

The target resource type of the recommendation preference to create.

The Ec2Instance option encompasses standalone instances and instances that are part of Auto Scaling groups. The AutoScalingGroup option encompasses only instances that are part of an Auto Scaling group.

savings_estimation_mode instance-attribute

savings_estimation_mode: NotRequired[SavingsEstimationMode]

The status of the savings estimation mode preference to create or update.

Specify the AfterDiscounts status to activate the preference, or specify BeforeDiscounts to deactivate the preference.

Only the account manager or delegated administrator of your organization can activate this preference.

For more information, see Savings estimation mode in the Compute Optimizer User Guide.

scope instance-attribute

scope: NotRequired[Scope]

An object that describes the scope of the recommendation preference to create.

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 Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.

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 ResourceArn 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.

utilization_preferences instance-attribute

utilization_preferences: NotRequired[UtilizationPreferences]

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.

CPU utilization:

  • P99_5 for threshold

  • PERCENT_20 for headroom

Memory utilization:

  • PERCENT_20 for headroom

  • You can only set CPU and memory utilization preferences for the Amazon EC2 instance resource type.

  • The threshold setting isn’t available for memory utilization.