查询弹性保障
更新时间:2026-10-20
该接口用于查询弹性保障列表信息。
API Explorer
去调试
您可以在 API Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,API Explorer 可以自动生成 SDK 代码示例。
请求结构
Plain Text
1 POST /v{version}/instance/elasticityAssurance/list HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
4
5 {
6 "elasticityAssuranceIds" : [elasticityAssuranceId],
7 "elasticityAssuranceName" : elasticityAssuranceName,
8 "zoneName" : zoneName,
9 "status" : status,
10 "spec" : spec,
11 "marker" : marker,
12 "maxKeys" : maxKeys
13 }
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号 |
| marker | String | 否 | RequestBody参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
| maxKeys | int | 否 | RequestBody参数 | 每页包含的最大数量,最大数量通常不超过1000,缺省值为1000 |
| elasticityAssuranceIds | List<String> | 否 | RequestBody参数 | 弹性保障的id集合 |
| elasticityAssuranceName | String | 否 | RequestBody参数 | 弹性保障的名称 |
| zoneName | String | 否 | RequestBody参数 | 可用区,例如:cn-bj-a |
| spec | String | 否 | RequestBody参数 | 实例规格,例如:bcc.g4.c2m8 |
| status | List<String> | 否 | RequestBody参数 | 弹性保障状态,可选值:CREATING/ACTIVE |
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| marker | String | 标记查询的起始位置 |
| maxKeys | int | 每页包含的最大数量 |
| nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 |
| isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页 |
| elasticityAssurances | List<ElasticityAssuranceModel> | 弹性保障信息,由 ElasticityAssuranceModel 组成的集合 |
错误码
| 错误码 | 错误描述 | HTTP状态码 | 中文解释 |
|---|---|---|---|
| BadRequest | request is invalid | 400 | 请求参数无效 |
请求示例
Plain Text
1 POST /v2/instance/elasticityAssurance/list HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4
5 {
6 "elasticityAssuranceIds" : [
7 "ea-xxxxxxxx"
8 ],
9 "elasticityAssuranceName" : "test-ea",
10 "zoneName": "cn-bj-a",
11 "spec": "bcc.g4.c2m8"
12 }
返回示例
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Date: Wed, 03 Dec 2014 06:42:19 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
6
7 {
8 "marker": "",
9 "maxKeys": 1000,
10 "isTruncated": false,
11 "elasticityAssurances": [
12 {
13 "elasticityAssuranceId": "ea-xxxxxxxx",
14 "elasticityAssuranceName": "test-ea",
15 "productType": "postpay",
16 "spec": "bcc.g4.c2m8",
17 "status": "ACTIVE",
18 "zoneName": "cn-bj-a",
19 "assuranceMode": "OPEN",
20 "capacity": 10,
21 "usedCapacity": 1,
22 "availableCapacity": 9,
23 "createTime": "2026-05-18T06:33:34Z",
24 "expireTime": "2026-06-18T06:34:57Z",
25 "autoRenew": false,
26 "autoRenewPeriod": null,
27 "tags": [
28 {
29 "tagKey": "env",
30 "tagValue": "test"
31 }
32 ],
33 "instances": [
34 {
35 "instanceId": "i-yyyyyyyy",
36 "name": "instance-01",
37 "logicalZone": "cn-bj-a",
38 "spec": "bcc.g4.c2m8",
39 "paymentTiming": "Postpaid",
40 "status": "Running"
41 }
42 ]
43 }
44 ]
45 }
评价此篇文章
