Query instance Status
Describe
To obtain the status information of all instances of the current user in batches, and also to obtain the instance list, see the Instance state table.
Special restrictions on the use of RAM for authorized access to resource operations
Only the state of the first 100 instances is allowed, and if the value of the combination of pagenumber and PageSize exceeds this limit, the request is rejected with the error code: Forbidden.accesstoomanyothersresource.
In response, TotalCount says: In all instances of Resourceowner, how many instances have been granted to the caller for that operation. When the number exceeds 100, the TotalCount value is 100.
Request parameters
name |
type |
must |
describe |
action |
|
operation interface name, system specified parameters, values: Describeinstancestatus |
string |
style= border:0;padding:0 "Region;" /tr> |
string |
no |
The available zone for instance |
pagenumb Er |
integer |
|
instance status list, with a starting value of 1 and a default value of1 |
pagesize |
integer< /td> |
|
|
return parameters
name |
type |
Description |
TotalCount |
Integer |
Total number of instances |
PageNumber |
Integer |
Number of instance List |
PageSize |
Integer |
Number of rows per page set when entering |
Instancestatuses |
Instancestatussettype |
An array format consisting of Instancestatusitemtype that returns the state information of an instance |
Error code
error code |
Description |
Http status code |
semantics |
missingparameter |
the input parameter "RegionID" that are mandatory for processi Ng this request are not supplied. |
400 |
missing RegionID value |
TD style= "BORDER:0;PADDING:0;" >invalidparameter
|
400 |
|
invalidparameter |
the specified Meter "PageSize" is not valid. |
400 |
PageSize > |
Example
Request sample
Https://ecs.aliyuncs.com/?Action=DescribeInstanceStatus
®ionid=cn-hangzhou
&< Public Request Parameters >
Return sample
XML format
6ef60bec-0242-43af-bb20-270359fb54a7
2
1
10
I-instance1
Running
i-ae4r89pp
Stopped
JSON format
{
"RequestID": "6ef60bec-0242-43af-bb20-270359fb54a7",
"TotalCount": 2,
"PageNumber": 1,
"PageSize": 10,
"Instancestatuses": {
"Instancestatus": [{
"Instanceid": "I-instance1",
"Status": "Running"
},
{
"Instanceid": "i-ae4r89pp",
"Status": "Stopped"
}]
}
}