Queries elastic compute units (ECUs).
Debugging
Request headers
This operation uses only the common request header. For more information, see Common request parameters.
Request syntax
POST /pop/v5/resource/ecu_list HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
AppId | String | Query | No | e809****-43d7-4c6b-8e01-b0d9d1db**** |
The ID of the application whose ECUs you want to query. You can call the ListApplication operation to query the application ID. For more information, see ListApplication. |
- If AppId is set, the ECUs of the specified application will be queried.
- If AppId is not set, the ECUs in the current region will be queried.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | Integer | 200 |
The HTTP status code. |
EcuInfoList | Array of EcuEntity |
The list of ECUs. |
|
EcuEntity | |||
AppId | String | e809****-43d7-4c6b-8e01-b0d9d1db**** |
The ID of the application. |
AvailableCpu | Integer | 1 |
The number of available CPU cores. |
AvailableMem | Integer | 200 |
The size of available memory. |
Cpu | Integer | 1 |
The total number of CPU cores. |
CreateTime | Long | 1542692376066 |
The time when the ECU was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
DockerEnv | Boolean | true |
Indicates whether Docker was installed. |
EcuId | String | 0de2ebdb-9490-4fc4-be41*************** |
The unique ID of the ECU. To query the ID, you can run the |
HeartbeatTime | Long | 1573281040819 |
The time when the last heartbeat detection was performed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
InstanceId | String | i-2zej4i2jdf********* |
The ID of the ECS instance. |
IpAddr | String | 192.123.122.23 |
The internal IP address allocated to the ECU. |
Mem | Integer | 500 |
The size of total memory. |
Name | String | test |
The name of the ECU. |
Online | Boolean | true |
Indicates whether the ECU is online. |
RegionId | String | cn-beijing |
The ID of the region. |
UpdateTime | Long | 1599803995894 |
The time when the ECU was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
UserId | String | ****_common_****@aliyun.com |
The ID of the user who created the ECS instance. |
VpcId | String | vpc-2zef6ob8********** |
VPC ID |
ZoneId | String | cn-beijing-h |
The ID of the zone. |
Message | String | success |
The returned message. |
RequestId | String | b197-40ab-9155-7ca7 |
The ID of the request. |
Examples
Sample requests
POST /pop/v5/resource/ecu_list HTTP/1.1
Common request header
Sample success responses
XML
format
<EcuInfoList>
<EcuEntity>
<IpAddr>192.123.122.23</IpAddr>
<ZoneId>cn-beijing-h</ZoneId>
<InstanceId>i-2zej4i2jdf*********</InstanceId>
<CreateTime>1542692376066</CreateTime>
<Cpu>1</Cpu>
<EcuId>0de2ebdb-9490-4fc4-be41***************</EcuId>
<AvailableMem>200</AvailableMem>
<HeartbeatTime>1573281040819</HeartbeatTime>
<Name>test</Name>
<AppId>e809****-43d7-4c6b-8e01-b0d9d1db****</AppId>
<Mem>500</Mem>
<VpcId>vpc-2zef6ob8**********</VpcId>
<UserId>****_common_****@aliyun.com</UserId>
<UpdateTime>1599803995894</UpdateTime>
<RegionId>cn-beijing</RegionId>
<Online>true</Online>
<AvailableCpu>1</AvailableCpu>
<DockerEnv>true</DockerEnv>
</EcuEntity>
</EcuInfoList>
<RequestId>b197-40ab-9155-7ca7</RequestId>
<Message>success</Message>
<Code>200</Code>
JSON
format
{
"EcuInfoList": {
"EcuEntity": {
"IpAddr": "192.123.122.23",
"ZoneId": "cn-beijing-h",
"InstanceId": "i-2zej4i2jdf*********",
"CreateTime": 1542692376066,
"Cpu": 1,
"EcuId": "0de2ebdb-9490-4fc4-be41***************",
"AvailableMem": 200,
"HeartbeatTime": 1573281040819,
"Name": "test",
"AppId": "e809****-43d7-4c6b-8e01-b0d9d1db****",
"Mem": 500,
"VpcId": "vpc-2zef6ob8**********",
"UserId": "****_common_****@aliyun.com",
"UpdateTime": 1599803995894,
"RegionId": "cn-beijing",
"Online": true,
"AvailableCpu": 1,
"DockerEnv": true
}
},
"RequestId": "b197-40ab-9155-7ca7",
"Message": "success",
"Code": 200
}
Error codes
For a list of error codes, visit the API Error Center.