All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroupStatus

Last Updated:Apr 15, 2024

Queries the status of multiple elastic container instances at a time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
eci:DescribeContainerGroupStatusRead
  • containergroup
    acs:eci:{#regionId}:{#accountId}:containergroup/{#containergroupId}
  • eci:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instances.

cn-hangzhou
ZoneIdstringNo

The zone ID of the instances.

cn-hangzhou-k
VSwitchIdstringNo

The vSwitch ID.

vsw-uf6h3rbwbm90urjwa****
ResourceGroupIdstringNo

The ID of the resource group to which the instances belong.

rg-uf66jeqopgqa9hdn****
ContainerGroupIdsstringNo

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

["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"]
SinceSecondintegerNo

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

60
Tagobject []No

The tag that is bound to the instances.

ValuestringNo

The value of the tag.

testValue
KeystringNo

The key of the tag.

testKey
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.
You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

d78f2dd8-5979-42fe-xaee-b16db43be5bc
LimitintegerNo

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

Note The number of returned resources can be less than or equal to the value of this parameter.
200

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

1340C38D-6189-54D1-86F6-7D5ECF3E0088
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results.

d78f2dd8-5979-42fe-****-b16db43be5bc
TotalCountinteger

The total number of entries returned.

1
Dataobject []

The collection of status of the elastic container instances.

ContainerGroupIdstring

The ID of the elastic container instance.

eci-bp1jrgfqqy54kg5hc****
Namestring

The name of the elastic container instance.

nginx
Namespacestring

The namespace where the elastic container instance resides.

default
Statusstring

The state of the elastic container instance.

Running
uuidstring

The UUID of the elastic container instance. The UUID of an elastic container instance is similar to the UID of a Kubernetes pod in concept and usage.

78ee0657-987g-b8b2-1f507dic4****
Annotationsstring

The annotations of the elastic container instance.

"{\"tenancy.x-k8s.io/namespace\":\"redis\"}"
PodStatusobject

The state information about the elastic container instance.

Conditionsobject []

The information about the pod conditions.

typestring

The type of the pod condition. Valid values:

  • PodScheduled
  • Ready
  • Initialized
  • Unschedulable
Ready
statusstring

The state of the pod condition.

True
Reasonstring

The cause of the event.

Completed
Messagestring

The message about the event.

Completed
lastTransitionTimestring

The time when the status last changed.

2021-05-12T07:02:47Z
ContainerStatusesobject []

The state information about the container.

Imagestring

The image of the container.

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

The image ID.

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

The container name.

ubuntu
Readyboolean

Indicates whether the container is ready for use.

true
RestartCountinteger

The number of restarts.

1
Startedboolean

Indicates whether the container is started.

true
Stateobject

The state of the container. Valid values:

  • Waiting
  • Running
  • Terminated
Waitingobject

The container is waiting for being created.

Reasonstring

The cause of the event.

Started
Messagestring

The message about the event.

Back-off
Runningobject

The container is created and running.

StartedAtstartedAtstring

The start time.

2021-05-23T20:49:31Z
Terminatedobject

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

ContainerIDstring

The container ID.

containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******
ExitCodeinteger

The exit code.

0
FinishedAtstring

The end time.

2021-05-23T20:55:31Z
StartedAtstring

The start time.

2021-05-23T20:49:31Z
Signalinteger

The signal code.

1
Reasonstring

The cause of the event.

Completed
Messagestring

The message about the event.

Completed
LastStateobject

The most recent state of the container.

Waitingobject

The container is waiting for being created.

Reasonstring

The cause of the event.

Started
Messagestring

The message about the event.

Back-off
Runningobject

The container is created and running.

StartedAtstartedAtstring

The start time.

2021-05-23T20:49:31Z
Terminatedobject

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

ContainerIDstring

The container ID.

containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a******
ExitCodeinteger

The exit code.

0
FinishedAtstring

The end time.

2021-05-23T20:49:31Z
StartedAtstring

The start time.

2021-05-12T07:02:52Z
Signalinteger

The signal code.

1
Reasonstring

The cause of the event.

Completed
Messagestring

The message about the event.

Completed
HostIpstring

The IP address of the host.

192.168.XX.XX
Phasestring

The lifecycle phase of the pod.

Running
PodIpstring

The IP address of the pod.

192.168.XX.XX
PodIpsobject []

The collection of pod IP addresses.

Ipstring

The IP address of the pod.

192.168.XX.XX
QosClassstring

The quality of service (QoS) of the pod.

Guaranteed
StartTimestring

The time when the container started to run.

2021-05-12T07:02:47Z

Examples

Sample success responses

JSONformat

{
  "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****",
      "Annotations": "\"{\\\"tenancy.x-k8s.io/namespace\\\":\\\"redis\\\"}\"",
      "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": "2021-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 Service error codes.

Change history

Change timeSummary of changesOperation
2023-05-08The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2021-09-27The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ZoneId