Queries the statuses of multiple container groups at a time.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
eci:DescribeContainerGroupStatus | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instances. | cn-hangzhou |
ZoneId | string | No | The zone ID of the instances. | cn-hangzhou-k |
VSwitchId | string | No | The vSwitch ID. | vsw-uf6h3rbwbm90urjwa**** |
ResourceGroupId | string | No | The ID of the resource group to which the instances belong. | rg-uf66jeqopgqa9hdn**** |
ContainerGroupIds | string | No | 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****"] |
SinceSecond | integer | No | 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 |
Tag | array<object> | No | The tag that is bound to the instances. | |
object | No | |||
Value | string | No | The value of the tag. | testValue |
Key | string | No | The key of the tag. | testKey |
NextToken | string | No | 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. | d78f2dd8-5979-42fe-xaee-b16db43be5bc |
Limit | integer | No | 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
Examples
Sample success responses
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 |
---|---|---|
400 | InvalidParameter.MismatchInstanceType | The instanceId mismatch instance type. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-04 | The Error code has changed | View Change Details |
2023-05-08 | The response structure of the API has changed | View Change Details |
2021-09-27 | The request parameters of the API has changed | View Change Details |