查询预留网段列表
更新时间:2024-12-30
描述
查询预留网段列表。
请求结构
                Plain Text
                
            
            1GET /v{version}/subnet/ipreserve?subnetId={subnetId}&marker={marker}&maxKeys={maxKeys} HTTP/1.1   
2Host: bcc.bj.baidubce.com      
3Authorization: authorization string
            请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 | 
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号,当前取值为1 | 
| subnetId | String | 否 | Query参数 | 预留网段所属的子网ID | 
| marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 | 
| maxKeys | Integer | 否 | Query参数 | 每页包含的最大数量,最大数量不超过1000,缺省值为1000 | 
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| ipReserves | List<IpReserve> | 预留网段列表 | 
| marker | String | 标记查询的起始位置,若结果列表为空,此项不存在 | 
| isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页 | 
| nextMarker | String | 获取下一页所需要传递的marker值;当isTruncated为false时,该域不出现 | 
| maxKeys | Integer | 每页包含的最大数量 | 
请求示例
                Plain Text
                
            
            1GET /v1/subnet/ipreserve?subnetId=sbn-a4cikyt7756r&maxKeys=1 HTTP/1.1
2Host: bcc.bj.baidubce.com
3Content-Type: application/json;charset=UTF-8
4Authorization: bce-auth-v1/d5ee69bbe4ad11edbcaad95ed83571d3/2023-04-27T04:33:39Z/3600/host;x-bce-accesskey;x-bce-account;x-bce-client-ip;x-bce-date;x-bce-gateway-count;x-bce-request-id;x-bce-user-agent/35b8f22a90d56f2e69597139ae410687049a0f5f9b5914d6766413fab72187de
            返回示例
                Plain Text
                
            
            1HTTP/1.1 200 OK
2x-bce-request-id: a1dffaa1-ff55-4d12-baee-d4423f676d8a
3Date: Thu, 27 Apr 2023 04:33:39 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7   "marker": "",
8   "nextMarker": "ipr-7xp6wvzqpmhd",
9   "maxKeys": 1,
10   "isTruncated": true,
11   "ipReserves":[
12        {
13            "ipReserveId":"ipr-tqsbpf5hcvbp",
14            "subnetId":"sbn-a4cikyt7756r",
15            "ipCidr":"192.168.0.200/30",
16            "ipVersion":"4",
17            "description":"test",
18            "createdTime":"2023-04-27T03:44:38Z",
19            "updatedTime":"2023-04-27T03:45:38Z"
20        }
21    ]
22}
            