v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1421274230.6 KB

Returns existing recommendation preferences, such as enhanced infrastructure metrics.

Use the scope parameter to specify which preferences to return. You can specify to return preferences for an organization, a specific account ID, or a specific EC2 instance or Auto Scaling group Amazon Resource Name (ARN).

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

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

Query parameters

maxResultsstring

Pagination limit

nextTokenstring

Pagination token

Headers

X-Amz-Target'ComputeOptimizerService.GetRecommendationPreferences' required

Request body

resourceType'Ec2Instance' | 'AutoScalingGroup' | 'EbsVolume' | 'LambdaFunction' | 'NotApplicable' | 'EcsService' required
<p>The target resource type of the recommendation preference for which to return preferences.</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>
nextTokenstring

The token to advance to the next page of recommendation preferences.

maxResultsinteger
<p>The maximum number of recommendation preferences to return with a single request.</p> <p>To retrieve the remaining results, make another request with the returned <code>nextToken</code> value.</p>

Response

Success

nextTokenstring
<p>The token to use to advance to the next page of recommendation preferences.</p> <p>This value is null when there are no more pages of recommendation preferences to return.</p>