v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1456373564.1 KB

Describes one or more container instances. Returns metadata about each container instance requested.

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

Headers

X-Amz-Target'AmazonEC2ContainerServiceV20141113.DescribeContainerInstances' required

Request body

clusterstring

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.

containerInstancesString[] required

A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.

includeContainerInstanceField[]

Specifies whether you want to see the resource tags for the container instance. If <code>TAGS</code> is specified, the tags are included in the response. If <code>CONTAINER_INSTANCE_HEALTH</code> is specified, the container instance health is included in the response. If this field is omitted, tags and container instance health status aren't included in the response.

Response

Success

Example response

{
  "containerInstances": [
    {
      "agentConnected": true,
      "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/f2756532-8f13-4d53-87c9-aed50dc94cd7",
      "ec2InstanceId": "i-807f3249",
      "pendingTasksCount": 0,
      "registeredResources": [
        {
          "name": "CPU",
          "type": "INTEGER",
          "doubleValue": 0,
          "integerValue": 2048,
          "longValue": 0
        },
        {
          "name": "MEMORY",
          "type": "INTEGER",
          "doubleValue": 0,
          "integerValue": 3768,
          "longValue": 0
        },
        {
          "name": "PORTS",
          "type": "STRINGSET",
          "doubleValue": 0,
          "integerValue": 0,
          "longValue": 0,
          "stringSetValue": [
            "2376",
            "22",
            "51678",
            "2375"
          ]
        }
      ],
      "remainingResources": [
        {
          "name": "CPU",
          "type": "INTEGER",
          "doubleValue": 0,
          "integerValue": 1948,
          "longValue": 0
        },
        {
          "name": "MEMORY",
          "type": "INTEGER",
          "doubleValue": 0,
          "integerValue": 3668,
          "longValue": 0
        },
        {
          "name": "PORTS",
          "type": "STRINGSET",
          "doubleValue": 0,
          "integerValue": 0,
          "longValue": 0,
          "stringSetValue": [
            "2376",
            "22",
            "80",
            "51678",
            "2375"
          ]
        }
      ],
      "runningTasksCount": 1,
      "status": "ACTIVE"
    }
  ],
  "failures": []
}