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
Idawscc.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

NameResourceAccessible byRequired Params
create_resourcecluster_capacity_provider_associationsINSERTCapacityProviders, Cluster, DefaultCapacityProviderStrategy, region
delete_resourcecluster_capacity_provider_associationsDELETEIdentifier, region
update_resourcecluster_capacity_provider_associationsUPDATEIdentifier, PatchDocument, region
list_resourcescluster_capacity_provider_associations_list_onlySELECTregion
get_resourcecluster_capacity_provider_associationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual cluster_capacity_provider_association.

SELECT
region,
default_capacity_provider_strategy,
capacity_providers,
cluster
FROM awscc.ecs.cluster_capacity_provider_associations
WHERE
region = 'us-east-1' AND
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 awscc.ecs.cluster_capacity_provider_associations (
DefaultCapacityProviderStrategy,
CapacityProviders,
Cluster,
region
)
SELECT
'{{ default_capacity_provider_strategy }}',
'{{ capacity_providers }}',
'{{ cluster }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.ecs.cluster_capacity_provider_associations
SET PatchDocument = string('{{ {
"DefaultCapacityProviderStrategy": default_capacity_provider_strategy,
"CapacityProviders": capacity_providers
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ cluster }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ecs.cluster_capacity_provider_associations
WHERE
Identifier = '{{ cluster }}' AND
region = 'us-east-1';

Permissions

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

ecs:DescribeClusters