v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1456373564.1 KB

Retrieves the protection status of tasks in an Amazon ECS service.

post/#X-Amz-Target=AmazonEC2ContainerServiceV20141113.GetTaskProtection

Headers

X-Amz-Target'AmazonEC2ContainerServiceV20141113.GetTaskProtection' required

Request body

clusterstring required

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.

tasksString[]

A list of up to 100 task IDs or full ARN entries.

Response

Success

Example response

{
  "failures": [],
  "protectedTasks": [
    {
      "expirationDate": "2022-11-02T06:56:32.553Z",
      "protectionEnabled": true,
      "taskArn": "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772"
    }
  ]
}