primary_task_sets
Creates, updates, deletes or gets a primary_task_set
resource or lists primary_task_sets
in a region
Overview
Name | primary_task_sets |
Type | Resource |
Description | A pseudo-resource that manages which of your ECS task sets is primary. |
Id | aws.ecs.primary_task_sets |
Fields
Name | Datatype | Description |
---|---|---|
cluster | string | The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in. |
task_set_id | string | The ID or full Amazon Resource Name (ARN) of the task set. |
service | string | The short name or full Amazon Resource Name (ARN) of the service to create the task set in. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Cluster, Service, TaskSetId, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual primary_task_set
.
SELECT
region,
cluster,
task_set_id,
service
FROM aws.ecs.primary_task_sets
WHERE region = 'us-east-1' AND data__Identifier = '<Cluster>|<Service>';
INSERT
example
Use the following StackQL query and manifest file to create a new primary_task_set
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ecs.primary_task_sets (
Cluster,
TaskSetId,
Service,
region
)
SELECT
'{{ Cluster }}',
'{{ TaskSetId }}',
'{{ Service }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ecs.primary_task_sets (
Cluster,
TaskSetId,
Service,
region
)
SELECT
'{{ Cluster }}',
'{{ TaskSetId }}',
'{{ Service }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: primary_task_set
props:
- name: Cluster
value: '{{ Cluster }}'
- name: TaskSetId
value: '{{ TaskSetId }}'
- name: Service
value: '{{ Service }}'
Permissions
To operate on the primary_task_sets
resource, the following permissions are required:
Create
ecs:DescribeTaskSets,
ecs:UpdateServicePrimaryTaskSet
Update
ecs:DescribeTaskSets,
ecs:UpdateServicePrimaryTaskSet