Skip to main content

auto_scaling_group_recommendations

Creates, updates, deletes, gets or lists an auto_scaling_group_recommendations resource.

Overview

Nameauto_scaling_group_recommendations
TypeResource
Idaws.compute_optimizer.auto_scaling_group_recommendations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
auto_scaling_group_recommendationsarrayAn array of objects that describe Auto Scaling group recommendations.
errorsarrayAn array of objects that describe errors of the request. For example, an error is returned if you request recommendations for an unsupported Auto Scaling group.
next_tokenstringThe token to use to advance to the next page of Auto Scaling group recommendations. This value is null when there are no more pages of Auto Scaling group recommendations to return.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_auto_scaling_group_recommendationsselectregionReturns Auto Scaling group recommendations. Compute Optimizer generates recommendations for Amazon EC2 Auto Scaling groups that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.
export_auto_scaling_group_recommendationsexecregion, s3DestinationConfigExports optimization recommendations for Auto Scaling groups. Recommendations are exported in a comma-separated values (.csv) file, and its metadata in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting Recommendations in the Compute Optimizer User Guide. You can have only one Auto Scaling group export job in progress per Amazon Web Services Region.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns Auto Scaling group recommendations. Compute Optimizer generates recommendations for Amazon EC2 Auto Scaling groups that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.

SELECT
auto_scaling_group_recommendations,
errors,
next_token
FROM aws.compute_optimizer.auto_scaling_group_recommendations
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

Exports optimization recommendations for Auto Scaling groups. Recommendations are exported in a comma-separated values (.csv) file, and its metadata in a JavaScript Object Notation (JSON) (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting Recommendations in the Compute Optimizer User Guide. You can have only one Auto Scaling group export job in progress per Amazon Web Services Region.

EXEC aws.compute_optimizer.auto_scaling_group_recommendations.export_auto_scaling_group_recommendations
@region='{{ region }}' --required
@@json=
'{
"accountIds": "{{ accountIds }}",
"filters": "{{ filters }}",
"fieldsToExport": "{{ fieldsToExport }}",
"s3DestinationConfig": "{{ s3DestinationConfig }}",
"fileFormat": "{{ fileFormat }}",
"includeMemberAccounts": {{ includeMemberAccounts }},
"recommendationPreferences": "{{ recommendationPreferences }}"
}'
;