Queries all the ECS instances that are not imported to a cluster.

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

Request syntax

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

Request parameters

Parameter Type Required Example Description
NetworkMode Integer Yes 2

1: the classic network. 2: a virtual private cloud (VPC).

VpcId String No vpc-2zef6ob8****v8x3q46kp

VPC ID

Response parameters

Parameter Type Example Description
Code Integer 200

The returned code.

EcsEntityList Array

The returned Elastic Compute Service (ECS) instances.

EcsEntity
Cpu Integer 2

The number of CPUs.

Eip String ""

The elastic IP address (EIP) of the instance.

Expired Boolean false

Indicates whether the ECS instance has expired.

InnerIp String ""

The private IP address of the ECS instance.

InstanceId String i-2ze7s2v0b***********

The ID of the ECS instance.

InstanceName String worker-k8s-for-cs-c9dfa009a5e7c4faab2010b87cae4****

The name of the ECS instance.

Mem Integer 4096

The amount of memory. Unit: byte.

PrivateIp String 192.16*.*.**

The private IP address of the ECS instance.

PublicIp String ""

The public IP address of the ECS instance.

RegionId String cn-beijing

The ID of the region where the ECS instance was deployed.

Status String Running

The status of the ECS instance.

VpcId String vpc-2zef6ob8mrlzv8x3q****

VPC ID

VpcName String test

The name of the VPC.

Message String success

The returned message.

RequestId String b197-40ab-9155-****

The unique ID of the request.

Examples

Sample requests

GET /pop/v5/resource/ecs_not_in_cluster HTTP/1.1
Common request parameters
{
  "NetworkMode": 2
}

Sample success responses

XML format

<Message>success</Message>
<EcsEntityList>
    <EcsEntity>
        <Status> Running</Status>
        <VpcName>jianwei-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>jianwei-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": "jianwei-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": "jianwei-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.