aws ecs delete-task-set
Deletes a specified task set within a service. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To delete a task set
The following delete-task-set example shows how to delete a task set. You can include the --force parameter to delete a task set even if it has not been scaled to zero.
aws ecs delete-task-set --cluster MyCluster --service MyService --task-set arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789 --forceIdentify--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.--serviceThe short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.--task-setThe task set ID or full Amazon Resource Name (ARN) of the task set to delete.--forceIf true, you can delete a task set even if it hasn't been scaled down to zero.Its output, shortened
{
"taskSet": {
"id": "ecs-svc/1234567890123456789",
"taskSetArn": "arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789",
"status": "DRAINING",
"taskDefinition": "arn:aws:ecs:us-west-2:123456789012:task-definition/sample-fargate:2",
"computedDesiredCount": 0,
"pendingCount": 0,
"runningCount": 0,
"createdAt": 1557130260.276,
"updatedAt": 1557130290.707,
"launchType": "EC2",
"networkConfiguration": {
"awsvpcConfiguration": {
"subnets": [
"subnet-12345678"
],
"securityGroups": [
"sg-12345678"
],
"assignPublicIp": "DISABLED"
}
},
"loadBalancers": [],
"serviceRegistries": [],
"scale": {
"value": 0.0,
"unit": "PERCENT"
},
"stabilityStatus": "STABILIZING",
… 3 more linesFor more information, see Deploy Amazon ECS services using a third-party controller in the Amazon ECS Developer Guide.
Options
--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set found in to delete.--forceIf true, you can delete a task set even if it hasn't been scaled down to zero.--serviceThe short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.--task-setThe task set ID or full Amazon Resource Name (ARN) of the task set to delete.