Updated on 2026-01-13 GMT+08:00

Obtaining the ECS Instance List

Function

This API is used to obtain the ECS instance list. Instances can be filtered by name or pagination.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/sdg/asset/ecs

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used to identify a specific project.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records displayed on each page. The default value is 10.

name

No

String

Instance name, which is used to filter instances with a specific name.

offset

No

Integer

Start position of the query. The default value is 0.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

count

Integer

Total number of ECS instances that meet the search criteria.

servers

Array of Ecs objects

ECS instance information list, which contains all ECS instances that meet the search criteria.

Table 4 Ecs

Parameter

Type

Description

task_state

String

Task status of the instance, which indicates the task execution status of the instance, such as PENDING and RUNNING.

addresses

Object

Network addresses of the instance, including the EIP and private IP address of the instance.

created

String

Time when an instance is created.

flavor

Flavor object

ECS instance specifications, including the hardware configuration.

id

String

Unique identifier of an ECS instance.

metadata

Metadata object

Metadata information of an ECS instance, which contains the additional information of the instance.

name

String

Name of an ECS instance.

security_groups

Array of SecurityGroup objects

Security group list of the instance. It contains information about the security group that the instance belongs to.

status

String

Instance status. For example, ACTIVE indicates that the instance is running.

updated

String

Time when the instance is updated. It is the timestamp of the last instance update.

vpc_id

String

Unique identifier of the VPC that an instance belongs to.

Table 5 Flavor

Parameter

Type

Description

disk

String

Disk capacity of an instance, in GB.

id

String

Unique identifier of an instance flavor.

name

String

Flavor name, for example, c6.large.

ram

String

Memory capacity of an instance, in MB.

vcpus

String

Number of vCPUs of an instance, which indicates the computing capability of the instance.

Table 6 Metadata

Parameter

Type

Description

vpc_id

String

Unique identifier of the VPC that an instance belongs to.

Table 7 SecurityGroup

Parameter

Type

Description

description

String

Description of a security group, which contains the function and usage of the security group.

id

String

Unique identifier of a security group.

name

String

Name of a security group.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

The ECS instance list is obtained.

401

Unauthorized access. The request is rejected.

403

Unauthorized operation. The request is rejected.

404

The project does not exist. Retrieval failed.

Error Codes

See Error Codes.