Queries the elastic compute units (ECUs) in a specified namespace.

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

GET /pop/v5/resource/ecu_list HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
Act String Yes pop-query

Set the value to pop-query.

LogicalRegionId String No cn-beijing or cn-beijing:tdy218

The ID of the namespace.

  • The ID of a custom namespace is in the region ID:namespace identifier format. An example is cn-beijing:tdy218.
  • The ID of the default namespace is in the region ID format. An example is cn-beijing.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

EcuEntityList Array of EcuEntity

The list of ECUs.

EcuEntity
AvailableCpu Integer 4

The number of available CPU cores for the ECU.

AvailableMem Integer 8192

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

Cpu Integer 0

The total number of CPU cores.

CreateTime Long 1572539283168

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. Valid values:

  • true: Docker was installed.
  • false: Docker was not installed.
EcuId String c96c494c-1b91-4456-bbb3-b5afcd16****

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 1572867865221

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-2ze82h8f4zcn449y****

ECU ID

IpAddr String 192.168.0.115

The private IP address of the ECU.

Mem Integer 0

The size of total memory.

Name String worker-k8s-for

The name of the ECU.

Online Boolean false

Indicates whether the ECU is online. 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 1572867895575

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 edas@aliyun-****.com

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

VpcId String vpc-2zew8mi6gqbo5wf****

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

ZoneId String cn-beijing-a

The ID of the zone where the ECU is located.

Message String success

The returned message.

RequestId String 00000000-0000-0000-0000

The ID of the request.

Examples

Sample requests

GET /pop/v5/resource/ecu_list HTTP/1.1
Common request header
{
  "Act": "pop-query"
}

Sample success responses

XML format

<Message>success</Message>
<Code>200</Code>
<EcuEntityList>
    <EcuEntity>
        <AvailableMem>8192</AvailableMem>
        <Mem>0</Mem>
        <AvailableCpu>4</AvailableCpu>
        <InstanceId>i-2ze82h8f4zcn449y****</InstanceId>
        <Online>false</Online>
        <UpdateTime>1572867895575</UpdateTime>
        <UserId>edas_****_test@aliyun-****.com</UserId>
        <ZoneId>cn-beijing-a</ZoneId>
        <VpcId>vpc-2zew8mi6gqbo5wf3r****</VpcId>
        <IpAddr>192.168.0.115</IpAddr>
        <Name>worker-k8s-for-cs</Name>
        <Cpu>0</Cpu>
        <HeartbeatTime>1572867865221</HeartbeatTime>
        <CreateTime>1572539283168</CreateTime>
        <RegionId>cn-beijing</RegionId>
        <EcuId>c96c494c-1b91-4456-bbb3-b5afcd16****</EcuId>
        <DockerEnv>true</DockerEnv>
    </EcuEntity>
    <EcuEntity>
        <AvailableMem>2048</AvailableMem>
        <Mem>0</Mem>
        <AvailableCpu>2</AvailableCpu>
        <InstanceId>i-2zej4i2jdf3ntwh****</InstanceId>
        <Online>true</Online>
        <UpdateTime>1573281041150</UpdateTime>
        <UserId>edas_****_test@aliyun-****.com</UserId>
        <ZoneId>cn-beijing-h</ZoneId>
        <VpcId>vpc-2zef6ob8mrlzv8x3q****</VpcId>
        <IpAddr>192.168.0.154</IpAddr>
        <Name>product_test004</Name>
        <Cpu>0</Cpu>
        <HeartbeatTime>1573281041143</HeartbeatTime>
        <CreateTime>1573281041143</CreateTime>
        <RegionId>cn-beijing</RegionId>
        <EcuId>cfe7f474-3861-453e-b236-887d4932****</EcuId>
        <DockerEnv>false</DockerEnv>
    </EcuEntity>
</EcuEntityList>

JSON format

{
	"Message": "success",
	"Code": 200,
	"EcuEntityList": {
		"EcuEntity": [
			{
				"AvailableMem": 8192,
				"Mem": 0,
				"AvailableCpu": 4,
				"InstanceId": "i-2ze82h8f4zcn449y****",
				"Online": false,
				"UpdateTime": 1572867895575,
				"UserId": "edas_****_test@aliyun-****.com",
				"ZoneId": "cn-beijing-a",
				"VpcId": "vpc-2zew8mi6gqbo5wf3r****",
				"IpAddr": "192.168.0.115",
				"Name": "worker-k8s-for-cs",
				"Cpu": 0,
				"HeartbeatTime": 1572867865221,
				"CreateTime": 1572539283168,
				"RegionId": "cn-beijing",
				"EcuId": "c96c494c-1b91-4456-bbb3-b5afcd16****",
				"DockerEnv": true
			},
			{
				"AvailableMem": 2048,
				"Mem": 0,
				"AvailableCpu": 2,
				"InstanceId": "i-2zej4i2jdf3ntwh****",
				"Online": true,
				"UpdateTime": 1573281041150,
				"UserId": "edas_****_test@aliyun-****.com",
				"ZoneId": "cn-beijing-h",
				"VpcId": "vpc-2zef6ob8mrlzv8x3q****",
				"IpAddr": "192.168.0.154",
				"Name": "product_test004",
				"Cpu": 0,
				"HeartbeatTime": 1573281041143,
				"CreateTime": 1573281041143,
				"RegionId": "cn-beijing",
				"EcuId": "cfe7f474-3861-453e-b236-887d4932****",
				"DockerEnv": false
			}
		]
	}
}

Error codes

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