You can call this operation to query Elastic Compute Units (ECUs) available for creating or scaling out an application.
Description
Debugging
Request headers
This operation only uses common request headers. For more information, see the Common request parameters topic.
Request syntax
POST /pop/v5/resource/scale_out_ecu_list HTTPS|HTTP
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
LogicalRegionId | String | No | cn-beijing |
The ID of the logical region where you want to query ECUs available for creating or scaling out an application. The value set for this parameter will replace the value of regionId. |
ClusterId | String | No | 52984524-6d48-4bbd-****************** |
The ID of the cluster where you want to query ECUs available for creating or scaling out an application. |
AppId | String | No | "" |
The ID of the application to be scaled out. |
GroupId | String | No | "" |
The ID of the instance group where you want to query ECUs available for creating or scaling out an application. The default group is applied if this parameter is not specified. |
Cpu | Integer | No | 1 |
The number of CPUs in the ECUs that you want to query. |
Mem | Integer | No | 200 |
The amount of available memory in the ECUs that you want to query. Unit: MB |
InstanceNum | Integer | No | 1 |
The number of available ECUs that you want to query. This parameter is required when you create a Docker application. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | Integer | 200 |
The returned code. |
Message | String | success |
The returned message. |
RequestId | String | 4FD9-FEFV***************************** |
The ID of the request. |
EcuInfoList | Array |
The returned list of ECUs. |
|
EcuId | String | 0de2ebdb-9490-4fc4-be41*************** |
The ID of the ECU returned. To query the ECU ID, you can run dmidecode on the Elastic Compute Service (ECS) instance corresponding to the ECU. |
Online | Boolean | true |
Indicates whether the ECU is available and controlled by Enterprise Distributed Application Service (EDAS). |
DockerEnv | Boolean | false |
Indicates whether Docker is installed on the ECS instance corresponding to the ECU. |
CreateTime | Long | 1573281040819 |
The time when the ECU was created. Unit: milliseconds |
UpdateTime | Long | 1573281040827 |
The time when the ECU was last updated. Unit: milliseconds |
IpAddr | String | 192.168.XX. XX |
The intranet IP address allocated to the ECU. |
HeartbeatTime | Long | 1573281040819 |
The heartbeat time of the ECU. Unit: milliseconds |
UserId | String | "" |
The account of the administrator for the ECU. |
Name | String | "" |
The name of the ECS instance corresponding to the ECU returned. |
ZoneId | String | cn-beijing-h |
The ID of the zone where the ECS instance corresponding to the returned ECU is located. |
RegionId | String | cn-beijing |
The ID of the region where the ECS instance corresponding to the returned ECU is located. |
InstanceId | String | i-2zej4i2jdf********* |
The ID of the ECS instance corresponding to the ECU returned. |
VpcId | String | vpc-2zef6ob8********** |
The ID of the VPC where the ECS instance corresponding to the returned ECU is located. |
AvailableCpu | Integer | 2 |
The number of available CPUs in the ECS instance corresponding to the ECU returned. |
AvailableMem | Integer | 111 |
The amount of available memory in the ECS instance corresponding to the ECU returned. Unit: MB |
Examples
Sample requests
POST /pop/v5/resource/scale_out_ecu_list HTTP/1.1
Common request headers
Sample success responses
JSON
format
{
"EcuInfoList": {
"EcuInfo": [
{
"AvailableMem": 2048,
"InstanceId": "i-2zej4i2jdf*********",
"AvailableCpu": 2,
"Online": true,
"UpdateTime": 1573281040827,
"ZoneId": "cn-beijing-h",
"VpcId": "vpc-2zef6ob8**********",
"IpAddr": "192.168. *. **",
"HeartbeatTime": 1573281040819,
"CreateTime": 1573281040819,
"RegionId": "cn-beijing",
"EcuId": "0de2ebdb-9490-4fc4-be41***************",
"DockerEnv": false
},
{
"AvailableMem": 2048,
"InstanceId": "i-2zej4i2j*********",
"AvailableCpu": 2,
"Online": true,
"UpdateTime": 1573281041362,
"ZoneId": "cn-beijing-h",
"VpcId": "vpc-2ze************",
"IpAddr": "192.168.0. **",
"HeartbeatTime": 1573281041355,
"CreateTime": 1573281041355,
"RegionId": "cn-beijing",
"EcuId": "6f9cb7fd-bb*****************",
"DockerEnv": false
},
{
"AvailableMem": 2048,
"InstanceId": "i-2*******e",
"AvailableCpu": 2,
"Online": true,
"UpdateTime": 1573281041109,
"ZoneId": "cn-beijing-h",
"VpcId": "vpc-2zef6ob********p",
"IpAddr": "192.168.0. ***",
"HeartbeatTime": 1573281041101,
"CreateTime": 1573281041101,
"RegionId": "cn-beijing",
"EcuId": "70ed3f59-b476-49aa***********",
"DockerEnv": false
},
{
"AvailableMem": 2048,
"InstanceId": "i-2z********",
"AvailableCpu": 2,
"Online": true,
"UpdateTime": 1573281041150,
"ZoneId": "cn-beijing-h",
"VpcId": "vpc-2ze************",
"IpAddr": "192.168.0. **",
"HeartbeatTime": 1573281041143,
"CreateTime": 1573281041143,
"RegionId": "cn-beijing",
"EcuId": "cfe7f474-386******************",
"DockerEnv": false
},
{
"AvailableMem": 2048,
"InstanceId": "i-2zej4i*********",
"AvailableCpu": 2,
"Online": true,
"UpdateTime": 1573281041300,
"ZoneId": "cn-beijing-h",
"VpcId": "vpc-2zef**********",
"IpAddr": "192.168.0. ***",
"HeartbeatTime": 1573281041292,
"CreateTime": 1573281041292,
"RegionId": "cn-beijing",
"EcuId": "f6917537-******************",
"DockerEnv": false
}
]
},
"Message": "success",
"Code": 200
}
XML
format
<EcuInfoList>
<EcuInfo>
<AvailableMem>2048</AvailableMem>
<InstanceId>i-2zej4i2jdf*********</InstanceId>
<AvailableCpu>2</AvailableCpu>
<Online>true</Online>
<UpdateTime>1573281040827</UpdateTime>
<ZoneId>cn-beijing-h</ZoneId>
<VpcId>vpc-2zef6ob8**********</VpcId>
<IpAddr>192.168. *. **</IpAddr>
<HeartbeatTime>1573281040819</HeartbeatTime>
<CreateTime>1573281040819</CreateTime>
<RegionId>cn-beijing</RegionId>
<EcuId>0de2ebdb-9490-4fc4-be41***************</EcuId>
<DockerEnv>false</DockerEnv>
</EcuInfo>
<EcuInfo>
<AvailableMem>2048</AvailableMem>
<InstanceId>i-2zej4i2j*********</InstanceId>
<AvailableCpu>2</AvailableCpu>
<Online>true</Online>
<UpdateTime>1573281041362</UpdateTime>
<ZoneId>cn-beijing-h</ZoneId>
<VpcId>vpc-2ze************</VpcId>
<IpAddr>192.168.0. **</IpAddr>
<HeartbeatTime>1573281041355</HeartbeatTime>
<CreateTime>1573281041355</CreateTime>
<RegionId>cn-beijing</RegionId>
<EcuId>6f9cb7fd-bb*****************</EcuId>
<DockerEnv>false</DockerEnv>
</EcuInfo>
<EcuInfo>
<AvailableMem>2048</AvailableMem>
<InstanceId>i-2*******e</InstanceId>
<AvailableCpu>2</AvailableCpu>
<Online>true</Online>
<UpdateTime>1573281041109</UpdateTime>
<ZoneId>cn-beijing-h</ZoneId>
<VpcId>vpc-2zef6ob********p</VpcId>
<IpAddr>192.168.0. ***</IpAddr>
<HeartbeatTime>1573281041101</HeartbeatTime>
<CreateTime>1573281041101</CreateTime>
<RegionId>cn-beijing</RegionId>
<EcuId>70ed3f59-b476-49aa***********</EcuId>
<DockerEnv>false</DockerEnv>
</EcuInfo>
<EcuInfo>
<AvailableMem>2048</AvailableMem>
<InstanceId>i-2z********</InstanceId>
<AvailableCpu>2</AvailableCpu>
<Online>true</Online>
<UpdateTime>1573281041150</UpdateTime>
<ZoneId>cn-beijing-h</ZoneId>
<VpcId>vpc-2ze************</VpcId>
<IpAddr>192.168.0. **</IpAddr>
<HeartbeatTime>1573281041143</HeartbeatTime>
<CreateTime>1573281041143</CreateTime>
<RegionId>cn-beijing</RegionId>
<EcuId>cfe7f474-386******************</EcuId>
<DockerEnv>false</DockerEnv>
</EcuInfo>
<EcuInfo>
<AvailableMem>2048</AvailableMem>
<InstanceId>i-2zej4i*********</InstanceId>
<AvailableCpu>2</AvailableCpu>
<Online>true</Online>
<UpdateTime>1573281041300</UpdateTime>
<ZoneId>cn-beijing-h</ZoneId>
<VpcId>vpc-2zef**********</VpcId>
<IpAddr>192.168.0. ***</IpAddr>
<HeartbeatTime>1573281041292</HeartbeatTime>
<CreateTime>1573281041292</CreateTime>
<RegionId>cn-beijing</RegionId>
<EcuId>f6917537-******************</EcuId>
<DockerEnv>false</DockerEnv>
</EcuInfo>
</EcuInfoList>
<Message>success</Message>
<Code>200</Code>
Error codes
For a list of error codes, visit the API Error Center.