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
| Name | cluster_capacity_provider_associations |
| Type | Resource |
| Description | Associate a set of ECS Capacity Providers with a specified ECS Cluster |
| Id | awscc.ecs.cluster_capacity_provider_associations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
default_capacity_provider_strategy | array | List of capacity providers to associate with the cluster |
capacity_providers | array | List of capacity providers to associate with the cluster |
cluster | string | The name of the cluster |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
cluster | string | The name of the cluster |
region | string | AWS region. |
For more information, see AWS::ECS::ClusterCapacityProviderAssociations.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | cluster_capacity_provider_associations | INSERT | CapacityProviders, Cluster, DefaultCapacityProviderStrategy, region |
delete_resource | cluster_capacity_provider_associations | DELETE | Identifier, region |
update_resource | cluster_capacity_provider_associations | UPDATE | Identifier, PatchDocument, region |
list_resources | cluster_capacity_provider_associations_list_only | SELECT | region |
get_resource | cluster_capacity_provider_associations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all cluster_capacity_provider_associations in a region.
SELECT
region,
cluster
FROM awscc.ecs.cluster_capacity_provider_associations_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new cluster_capacity_provider_association resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ecs.cluster_capacity_provider_associations (
DefaultCapacityProviderStrategy,
CapacityProviders,
Cluster,
region
)
SELECT
'{{ default_capacity_provider_strategy }}',
'{{ capacity_providers }}',
'{{ cluster }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ecs.cluster_capacity_provider_associations (
DefaultCapacityProviderStrategy,
CapacityProviders,
Cluster,
region
)
SELECT
'{{ default_capacity_provider_strategy }}',
'{{ capacity_providers }}',
'{{ cluster }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cluster_capacity_provider_association
props:
- name: default_capacity_provider_strategy
value:
- capacity_provider: '{{ capacity_provider }}'
base: '{{ base }}'
weight: '{{ weight }}'
- name: capacity_providers
value:
- null
- name: cluster
value: '{{ cluster }}'
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:
- Read
- Create
- Update
- List
- Delete
ecs:DescribeClusters
ecs:DescribeClusters,
ecs:PutClusterCapacityProviders,
ecs:DescribeCapacityProviders
ecs:DescribeClusters,
ecs:PutClusterCapacityProviders
ecs:DescribeClusters,
ecs:ListClusters
ecs:PutClusterCapacityProviders,
ecs:DescribeClusters