查询可关机不计费的实例列表
更新时间:2024-07-02
该接口用于查询所有符合关机不计费条件的实例的详细信息,以下6种实例不支持关机不计费:
- 预付费计费实例
- 带本地盘的实例(本地SSD型 & 大数据型)
- 异构实例:(GPU云服务器(部分)&FPGA云服务器)
- DCC专属实例
- 抢占实例
- 非运行状态的实例
- ica2/ca2/ga2/ma2规格族实例
- EBC裸金属实例
请求结构
GET /v{version}/instance/noCharge?marker={marker}&maxKeys={maxKeys}&internalIp={internalIp}&keypairId={keypairId}&zoneName={zoneName} HTTP/1.1
Host: bcc.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号 |
marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
maxKeys | int | 否 | Query参数 | 每页包含的最大数量,最大数量通常不超过1000。缺省值为1000 |
internalIp | String | 否 | Query参数 | 内网ip |
keypairId | String | 否 | Query参数 | 密钥对id |
zoneName | String | 否 | Query参数 | 可用区名称,如:cn-bj-a |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
marker | String | 标记查询的起始位置 |
isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页 |
nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 |
maxKeys | int | 每页包含的最大数量 |
instances | List<InstanceModel> | 实例信息,由 InstanceModel 组成的集合 |
请求示例
GET /v2/instance/noCharge?marker=i-ED2BiZR7&maxKeys=1 HTTP/1.1
Host: bcc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
返回示例
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": "i-ED2BiZR7",
"isTruncated": true,
"nextMarker": "i-15lNKlWp",
"maxKeys": 1,
"instances": [
{
"id": "i-ED2BiZR7",
"name": "test-name",
"hostname": "hostname",
"instanceType": "N6",
"status": "Running",
"desc": "",
"paymentTiming": "Postpaid",
"createTime": "2023-11-16T08:37:09Z",
"internalIp": "192.168.0.11",
"publicIp": "",
"cpuCount": 1,
"isomerismCard": "",
"cardCount": "0",
"memoryCapacityInGB": 4,
"localDiskSizeInGB": 0,
"imageId": "m-6TqSR4r0",
"placementPolicy": "unknown",
"subnetId": "sbn-1rg9fb0caqq3",
"vpcId": "vpc-5mbbq0mx2a1n",
"zoneName": "cn-bj-a",
"dedicatedHostId": "",
"nicInfo": {
"eniId": "eni-mhegdfrq4337",
"eniUuid": "712b244b-6ae7-4cb9-9668-ffa62323f449",
"name": "eth0",
"type": "primary",
"subnetId": "cfb112c1-9c7f-4be3-aafb-beb94a36ac31",
"subnetType": "BCC",
"az": "zoneA",
"description": "",
"deviceId": "8d67c5ae-e1e2-4771-8aae-d3d056dada0b",
"status": "inuse",
"macAddress": "fa:f6:00:11:f2:d9",
"vpcId": "ca0327d6-ddb8-4bea-a58c-abf21947c1e7",
"createdTime": "Thu Nov 16 16:37:10 UTC 2023",
"eniNum": 0,
"ips": [
{
"privateIp": "192.168.0.11",
"eip": "null",
"primary": "true",
"eipId": "",
"eipAllocationId": "",
"eipSize": "0",
"eipStatus": "",
"eipGroupId": "",
"eipType": "null"
}
],
"securityGroups": [
"g-rrza83kb8wkw"
]
},
"eniNum": "0",
"tags": [
{
"tagKey": "默认项目",
"tagValue": ""
}
],
"networkCapacityInMbps": 0
}
]
}