Queries elastic compute units (ECUs) available for scaling out an application in a specified cluster or the cluster where the application is deployed. This operation is applicable to Elastic Compute Service (ECS) clusters.

Terms

  • Namespace: the logical concept that is used to isolate resources such as clusters, ECS instances, and applications, and microservices published in EDAS. This concept involves the default namespace and custom namespaces. Each region has a default namespace and supports multiple custom namespaces. By default, only the default namespace is available. You do not need to create a custom namespace if you do not want to isolate resources and microservices.
  • ECU: After an ECS instance is imported to a cluster, the instance becomes an ECU.
  • ECC: After you deploy an application to an ECU in a cluster, the ECU becomes an elastic compute container (ECC).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/resource/scale_out_ecu_list HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
LogicalRegionId String Query No cn-beijing:test

The ID of the namespace.

  • The ID of a custom namespace is in the region ID:namespace identifier format. An example is cn-beijing:test.
  • The ID of the default namespace is in the region ID format. An example is cn-beijing.
ClusterId String Query No 52984524-6d48-4bbd-******************

The ID of the cluster. Set this parameter if you want to query the available ECUs in the cluster.

Note Specify at least one of ClusterId and AppId as the query parameter.
AppId String Query No b93024fd-8a9d-4ef7-99f1-5f0d65cc****

The ID of the application. Set this parameter if you want to query the available ECUs in the cluster where the application is deployed.

Note Specify at least one of ClusterId and AppId as the query parameter.
GroupId String Query No 8123db90-880f-486f-****-****

The ID of the instance group. Set this parameter if you want to query the available ECUs in the cluster where the instance group is located.

Cpu Integer Query No 1

The number of CPU cores based on which you want to query the available ECUs in the cluster.

Mem Integer Query No 200

The size of available memory based on which you want to query the available ECUs in the cluster. Unit: MB.

InstanceNum Integer Query No 1

The specified number of ECUs that you want to query. If this parameter is not specified, all the ECUs that meet the query conditions are returned.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

EcuInfoList Array of EcuInfo

The ECUs.

EcuInfo
AvailableCpu Integer 2

The number of available CPU cores for the ECU.

AvailableMem Integer 111

The size of available memory for the ECU. Unit: MB

CreateTime Long 1573281040819

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 false

Indicates whether Docker was installed. Valid values:

  • true: Docker was installed.
  • false: Docker was not installed.
EcuId String 0de2ebdb-9490-4fc4-be41***************

The unique ID of the ECU. To query the ID, you can run the dmidecode command on the ECS instance that corresponds to the ECU.

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 ECU.

IpAddr String 192.168.XX.XX

The private IP address of the ECU.

Name String test

The name of the ECU.

Online Boolean true

Indicates whether the ECU is online. If the ECU is online, its corresponding ECS instance is managed in EDAS. Valid values:

  • true: The ECU is online.
  • false: The ECU is offline.
RegionId String cn-beijing

The ID of the region where the ECU is located.

UpdateTime Long 1573281040827

The time when the ECU was last 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 1172****6608****

The ID of the Alibaba Cloud account to which the ECU belongs.

VpcId String vpc-2zef6ob8**********

The ID of the virtual private cloud (VPC) where the ECU is located.

ZoneId String cn-beijing-h

The ID of the zone where the ECU is located.

Message String success

The returned message.

RequestId String AF860D6C-ACE3-4429-9D54-3BD15A7F4AE6

The ID of the request.

Examples

Sample requests

POST /pop/v5/resource/scale_out_ecu_list HTTP/1.1
Common request header
{
    "ClusterId": 52984524-6d48-4bbd-******************"
}

Sample success responses

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>

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
}

Error codes

For a list of error codes, visit the API Error Center.