获取所有未导入集群的 ECS

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

请求语法

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

请求参数

名称 类型 是否必选 示例值 描述
NetworkMode Integer 2

VPC 网络(2)或经典网络(1)

VpcId String vpc-2zef6ob8****v8x3q46kp

VPC ID

返回数据

名称 类型 示例值 描述
Code Integer 200

Code 码

EcsEntityList Array

ECS列表

EcsEntity
Cpu Integer 2

CPU 核数

Eip String “”

实例弹性公网 IP

Expired Boolean false

是否过期

InnerIp String “”

实例内网 IP

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

实例 ID

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

实例名称

Mem Integer 4096

内存大小(B)

PrivateIp String 192.16*.*.**

实例私网 IP

PublicIp String “”

实例公网 IP

RegionId String cn-beijing

区域 ID

Status String Running

实例状态

VpcId String vpc-2zef6ob8mrlzv8x3q****

VPC ID

VpcName String test

VPC 名称

Message String success

信息

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

请求唯一ID

示例

请求示例

GET /pop/v5/resource/ecs_not_in_cluster HTTP/1.1
公共请求头
{
  "NetworkMode": 2
}

正常返回示例

XML 格式

<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 格式

{
	"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
}

错误码

访问错误中心查看更多错误码。