Queries the status of multiple container groups at a time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameter

Parameter Type Required Example Description
Action String Yes DescribeContainerGroupStatus

The operation that you want to perform. Set the value to DescribeContainerGroupStatus.

RegionId String Yes cn-hangzhou

The region ID of the container groups.

ZoneId String No cn-hangzhou-k

The ID of the zone to which the container groups belong.

VSwitchId String No vsw-uf6h3rbwbm90urjwa****

The ID of the vSwitch

ResourceGroupId String No rg-uf66jeqopgqa9hdn****

The ID of the resource group to which the container groups belong.

ContainerGroupIds String No ["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"]

The IDs of the container groups. You can specify up to 20 IDs. Each ID must be a string in the JSON format.

SinceSecond Integer No 60

A relative time in seconds before the current time from which to show container groups whose status changes. This parameter is used to poll status of container groups.

NextToken String No d78f2dd8-5979-42fe-xaee-b16db43be5bc

The token that is used for the next query. If this parameter is empty, all results have been returned.

You do not need to specify this parameter in the first request. You can obtain the token from the result returned by the previous request.

Limit Integer No 200

Specifies the maximum number of container groups to be returned for this request. Default value: 200.

Note The number of container groups to be returned is no greater than this parameter value.
Tag.N.Value String No testValue

The value of tag N.

Tag.N.Key String No testKey

The key of tag N.

Response parameters

Parameter Type Example Description
RequestId String 1340C38D-6189-54D1-86F6-7D5ECF3E0088

The ID of the request.

NextToken String d78f2dd8-5979-42fe-****-b16db43be5bc

The token that was returned for the next query.

TotalCount Integer 1

The total number of entries returned.

Data Array of data

The collection of the status of the container groups.

ContainerGroupId String eci-bp1jrgfqqy54kg5hc****

The ID of the container group.

Name String nginx

The name of the container group.

Namespace String default

The namespace in which the container group resides.

Status String Running

The status of the container group.

uuid String 78ee0657-987g-b8b2-1f507dic4****

The universally unique identifier (UUID) of the container group, which is similar to the unique identifier (UID) of the Kubernetes pod in terms of the concept and usage.

PodStatus Object

The status of the pod.

Conditions Array of conditions

The conditions of the pod.

type String Ready

The type of the pod condition. Valid values:

  • PodScheduled
  • Ready
  • Initialized
  • Unschedulable
status String True

The status of the pod condition.

Reason String Completed

The reason for the transition into the current status of the event.

Message String Completed

The event message.

lastTransitionTime String 2021-05-12T07:02:47Z

The time when the status last changed.

ContainerStatuses Array of containerStatuses

The collection of the status about the container groups.

Image String registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu:18.04

The image of the container.

ImageID String registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu@sha256:134c7fe821b9d359490cd009ce7ca322453f4f2d018623f849e580a89a685e5d

The ID of the image.

Name String ubuntu

The name of the container.

Ready Boolean true

Indicates whether the container is ready for use.

RestartCount Integer 1

The number of times that the container restarted.

Started Boolean true

Indicates whether the container is started.

State Object

The state of the container. Valid values:

  • Waiting
  • Running
  • Terminated
Waiting Object

The container is waiting for being created.

Reason String Started

The reason for the transition into the current status of the event.

Message String Back-off

The event message.

Running Object

The container is created and running.

StartedAtstartedAt String 2021-05-23T20:49:31Z

The beginning of the time range that was queried.

Terminated Object

The container is terminated and exits after a successful or failed run.

ContainerID String containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******

The ID of the container.

ExitCode Integer 0

The exit code.

FinishedAt String 2021-05-23T20:55:31Z

The end of the time range that was queried.

StartedAt String 2021-05-23T20:49:31Z

The beginning of the time range that was queried.

Signal Integer 1

The signal code.

Reason String Completed

The reason for the transition into the current status of the event.

Message String Completed

The event message.

LastState Object

The latest status of the container.

Waiting Object

The container is waiting for being created.

Reason String Started

The reason for the transition into the current status of the event.

Message String Back-off

The event message.

Running Object

The container is created and running.

StartedAtstartedAt String 2021-05-23T20:49:31Z

The beginning of the time range that was queried.

Terminated Object

The container is terminated and exits after a successful or failed run.

ContainerID String containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******

The ID of the container.

ExitCode Integer 0

The exit code.

FinishedAt String 2021-05-23T20:49:31Z

The end of the time range that was queried.

StartedAt String 021-05-12T07:02:52Z

The beginning of the time range that was queried.

Signal Integer 1

The signal code.

Reason String Completed

The reason for the transition into the current status of the event.

Message String Completed

The event message.

HostIp String 192.168.XX.XX

The IP address of the server.

Phase String Running

The lifecycle phase of the pod.

PodIp String 192.168.XX.XX

The IP address of the pod.

PodIps Array of podIps

The collection of pod IP addresses.

Ip String 192.168.XX.XX

The IP address of the pod.

QosClass String Guaranteed

The quality of service (QoS) of the pod.

StartTime String 2021-05-12T07:02:47Z

The time when the container began to run.

Examples

Sample requests

