Skip to main content

primary_task_sets

Creates, updates, deletes or gets a primary_task_set resource or lists primary_task_sets in a region

Overview

Nameprimary_task_sets
TypeResource
DescriptionA pseudo-resource that manages which of your ECS task sets is primary.
Idaws.ecs.primary_task_sets

Fields

NameDatatypeDescription
clusterstringThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
task_set_idstringThe ID or full Amazon Resource Name (ARN) of the task set.
servicestringThe short name or full Amazon Resource Name (ARN) of the service to create the task set in.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTCluster, Service, TaskSetId, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.ecs.primary_task_sets (
Cluster,
TaskSetId,
Service,
region
)
SELECT
'{{ Cluster }}',
'{{ TaskSetId }}',
'{{ Service }}',
'{{ region }}';

Permissions

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

Create

ecs:DescribeTaskSets,
ecs:UpdateServicePrimaryTaskSet

Update

ecs:DescribeTaskSets,
ecs:UpdateServicePrimaryTaskSet