You can call DescribeContainerGroupStatus to perform a batch query on the status of multiple Elastic Container Instance (ECI) instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eci:DescribeContainerGroupStatus |
get |
*containergroup
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| ZoneId |
string |
No |
The zone ID. |
cn-hangzhou-k |
| VSwitchId |
string |
No |
The vSwitch ID. |
vsw-uf6h3rbwbm90urjwa**** |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-uf66jeqopgqa9hdn**** |
| ContainerGroupIds |
string |
No |
The IDs of the Elastic Container Instance (ECI) instances. You can specify a maximum of 20 IDs. The value must be a JSON-formatted string. |
["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"] |
| SinceSecond |
integer |
No |
The time in seconds. The operation returns the status of ECI instances that were updated within this time period. This parameter is used for polling. |
60 |
| Tag |
array<object> |
No |
The tags attached to the ECI instance. |
|
|
object |
No |
The tags attached to the ECI instance. |
||
| Value |
string |
No |
The tag value. |
testValue |
| Key |
string |
No |
The tag key. |
testKey |
| NextToken |
string |
No |
The token to retrieve the next page of results. You do not need to set this parameter for the first request. You can get the token from the |
d78f2dd8-5979-42fe-xaee-b16db43be5bc |
| Limit |
integer |
No |
The maximum number of ECI instances to return. The default value is 200. Note
The number of instances returned is less than or equal to the specified value. |
200 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
1340C38D-6189-54D1-86F6-7D5ECF3E0088 |
| NextToken |
string |
The token to start the next query. |
d78f2dd8-5979-42fe-****-b16db43be5bc |
| TotalCount |
integer |
The total number of entries returned. |
1 |
| Data |
array<object> |
A collection of status information about the ECI instances. |
|
|
array<object> |
A collection of status information about the ECI instances. |
||
| ContainerGroupId |
string |
The ECI instance ID. |
eci-bp1jrgfqqy54kg5hc**** |
| Name |
string |
The ECI instance name. |
nginx |
| Namespace |
string |
The namespace of the ECI instance. |
default |
| Status |
string |
The ECI instance status. |
Running |
| uuid |
string |
The universally unique identifier (UUID) of the ECI instance. This corresponds to the pod UID in Kubernetes. |
78ee0657-987g-b8b2-1f507dic4**** |
| Annotations |
string |
The annotations of the ECI instance. |
"{\"tenancy.x-k8s.io/namespace\":\"redis\"}" |
| PodStatus |
object |
The status information of the ECI instance. |
|
| Conditions |
array<object> |
The conditions of the pod. |
|
|
object |
The conditions of the pod. |
||
| type |
string |
The condition type. Valid values:
|
Ready |
| status |
string |
The condition status. |
True |
| Reason |
string |
The reason for the event. |
Completed |
| Message |
string |
The message about the event. |
Completed |
| lastTransitionTime |
string |
The time of the last status transition. |
2021-05-12T07:02:47Z |
| ContainerStatuses |
array<object> |
The status of the containers. |
|
|
array<object> |
The status of the containers. |
||
| Image |
string |
The image of the container. |
registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu:18.04 |
| ImageID |
string |
The ID of the image. |
registry-vpc.cn-zhangjiakou.aliyuncs.com/eci_open/ubuntu@sha256:134c7fe821b9d359490cd009ce7ca322453f4f2d018623f849e580a89a685e5d |
| Name |
string |
The name of the container. |
ubuntu |
| Ready |
boolean |
Indicates whether the container is ready. |
true |
| RestartCount |
integer |
The number of times the container has been restarted. |
1 |
| Started |
boolean |
Indicates whether the container has started. |
true |
| State |
object |
The status of the container. It can be one of the following states:
|
|
| Waiting |
object |
The container is waiting to be created and is not running. |
|
| Reason |
string |
The reason for the event. |
Started |
| Message |
string |
The message about the event. |
Back-off |
| Running |
object |
The container is running. |
|
| StartedAtstartedAt |
string |
The time when the container started. |
2021-05-23T20:49:31Z |
| Terminated |
object |
Details about the terminated state. |
|
| ContainerID |
string |
The ID of the container. |
containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a****** |
| ExitCode |
integer |
The exit code of the container. |
0 |
| FinishedAt |
string |
The time when the container finished. |
2021-05-23T20:55:31Z |
| StartedAt |
string |
The time when the container started. |
2021-05-23T20:49:31Z |
| Signal |
integer |
The signal code. |
1 |
| Reason |
string |
The reason for the event. |
Completed |
| Message |
string |
The message about the event. |
Completed |
| LastState |
object |
The previous status of the container. |
|
| Waiting |
object |
The container is waiting to be created and is not running. |
|
| Reason |
string |
The reason for the event. |
Started |
| Message |
string |
The message about the event. |
Back-off |
| Running |
object |
Details about the running state. |
|
| StartedAtstartedAt |
string |
The time when the container started. |
2021-05-23T20:49:31Z |
| Terminated |
object |
Details about the terminated state. |
|
| ContainerID |
string |
The ID of the container. |
containerd://3ff993933bea366c4719e43a1b067d89bc7f01f1f573981659a44ff17a****** |
| ExitCode |
integer |
The exit code of the container. |
0 |
| FinishedAt |
string |
The time when the container finished. |
2021-05-23T20:49:31Z |
| StartedAt |
string |
The time when the container started. |
2021-05-12T07:02:52Z |
| Signal |
integer |
The signal code. |
1 |
| Reason |
string |
The reason for the event. |
Completed |
| Message |
string |
The message about the event. |
Completed |
| HostIp |
string |
The IP address of the host. |
192.168.XX.XX |
| Phase |
string |
The lifecycle phase of the pod. |
Running |
| PodIp |
string |
The IP address of the pod. |
192.168.XX.XX |
| PodIps |
array<object> |
A collection of IP addresses of the pod. |
|
|
object |
A collection of IP addresses of the pod. |
||
| Ip |
string |
The IP address of the pod. |
192.168.XX.XX |
| QosClass |
string |
The Quality of Service (QoS) class of the pod. |
Guaranteed |
| StartTime |
string |
The time when the pod was started. |
2021-05-12T07:02:47Z |
Examples
Success response
JSON format
{
"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
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.MismatchInstanceType | The instanceId mismatch instance type. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.