Home >Operation and Maintenance >Linux Operation and Maintenance >How to obtain instance status information in batches from all possible instance statuses
The content of this article is about how to obtain instance status information in batches from all possible instance statuses. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
DescribeInstanceStatus
Get instance status information in batches.
Description
For all possible instance statuses that can be queried, please refer to the instance status table.
This interface can also be used to obtain the instance list.
Request parameters
##Return parameters
##Example
Request examplehttps://ecs.aliyuncs.com/?Action=DescribeInstanceStatus
&RegionId=cn-hangzhou
&<公共请求参数>
XML format
<DescribeInstanceStatusResponse>
<RequestId>6EF60BEC-0242-43AF-BB20-270359FB54A7</RequestId>
<TotalCount>2</TotalCount>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<InstanceStatuses>
<InstanceStatus>
<InstanceId>i-instance1</InstanceId>
<Status>Running</Status>
</InstanceStatus>
<InstanceStatus>
<InstanceId>i-ae4r89pp</InstanceId>
<Status>Stopped</Status>
</InstanceStatus>
</InstanceStatuses>
</DescribeInstanceStatusResponse>
{
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
"TotalCount": 2,
"PageNumber": 1,
"PageSize": 10,
"InstanceStatuses": {
"InstanceStatus": [{
"InstanceId": "i-instance1",
"Status": "Running"
},
{
"InstanceId": "i-ae4r89pp",
"Status": "Stopped"
}]
}
}
Error codeThe following are error codes unique to this interface. For more error codes, please visit the API Error Center.
The above is the detailed content of How to obtain instance status information in batches from all possible instance statuses. For more information, please follow other related articles on the PHP Chinese website!