获取路由规则列表
更新时间:2022-12-06
接口描述
本接口用于获取路由规则列表。
请求结构
Plain Text
1 GET /v1/route/rule/list/{tableId}?pageNo={pageNo}&pageSize={pageSize}&tableId={tableId} HTTP/1.1
2 Host: bec.baidubce.com
3 Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
tableId | String | 否 | URL参数 | 路由表ID |
pageNo | Integer | 否 | Query参数 | 页数,缺省值为1 |
pageSize | Integer | 否 | Query参数 | 每页路由表个数,取值范围为1~1000,缺省值为1000 |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
result | List<RouteRuleVo> | 列表数据 |
orderBy | String | 排序字段 |
order | String | 排序顺序 |
pageNo | Integer | 页码 |
pageSize | Integer | 每页结果数 |
totalCount | Integer | 结果总数 |
请求示例
Plain Text
1 GET /v1/route/rule/list/rtb-bkqgpmrl HTTP/1.1
2 Host: bec.baidubce.com
3 Authorization: authorization string
返回示例
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50
3 Date: Thu, 16 Mar 2021 06:29:48 GMT
4 Content Type: application/json;charset=UTF 8
5 Server: BWS
6 {
7 "result": [
8 {
9 "ruleId": "rtr-bpjmagau",
10 "status": "ready",
11 "tableId": "rtb-bkqgpmrl",
12 "ipVersion": 4,
13 "sourceAddress": "192.168.0.0/16",
14 "destinationAddress": "172.16.3.0/24",
15 "routeType": "CUSTOM",
16 "nexthop": "vm-0hlzfjgh-1-m-hangzhou-hh97p",
17 "description": "default"
18 }
19 ],
20 "orders": null,
21 "orderBy": "createTime",
22 "order": "desc",
23 "pageNo": 1,
24 "pageSize": 1000,
25 "totalCount": 1
26 }
27
Model对象定义
RouteRuleVo
参数名称 | 类型 | 描述 |
---|---|---|
ruleId | String | 路由规则ID |
status | String | 路由规则状态(creating、ready、deleting、timeout) |
tableId | String | 路由表ID |
ipVersion | Integer | 网段类型 |
sourceAddress | String | 源网段 |
destinationAddress | String | 目标网段 |
routeType | RouteType | 路由类型(CUSTOM、SYSTEM、HAVIP) |
nexthop | String | 下一跳ID |
description | String | 描述 |