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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.ecs.cluster_capacity_provider_associations
WHERE
Identifier = '{{ cluster }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

ecs:DescribeClusters