Obtain all ECS instances that have not been imported to the cluster.
Debugging
Request header
Request syntax
GET /pop/v5/resource/ecs_not_in_cluster HTTPS|HTTP
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
NetworkMode | Integer | Yes | 2 |
VPC (2) or classic network (1) |
VpcId | String | No | vpc-2zef6ob8****v8x3q46kp |
VPC ID |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | Integer | 200 |
Code |
EcsEntityList | Array |
ECS instances |
|
EcsEntity | |||
Cpu | Integer | 2 |
The number of CPUs in the instances where the application is deployed. |
Eip | String | “” |
Public elastic IP (EIP) of an instance |
Expired | Boolean | false |
Indicates whether the returned SLB instance has expired. |
InnerIp | String | “” |
Internal IP address of the instance |
InstanceId | String | i-2ze7s2v0b*********** |
The ID of the instance. |
Instancename | String | worker-k8s-for* |
Instance Name |
Mem | Integer | 4096 |
Memory size (B) |
PrivateIp | String | 192.XX.XX.123 |
Private IP address |
PublicIp | String | “” |
Public IP address of the instance |
RegionId | String | cn-beijing |
The zone ID. |
Status | String | Running |
instance status |
VpcId | String | vpc-2zef6ob8mrl**** |
VPC ID |
VpcName | String | test |
Name of VPC |
Message | String | success |
The returned message. |
RequestId | String | b197-40ab-9155 |
The ID of the request. |
Examples
Sample requests
GET /pop/v5/resource/ecs_not_in_cluster HTTP/1.1
Common request header
{
"NetworkMode": 2
}
Sample success responses
XML
format
<Message>success</Message>
<EcsEntityList>
<EcsEntity>
<Status> Running</Status>
<VpcName>test</VpcName>
<Cpu>2</Cpu>
<InnerIp/>
<Mem>4096</Mem>
<RegionId>cn-beijing</RegionId>
<Expired>false</Expired>
<InstanceId>i-2ze7s2v0b789k60p****</InstanceId>
<PrivateIp>192.168.0.86</PrivateIp>
<Eip/>
<VpcId>vpc-2zef6ob8mrlzv8x3q****</VpcId>
<InstanceName>worker-k8s-for-cs-c9dfa009a5e7c4faab2010b87cae4****</InstanceName>
</EcsEntity>
<EcsEntity>
<Status> Running</Status>
<VpcName>test</VpcName>
<Cpu>2</Cpu>
<InnerIp/>
<Mem>4096</Mem>
<RegionId>cn-beijing</RegionId>
<Expired>false</Expired>
<InstanceId>i-2ze7s2v0b789k60p****</InstanceId>
<PrivateIp>192.168.0.87</PrivateIp>
<Eip/>
<VpcId>vpc-2zef6ob8mrlzv8x3q****</VpcId>
<InstanceName>worker-k8s-for-cs-c9dfa009a5e7c4faab2010b87cae4****</InstanceName>
</EcsEntity>
</EcsEntityList>
<Code>200</Code>
JSON
format
{
"Message": "success",
"EcsEntityList": {
"EcsEntity": [
{
"Status": "Running",
"VpcName": "test",
"Cpu": 2,
"InnerIp": "",
"Mem": 4096,
"RegionId": "cn-beijing",
"Expired": false,
"InstanceId": "i-2ze7s2v0b789k60p****",
"PrivateIp": "192.168.0.86",
"Eip": "",
"VpcId": "vpc-2zef6ob8mrlzv8x3q****",
"InstanceName": "worker-k8s-for-cs-c9dfa009a5e7c4faab2010b87cae4****"
},
{
"Status": "Running",
"VpcName": "test",
"Cpu": 2,
"InnerIp": "",
"Mem": 4096,
"RegionId": "cn-beijing",
"Expired": false,
"InstanceId": "i-2ze7s2v0b789k60p****",
"PrivateIp": "192.168.0.87",
"Eip": "",
"VpcId": "vpc-2zef6ob8mrlzv8x3q****",
"InstanceName": "worker-k8s-for-cs-c9dfa009a5e7c4faab2010b87cae4****"
}
]
},
"Code": 200
}
Error codes
For a list of error codes, visit the API Error Center.