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
capacity_providersarrayList of capacity providers to associate with the cluster
clusterstringThe name of the cluster
default_capacity_provider_strategyarrayList of capacity providers to associate with the cluster
regionstringAWS region.

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,
capacity_providers,
cluster,
default_capacity_provider_strategy
FROM aws.ecs.cluster_capacity_provider_associations
WHERE region = 'us-east-1';

Gets all properties from an individual cluster_capacity_provider_association.

SELECT
region,
capacity_providers,
cluster,
default_capacity_provider_strategy
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 (
CapacityProviders,
Cluster,
DefaultCapacityProviderStrategy,
region
)
SELECT
'{{ CapacityProviders }}',
'{{ Cluster }}',
'{{ DefaultCapacityProviderStrategy }}',
'{{ 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:

Create

ecs:DescribeClusters,
ecs:PutClusterCapacityProviders

Read

ecs:DescribeClusters

Update

ecs:DescribeClusters,
ecs:PutClusterCapacityProviders

Delete

ecs:PutClusterCapacityProviders,
ecs:DescribeClusters

List

ecs:DescribeClusters,
ecs:ListClusters