https://eci.aliyuncs.com/?Action=DescribeContainerGroupStatus
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-k
&VSwitchId=vsw-uf6h3rbwbm90urjwa****
&ResourceGroupId=rg-uf66jeqopgqa9hdn****
&ContainerGroupIds=["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"]
&SinceSecond=60
&Tag=[{"Value":"testValue","Key":"testKey"}]
&NextToken=d78f2dd8-5979-42fe-xaee-b16db43be5bc
&Limit=200
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeContainerGroupStatusResponse>
    <RequestId>1340C38D-6189-54D1-86F6-7D5ECF3E0088</RequestId>
    <NextToken>d78f2dd8-5979-42fe-****-b16db43be5bc</NextToken>
    <TotalCount>1</TotalCount>
    <Data>
        <ContainerGroupId>eci-bp1jrgfqqy54kg5hc****</ContainerGroupId>
        <Name>nginx</Name>
        <Namespace>default</Namespace>
        <Status>Running</Status>
        <uuid>78ee0657-987g-b8b2-1f507dic4****</uuid>
        <PodStatus>
            <Conditions>
                <type>Ready</type>
                <status>True</status>
                <Reason>Completed</Reason>
                <Message>Completed</Message>
                <lastTransitionTime>2021-05-12T07:02:47Z</lastTransitionTime>
            </Conditions>
            <ContainerStatuses>
                <Image>registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu:18.04</Image>
                <ImageID>registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu@sha256:134c7fe821b9d359490cd009ce7ca322453f4f2d018623f849e580a89a685e5d</ImageID>
                <Name>ubuntu</Name>
                <Ready>true</Ready>
                <RestartCount>1</RestartCount>
                <Started>true</Started>
                <State>
                    <Waiting>
                        <Reason>Started</Reason>
                        <Message>Back-off</Message>
                    </Waiting>
                    <Running>
                        <StartedAtstartedAt>2021-05-23T20:49:31Z</StartedAtstartedAt>
                    </Running>
                    <Terminated>
                        <ContainerID>containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******</ContainerID>
                        <ExitCode>0</ExitCode>
                        <FinishedAt>2021-05-23T20:55:31Z</FinishedAt>
                        <StartedAt>2021-05-23T20:49:31Z</StartedAt>
                        <Signal>1</Signal>
                        <Reason>Completed</Reason>
                        <Message>Completed</Message>
                    </Terminated>
                </State>
                <LastState>
                    <Waiting>
                        <Reason>Started</Reason>
                        <Message>Back-off</Message>
                    </Waiting>
                    <Running>
                        <StartedAtstartedAt>2021-05-23T20:49:31Z</StartedAtstartedAt>
                    </Running>
                    <Terminated>
                        <ContainerID>containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******</ContainerID>
                        <ExitCode>0</ExitCode>
                        <FinishedAt>2021-05-23T20:49:31Z</FinishedAt>
                        <StartedAt>021-05-12T07:02:52Z</StartedAt>
                        <Signal>1</Signal>
                        <Reason>Completed</Reason>
                        <Message>Completed</Message>
                    </Terminated>
                </LastState>
            </ContainerStatuses>
            <HostIp>192.168.XX.XX</HostIp>
            <Phase>Running</Phase>
            <PodIp>192.168.XX.XX</PodIp>
            <PodIps>
                <Ip>192.168.XX.XX</Ip>
            </PodIps>
            <QosClass>Guaranteed</QosClass>
            <StartTime>2021-05-12T07:02:47Z</StartTime>
        </PodStatus>
    </Data>
</DescribeContainerGroupStatusResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "1340C38D-6189-54D1-86F6-7D5ECF3E0088",
  "NextToken" : "d78f2dd8-5979-42fe-****-b16db43be5bc",
  "TotalCount" : 1,
  "Data" : [ {
    "ContainerGroupId" : "eci-bp1jrgfqqy54kg5hc****",
    "Name" : "nginx",
    "Namespace" : "default",
    "Status" : "Running",
    "uuid" : "78ee0657-987g-b8b2-1f507dic4****",
    "PodStatus" : {
      "Conditions" : [ {
        "type" : "Ready",
        "status" : "True",
        "Reason" : "Completed",
        "Message" : "Completed",
        "lastTransitionTime" : "2021-05-12T07:02:47Z"
      } ],
      "ContainerStatuses" : [ {
        "Image" : "registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu:18.04",
        "ImageID" : "registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu@sha256:134c7fe821b9d359490cd009ce7ca322453f4f2d018623f849e580a89a685e5d",
        "Name" : "ubuntu",
        "Ready" : true,
        "RestartCount" : 1,
        "Started" : true,
        "State" : {
          "Waiting" : {
            "Reason" : "Started",
            "Message" : "Back-off"
          },
          "Running" : {
            "StartedAtstartedAt" : "2021-05-23T20:49:31Z"
          },
          "Terminated" : {
            "ContainerID" : "containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******",
            "ExitCode" : 0,
            "FinishedAt" : "2021-05-23T20:55:31Z",
            "StartedAt" : "2021-05-23T20:49:31Z",
            "Signal" : 1,
            "Reason" : "Completed",
            "Message" : "Completed"
          }
        },
        "LastState" : {
          "Waiting" : {
            "Reason" : "Started",
            "Message" : "Back-off"
          },
          "Running" : {
            "StartedAtstartedAt" : "2021-05-23T20:49:31Z"
          },
          "Terminated" : {
            "ContainerID" : "containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******",
            "ExitCode" : 0,
            "FinishedAt" : "2021-05-23T20:49:31Z",
            "StartedAt" : "021-05-12T07:02:52Z",
            "Signal" : 1,
            "Reason" : "Completed",
            "Message" : "Completed"
          }
        }
      } ],
      "HostIp" : "192.168.XX.XX",
      "Phase" : "Running",
      "PodIp" : "192.168.XX.XX",
      "PodIps" : [ {
        "Ip" : "192.168.XX.XX"
      } ],
      "QosClass" : "Guaranteed",
      "StartTime" : "2021-05-12T07:02:47Z"
    }
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.