查询实例列表
更新时间:2024-09-25
接口描述
批量查询BCI实例列表。
请求结构
Plain Text
1GET /v{version}/instance HTTP/1.1
2Host: bci.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号,当前取值2。 |
keywordType | String | 否 | Query参数 | 查询关键字名称,取值范围:name、podId。 |
keyword | String | 否 | Query参数 | 查询关键字值。 |
marker | String | 否 | Query参数 | 表示下一个查询开始的marker。 说明:首次查询时无需设置该参数,后续查询的marker从返回结果中获取,返回结果中的marker为空表示没有下一个。 |
maxKeys | Integer | 否 | Query参数 | 每页包含的最大数量。 取值范围:[1, 1000]之间的正整数。 默认值:10 |
响应头域
除公共头域外,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
marker | String | 标记查询的起始位置 |
isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页 |
nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 |
maxKeys | Integer | 每页包含的最大数量 |
result | List<InstanceModel> | BCI实例信息列表 |
请求示例
Plain Text
1GET /v{version}/instance?maxKeys=5 HTTP/1.1
2Host: bci.bj.baidubce.com
3ContentType: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tue, 06 Sep 2016 10:08:44 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6
7{
8 "marker": "p-rpjlzbuu",
9 "isTruncated": true,
10 "nextMarker": "p-qsyvnuzg",
11 "maxKeys": 5,
12 "result": [
13 {
14 "instanceId": "p-rpjlzbuu",
15 "instanceName": "default-eni-test-558cfc6dfc-st8sg-1",
16 "status": "Running",
17 "zoneName": "",
18 "cpuType": "intel",
19 "gpuType": "",
20 "cpu": 0.25,
21 "memory": 0.5,
22 "bandwidthInMbps": 0,
23 "publicIp": "",
24 "internalIp": "192.168.64.157",
25 "createTime": "2023-03-02T05:55:43Z",
26 "updateTime": "2023-03-02T14:19:45Z",
27 "deleteTime": null,
28 "restartPolicy": "Always",
29 "tags": null
30 },
31 {
32 "instanceId": "p-iwafloba",
33 "instanceName": "default-eni-test-558cfc6dfc-qwcjq-1",
34 "status": "Running",
35 "zoneName": "",
36 "cpuType": "intel",
37 "gpuType": "",
38 "cpu": 0.25,
39 "memory": 0.5,
40 "bandwidthInMbps": 0,
41 "publicIp": "",
42 "internalIp": "192.168.64.88",
43 "createTime": "2023-03-02T05:55:43Z",
44 "updateTime": "2023-03-02T14:19:45Z",
45 "deleteTime": null,
46 "restartPolicy": "Always",
47 "tags": null
48 },
49 {
50 "instanceId": "p-7314w80l",
51 "instanceName": "default-eni-test-558cfc6dfc-lcztq-1",
52 "status": "Running",
53 "zoneName": "",
54 "cpuType": "intel",
55 "gpuType": "",
56 "cpu": 0.25,
57 "memory": 0.5,
58 "bandwidthInMbps": 0,
59 "publicIp": "",
60 "internalIp": "192.168.64.132",
61 "createTime": "2023-03-02T05:55:57Z",
62 "updateTime": "2023-03-02T14:19:45Z",
63 "deleteTime": null,
64 "restartPolicy": "Always",
65 "tags": null
66 },
67 {
68 "instanceId": "p-bk399zaw",
69 "instanceName": "default-eni-test-558cfc6dfc-hktl9-1",
70 "status": "Running",
71 "zoneName": "",
72 "cpuType": "intel",
73 "gpuType": "",
74 "cpu": 0.25,
75 "memory": 0.5,
76 "bandwidthInMbps": 0,
77 "publicIp": "",
78 "internalIp": "192.168.64.191",
79 "createTime": "2023-03-02T05:55:57Z",
80 "updateTime": "2023-03-02T14:19:45Z",
81 "deleteTime": null,
82 "restartPolicy": "Always",
83 "tags": null
84 },
85 {
86 "instanceId": "p-fhunfwdn",
87 "instanceName": "default-eni-test-558cfc6dfc-5fds8-1",
88 "status": "Running",
89 "zoneName": "",
90 "cpuType": "intel",
91 "gpuType": "",
92 "cpu": 0.25,
93 "memory": 0.5,
94 "bandwidthInMbps": 0,
95 "publicIp": "",
96 "internalIp": "192.168.64.85",
97 "createTime": "2023-03-02T05:55:57Z",
98 "updateTime": "2023-03-02T14:19:45Z",
99 "deleteTime": null,
100 "restartPolicy": "Always",
101 "tags": null
102 }
103 ]
104}