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 | aws.ecs.cluster_capacity_provider_associations |
Fields
| 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. |
For more information, see AWS::ECS::ClusterCapacityProviderAssociations.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | CapacityProviders, Cluster, DefaultCapacityProviderStrategy, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ecs.cluster_capacity_provider_associations (
DefaultCapacityProviderStrategy,
CapacityProviders,
Cluster,
region
)
SELECT
'{{ DefaultCapacityProviderStrategy }}',
'{{ CapacityProviders }}',
'{{ Cluster }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ecs.cluster_capacity_provider_associations (
DefaultCapacityProviderStrategy,
CapacityProviders,
Cluster,
region
)
SELECT
'{{ DefaultCapacityProviderStrategy }}',
'{{ CapacityProviders }}',
'{{ 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: DefaultCapacityProviderStrategy
value:
- CapacityProvider: '{{ CapacityProvider }}'
Base: '{{ Base }}'
Weight: '{{ Weight }}'
- name: CapacityProviders
value:
- null
- name: Cluster
value: '{{ Cluster }}'
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