查询路由条目
更新时间:2024-12-27
描述
查询指定云智能网路由表的路由条目。
请求结构
Plain Text
1GET /v{version}/csn/routeTable/{csnRtId}/rule?marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: csn.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号,当前取值1 |
csnRtId | String | 是 | URL参数 | 云智能网路由表的ID |
marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
maxKeys | Integer | 否 | Query参数 | 每页包含的最大数量,最大数量不超过1000。缺省值为1000 |
返回头域
除公共头域外,无其他特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
csnRtRules | List <CsnRtRule> | 路由条目列表 |
marker | String | 标记查询的起始位置,若结果列表为空,此项不存在 |
isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页 |
nextMarker | String | 获取下一页所需要传递的marker值;当isTruncated为false时,该域不出现 |
maxKeys | Integer | 每页包含的最大数量 |
请求示例
Plain Text
1GET /v1/csn/routeTable/csnRt-w3x16fk8nr5kpxkx/rule?marker=csnrr-IyWRnII7&maxKeys=1 HTTP/1.1
2Host: csn.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
返回示例
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Thu, 16 Mar 2017 06:29:48 GMT
4Server: BWS
5{
6 "nextMarker": "csnrr-IyWRn123",
7 "marker": "csnrr-IyWRnII7",
8 "maxKeys": 1,
9 "isTruncated": true,
10 "csnRtRules": [
11 {
12 "ruleId": "cnrr-1db26d78-1781",
13 "routeType": "propagated",
14 "csnId": "csn-m3dwj6tfysnmxmcy",
15 "csnRtId": "csnRt-w3x16fk8nr5kpxkx",
16 "description": null,
17 "fromAttachId": "tgwAttach-wg3z1z5baq3ry1a6",
18 "status": "conflicted",
19 "sourceAddress": null,
20 "destAddress": "192.168.0.0/20",
21 "nextHopId": "vpc-fh43ygs8yp0d",
22 "nextHopName": "默认私有网络",
23 "nextHopRegion": "su",
24 "nextHopType": "vpc",
25 "asPath": "",
26 "community": "",
27 "blackHole": false
28 }
29 ]
30}