v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1421274230.6 KB

Creates a new recommendation preference or updates an existing recommendation preference, such as enhanced infrastructure metrics.

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

post/#X-Amz-Target=ComputeOptimizerService.PutRecommendationPreferences

Headers

X-Amz-Target'ComputeOptimizerService.PutRecommendationPreferences' required

Request body

resourceType'Ec2Instance' | 'AutoScalingGroup' | 'EbsVolume' | 'LambdaFunction' | 'NotApplicable' | 'EcsService' required
<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> <note> <p>The valid values for this parameter are <code>Ec2Instance</code> and <code>AutoScalingGroup</code>.</p> </note>
enhancedInfrastructureMetrics'Active' | 'Inactive'
<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>
inferredWorkloadTypes'Active' | 'Inactive'
<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>

Response

Success

PutRecommendationPreferencesResponse required