Skip to main content

ecs_service_recommendations

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

Overview

Nameecs_service_recommendations
TypeResource
Idaws.compute_optimizer.ecs_service_recommendations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ecs_service_recommendationsarrayAn array of objects that describe the Amazon ECS service recommendations.
errorsarrayAn array of objects that describe errors of the request.
next_tokenstringThe token to advance to the next page of Amazon ECS service recommendations.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_ecs_service_recommendationsselectregionReturns Amazon ECS service recommendations. Compute Optimizer generates recommendations for Amazon ECS services on Fargate that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.
export_ecs_service_recommendationsexecregion, s3DestinationConfigExports optimization recommendations for Amazon ECS services on Fargate. Recommendations are exported in a CSV file, and its metadata in a 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 only have one Amazon ECS service 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 Amazon ECS service recommendations. Compute Optimizer generates recommendations for Amazon ECS services on Fargate that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.

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

Lifecycle Methods

Exports optimization recommendations for Amazon ECS services on Fargate. Recommendations are exported in a CSV file, and its metadata in a 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 only have one Amazon ECS service export job in progress per Amazon Web Services Region.

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