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 |
---|---|---|
capacity_providers | array | List of capacity providers to associate with the cluster |
cluster | string | The name of the cluster |
default_capacity_provider_strategy | array | List of capacity providers to associate with the cluster |
region | string | AWS region. |
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,
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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ecs.cluster_capacity_provider_associations (
CapacityProviders,
Cluster,
DefaultCapacityProviderStrategy,
region
)
SELECT
'{{ CapacityProviders }}',
'{{ Cluster }}',
'{{ DefaultCapacityProviderStrategy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ecs.cluster_capacity_provider_associations (
CapacityProviders,
Cluster,
DefaultCapacityProviderStrategy,
region
)
SELECT
'{{ CapacityProviders }}',
'{{ Cluster }}',
'{{ DefaultCapacityProviderStrategy }}',
'{{ 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: CapacityProviders
value:
- '{{ CapacityProviders[0] }}'
- name: Cluster
value: '{{ Cluster }}'
- name: DefaultCapacityProviderStrategy
value:
- Base: '{{ Base }}'
Weight: '{{ Weight }}'
CapacityProvider: null
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