Skip to main content

cluster_capacity_provider_associations

Creates, updates, deletes or gets a cluster_capacity_provider_association resource or lists cluster_capacity_provider_associations in a region

Overview

Namecluster_capacity_provider_associations
TypeResource
DescriptionAssociate a set of ECS Capacity Providers with a specified ECS Cluster
Idaws.ecs.cluster_capacity_provider_associations

Fields

NameDatatypeDescription
default_capacity_provider_strategyarrayList of capacity providers to associate with the cluster
capacity_providersarrayList of capacity providers to associate with the cluster
clusterstringThe name of the cluster
regionstringAWS region.

For more information, see AWS::ECS::ClusterCapacityProviderAssociations.

Methods

NameAccessible byRequired Params
create_resourceINSERTCapacityProviders, Cluster, DefaultCapacityProviderStrategy, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all cluster_capacity_provider_associations in a region.

SELECT
region,
default_capacity_provider_strategy,
capacity_providers,
cluster
FROM aws.ecs.cluster_capacity_provider_associations
WHERE region = 'us-east-1';

Gets all properties from an individual cluster_capacity_provider_association.

SELECT
region,
default_capacity_provider_strategy,
capacity_providers,
cluster
FROM aws.ecs.cluster_capacity_provider_associations
WHERE region = 'us-east-1' AND data__Identifier = '<Cluster>';

INSERT example

Use the following StackQL query and manifest file to create a new cluster_capacity_provider_association resource, using stack-deploy.

/*+ create */
INSERT INTO aws.ecs.cluster_capacity_provider_associations (
DefaultCapacityProviderStrategy,
CapacityProviders,
Cluster,
region
)
SELECT
'{{ DefaultCapacityProviderStrategy }}',
'{{ CapacityProviders }}',
'{{ Cluster }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.ecs.cluster_capacity_provider_associations
WHERE data__Identifier = '<Cluster>'
AND region = 'us-east-1';

Permissions

To operate on the cluster_capacity_provider_associations resource, the following permissions are required:

Read

ecs:DescribeClusters

Create

ecs:DescribeClusters,
ecs:PutClusterCapacityProviders,
ecs:DescribeCapacityProviders

Update

ecs:DescribeClusters,
ecs:PutClusterCapacityProviders

List

ecs:DescribeClusters,
ecs:ListClusters

Delete

ecs:PutClusterCapacityProviders,
ecs:DescribeClusters