查询多个实例详情
更新时间:2024-07-02
根据多个实例ID来查询多个实例详情。
请求结构
POST /v{version}/instance/listByInstanceId HTTP/1.1
Host: bcc.bj.baidubce.com
Authorization: authorization string
{
"instanceIds": ["instanceId",""]
}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号 |
instanceIds | Array | 是 | RequestBody参数 | 实例id数组 |
marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
maxKeys | int | 否 | Query参数 | 每页包含的最大数量,最大数量通常不超过1000,缺省值为1000。 |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
marker | String | 标记查询的起始位置 |
isTruncated | boolean | true表示后面还有数据,false表示已经是最后一页 |
nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 |
maxKeys | int | 每页包含的最大数量 |
instances | List<InstanceModel> | 实例信息,由 InstanceModel 组成的集合 |
请求示例
POST /v2/instance/listByInstanceId
Host: bcc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"instanceIds":["i-5polAZSW","i-q490RD6t"]
}
返回示例
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2014 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"marker": "",
"isTruncated": false,
"maxKeys": 1000,
"instances": [{
"id": "i-cZbnhO0B",
"serialNumber": "1060b348-b9e4-4940-baa6-fd9f300fc566",
"hostId": "h-gHBSWl6i2Cq5rIynq2ngw",
"rackId": "rk-10iVdnFTv5xYMmArVurhw",
"switchId": "sw-Jew0Mc0xnIjBz26wFLT4RA",
"deploysetId": "dset-qrE9FWAR",
"deploysetList": [{
"deploysetId": "dset-qrE9FWAR",
"name": "name",
"concurrency": 1,
"strategy": "HOST_HA"
}],
"name": "instance-r6337ue1-1",
"hostname": "instance-r6337ue1-1",
"instanceType": "E1",
"status": "Running",
"desc": "",
"createdFrom": "customPurchase",
"paymentTiming": "Postpaid",
"createTime": "2024-06-26T11:42:01Z",
"internalIp": "192.168.64.65",
"publicIp": "",
"cpuCount": 2,
"isomerismCard": "",
"cardCount": "0",
"npuVideoMemory": "",
"memoryCapacityInGB": 2,
"localDiskSizeInGB": 0,
"imageId": "m-H2E8PurP",
"placementPolicy": "unknown",
"subnetId": "sbn-yfxhv6b0sxy4",
"vpcId": "vpc-nys8a7qhzdrs",
"zoneName": "cn-bj-d",
"repairStatus": "normal",
"dedicatedHostId": "",
"ipv6": "240c:4081:8005:ca01::14",
"eniQuota": 2,
"eriQuota": 0,
"serviceComponents": {
"hasAlive": "notSupport"
},
"nicInfo": {
"eniId": "eni-kgm8hqvsp6a3",
"eniUuid": "96f54c86-15f6-4d2b-b63b-1a94c6dfd194",
"name": "eth0",
"type": "primary",
"subnetId": "058855bc-fbcb-4003-b5c4-18f19d47e68b",
"subnetType": "BCC",
"az": "zoneD",
"description": "",
"deviceId": "1060b348-b9e4-4940-baa6-fd9f300fc566",
"status": "inuse",
"macAddress": "fa:20:20:33:e8:8f",
"vpcId": "3c63adcf-2b76-4a3b-82cf-04b8e36051df",
"createdTime": "Wed Jun 26 19:42:02 UTC 2024",
"eniNum": 0,
"ips": [{
"privateIp": "192.168.64.65",
"eip": "null",
"primary": "true",
"eipId": "",
"eipAllocationId": "",
"eipSize": "0",
"eipStatus": "",
"eipGroupId": "",
"eipType": "null"
}],
"ipv6s": [{
"privateIp": "240c:4081:8005:ca01::14",
"eip": "null",
"primary": "false",
"eipId": "",
"eipAllocationId": "",
"eipSize": "0",
"eipStatus": "",
"eipGroupId": "",
"eipType": "null"
}],
"securityGroups": [
"g-37bb45gkyuat"
]
},
"eniNum": "0",
"tags": [{
"tagKey": "默认项目",
"tagValue": ""
}],
"networkCapacityInMbps": 0
}]
}