Queries the status of one or more Elastic Compute Service (ECS) instances.
Operation description
- For information about the lifecycle states of an ECS instance, see Instance states.
- You can also call this operation to query the list of ECS instances.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instances. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ZoneId | string | No | The zone ID of the instances. You can call the DescribeZones operation to query the most recent zone list. | cn-hangzhou-d |
ClusterId | string | No | The cluster ID of the instances. | cls-bp67acfmxazb4p**** |
PageNumber | integer | No | The page number. Pages start from page 1. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Valid values: 1 to 50. Default value: 10. | 10 |
InstanceId | array | No | The IDs of the instances. When you use this parameter to specify multiple instance IDs, separate the IDs with commas(,). Example: | |
string | No | The IDs of the instances. When you use this parameter to specify multiple instance IDs, separate the IDs with commas(,). Example: | i-bp1j4i2jdf3owlhe**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageSize": 1,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageNumber": 1,
"TotalCount": 58,
"InstanceStatuses": {
"InstanceStatus": [
{
"Status": "Running",
"InstanceId": "i-bp1j4i2jdf3owlhe****"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | InvalidParameter.TooManyInstanceIds | Instance ids cannot be more than 100. | - |
403 | Abs.InvalidInstanceIds.MalFormed | The specified instanceIds is not valid. | - |
404 | InvalidZoneId.NotFound | The ZoneId provided does not exist in our records. | The specified zone ID does not exist. |
For a list of error codes, visit the Service error codes.