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
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID, which is used to identify a specific project. |
|
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
|
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. |
|
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. |
|
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. |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot