功能介绍
本接口用于查看专属宿主机上的云主机列表信息。
URL
URL构造方法如下:
|
请求方法 |
URI |
|---|---|
|
GET |
/api/v2/dedicatedHost/hosts/{dedicatedHostId}/servers |
请求消息
请求头
|
参数名称 |
参数值 |
|---|---|
|
Content-Type |
application/json |
请求参数
|
参数名称 |
是否必须 |
参数类型 |
参数描述 |
|---|---|---|---|
|
region |
是 |
String |
可用区 |
|
page |
否 |
Integer |
分页起始页 |
|
size |
否 |
Integer |
分页大小,默认为10 |
|
dedicatedHostId |
是 |
String |
专属宿主机id |
请求参考示例
请求URL:
https://api-beijing-1.cmecloud.cn:8443/api/v2/dedicatedHost/hosts/1544397e455f4f2a85a8ebeaea311177/servers?Version=2016-12-05&AccessKey=a9c86502c65a48a3a1de0729d62f329f&Timestamp=2021-04-06T10:27:24Z&Signature=0c9b61847bca85eb9a524ea93915b326d40c960b&SignatureMethod=HmacSHA1&SignatureNonce=4162&SignatureVersion=V2.0®ion=RegionOne响应消息
响应头
|
参数名称 |
参数描述 |
|---|---|
|
Content-Type |
返回内容的MIME类型 |
响应参数
|
参数名称 |
参数类型 |
参数描述 |
|---|---|---|
|
serverId |
String |
云主机ID |
|
serverName |
String |
云主机名称 |
|
vcpu |
Integer |
云主机vCPU核数 |
|
vmemory |
Integer |
云主机内存容量 |
|
vdisk |
Integer |
云主机系统盘容量 |
|
dedicatedHostId |
String |
云主机所属专属宿主机ID |
|
keypairName |
String |
云主机密钥对名称 |
|
status |
Integer |
云主机状态 1ACTIVE 2BUILD 3REBUILD 4SUSPENDED 5PAUSED 6RESIZE 7VERIFY_RESIZE 8REVERT_RESIZE 9PASSWORD 10REBOOT 11HARD_REBOOT 12DELETED 13UNKNOWN 14ERROR 15STOPPED 16SHUTOFF 17MIGRATING |
|
imageId |
String |
云主机系统镜像ID |
|
imageName |
String |
云主机系统镜像名称 |
|
flavorId |
String |
云主机规格ID |
|
systemDiskId |
String |
云主机系统盘ID |
|
createdTime |
String |
云主机创建时间 |
|
serverType |
String |
云主机类型 |
|
ports |
|
|
|
ports.privateIp |
String |
内网ip |
|
ports.fipAddress |
String |
公网IP地址 |
|
ports.fipV6Address |
String |
公网IP v6地址 |
|
ports.fipBandwidthSize |
String |
带宽大小 |
|
ports.portId |
String |
portId |
|
ports.portName |
String |
portName |
|
ports.fixedIpDetailResps |
|
|
|
ports.fixedIpDetailResps.ipAddress |
String |
内网ip |
|
ports.fixedIpDetailResps.ipVersion |
String |
ipVersion,v4或v6 |
|
ports.fixedIpDetailResps.publicIP |
String |
公网IP |
|
ports.fixedIpDetailResps.bandwidthSize |
String |
公网IP 带宽Mb |
|
ports.fixedIpDetailResps.bandwidthType |
String |
带宽类型 |
|
ports.fixedIpDetailResps.ipv6BandwidthSize |
String |
IPv6带宽值Mb |
|
ports.fixedIpDetailResps.subnetId |
String |
子网ID |
|
ports.fixedIpDetailResps.subnetName |
String |
子网Name |
|
ports.vpcName |
String |
vpc名称 |
|
ports.routerId |
String |
routerId |
|
ports.subnetName |
String |
子网名称 |
响应参考示例
{
"state": "OK",
"body": {
"total": 1,
"content": [
{
"serverId": "02e49149-0009-4562-8763-9e2b88d61782",
"serverName": "test0330",
"vcpu": 1,
"vmemory": 1024,
"vdisk": 20,
"dedicatedHostId": "",
"status": "OK",
"imageId": "27966b7d-1515-47ba-82c0-4e19823fb67e",
"imageName": "BC-Linux-Pass7.5-64bit",
"flavorId": "22c6fe32-4c6c-40c1-bb58-3bd0bc7a2a87",
"systemDiskId": "52088999-eb1c-41d3-b4e2-1671c56c0014",
"createdTime": "2021-03-30 17:28:58",
"serverType": "VM",
"ports": [
{
"privateIp": "10.101.2.4",
"fipAddress": null,
"fipV6Address": null,
"fipBandwidthSize": null,
"portId": "a5e60881-4b1a-4d91-b203-3e2a01951dc1",
"portName": "port088382",
"fixedIpDetailResps": [
{
"ipAddress": "10.101.2.4",
"ipVersion": 4,
"publicIP": null,
"bandwidthSize": null,
"bandwidthType": null,
"ipv6BandwidthSize": null,
"subnetId": "e02b3e4d-4eb3-4074-b23a-c0db119d139e",
"subnetName": "lan_subnet"
}
],
"vpcName": "vpcByApi",
"routerId": "7b5f26cb-41cf-4765-9a6b-87a399d654f1",
"subnetName": "lan_subnet"
}
]
}
]
},
"requestId": "928c085a-f8be-47a3-a036-062e12e7e815"
}