You can call this operation to query the health statuses of all ECS instances in a deployment environment.
Debugging
Request headers
This operation uses common request headers, instead of special request headers. For more information, see the "Common request headers" section in "Common request and response headers."
Request syntax
GET /pop/v1/wam/appEnv/instanceHealth HTTP/1.1
Request parameters
Parameter | Type | Required? | Example | Description |
---|---|---|---|---|
EnvId | String | Yes | we-5d244085f314934e2ab***** |
The ID of the deployment environment in which you want to query the health statuses of ECS instances. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | OK |
The response code. The value is OK if the request is successful. |
EnvInstanceHealth |
The query results of the ECS instance health status. |
||
EnvId | String | we-5d3eaaea2977ca5251e***** |
The ID of the deployment environment. |
EnvName | String | test-env |
The name of the deployment environment. |
InstanceHealthList |
The list of health information about ECS instances. |
||
AgentStatus | String | CONNECTED |
The agent connection status of the ECS instance. |
AppStatus | String | HEALTHY |
The status of the application. |
DisconnectedTime | String | 0 |
The total disconnection duration. |
InstanceId | String | i-wz95ehd0129c8vv***** |
The ID of the ECS instance. |
Message | String | success |
The response message. The value is success if the request is successful. |
RequestId | String | C8E457BD-0E3D-4EF0-AA1F-A36FE27***** |
The ID of the request. |
Examples
Sample request
http://webplus.cn-hangzhou.aliyuncs.com/pop/v1/wam/appEnv/instanceHealth?ServiceCode=webx&EnvId=we-5d244085f314934e2ab*****&<Common request parameters>
Sample success response
XML
format
<DescribeAppEnvInstanceHealthResponse>
<Message>success</Message>
<RequestId>C99E58A1-5D86-4D50-B443-E41EEE1*****</RequestId>
<EnvInstanceHealth>
<EnvName>test-env</EnvName>
<InstanceHealthList>
<InstanceHealth>
<DisconnectedTime>0</DisconnectedTime>
<InstanceId>i-wz95ehd0129c8vv*****</InstanceId>
<AgentStatus>CONNECTED</AgentStatus>
<AppStatus>HEALTHY</AppStatus>
</InstanceHealth>
</InstanceHealthList>
<EnvId>we-5d3eaaea2977ca5251e*****</EnvId>
</EnvInstanceHealth>
<Code>OK</Code>
</DescribeAppEnvInstanceHealthResponse>
JSON
format
{
"Message":"success",
"RequestId":"C8E457BD-0E3D-4EF0-AA1F-A36FE27*****",
"EnvInstanceHealth":{
"EnvName":"test-env",
"InstanceHealthList":{
"InstanceHealth":[
{
"DisconnectedTime":0,
"InstanceId":"i-wz95ehd0129c8vv*****",
"AgentStatus":"CONNECTED",
"AppStatus":"HEALTHY"
}
]
},
"EnvId":"we-5d3eaaea2977ca5251e*****"
},
"Code":"OK"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | ResourceAuthFailed | The specified resource does not exist or it does not belong to this Alibaba Cloud account. | The error message returned because the specified resource does not exist or it does not belong to your Alibaba Cloud account. |
For more information about error codes, see API Error Center.