CmdID

CmdID / aws / aws ecs

aws ecs update-service-primary-task-set

Modifies which task set in a service is the primary task set. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To update the primary task set for a service

The following update-service-primary-task-set example updates the primary task set for the specified service.

aws ecs update-service-primary-task-set --cluster MyCluster --service MyService --primary-task-set arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789Identify
--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.
--serviceThe short name or full Amazon Resource Name (ARN) of the service that the task set exists in.
--primary-task-setThe short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.
Its output, shortened
{
    "taskSet": {
        "id": "ecs-svc/1234567890123456789",
        "taskSetArn": "arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789",
        "status": "PRIMARY",
        "taskDefinition": "arn:aws:ecs:us-west-2:123456789012:task-definition/sample-fargate:2",
        "computedDesiredCount": 1,
        "pendingCount": 0,
        "runningCount": 0,
        "createdAt": 1557128360.711,
        "updatedAt": 1557129412.653,
        "launchType": "EC2",
        "networkConfiguration": {
            "awsvpcConfiguration": {
                "subnets": [
                    "subnet-12344321"
                ],
                "securityGroups": [
                    "sg-12344312"
                ],
                "assignPublicIp": "DISABLED"
            }
        },
        "loadBalancers": [],
        "serviceRegistries": [],
        "scale": {
            "value": 50.0,
            "unit": "PERCENT"
        },
        "stabilityStatus": "STABILIZING",
… 3 more lines

For more information, see Deploy Amazon ECS services using a third-party controller in the Amazon ECS Developer Guide.

Options

3 in the AWS CLI reference
--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.
--primary-task-setThe short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.
--serviceThe short name or full Amazon Resource Name (ARN) of the service that the task set exists in.