查询TGW路由条目
更新时间:2024-12-27
描述
查询指定TGW的路由条目。
请求结构
Plain Text
1GET /v{version}/csn/{csnId}/tgw/{tgwId}/rule?marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: csn.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号,当前取值1 |
csnId | String | 是 | URL参数 | 云智能网的ID |
tgwId | String | 是 | URL参数 | TGW的ID |
marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
maxKeys | Integer | 否 | Query参数 | 每页包含的最大数量,最大数量不超过1000,缺省值为1000 |
返回头域
除公共头域外,无其他特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
tgwRtRules | List <TgwRtRule> | TGW路由条目列表 |
marker | String | 标记查询的起始位置,若结果列表为空,此项不存在 |
isTruncated | Boolean | true表示后面还有数据,false表示已经是最后一页 |
nextMarker | String | 获取下一页所需要传递的marker值;当isTruncated为false时,该域不出现 |
maxKeys | Integer | 每页包含的最大数量 |
请求示例
Plain Text
1GET /v1/csn/csn-c5s0isempeiscgyc/tgw/tgw-2vz7tre06hxei9rj/rule?marker=tgw-qhxx0kmm0t86vmpk&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
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7 "nextMarker": "tgw-jkxx0kmm0t86vkfk",
8 "marker": "tgw-qhxx0kmm0t86vmpk",
9 "maxKeys": 1,
10 "isTruncated": true,
11 "tgwRtRules": [
12 {
13 "ruleId": "cnrr-1db26d78-1781",
14 "routeType": "custom",
15 "csnId": "csn-m3dwj6tfysnmxmcy",
16 "csnRtId": "csnRt-w3x16fk8nr5kpxkx",
17 "fromAttachId": "tgwAttach-wg3z1z5baq3ry1a6",
18 "status": "conflicted",
19 "destAddress": "192.168.0.0/20",
20 "nextHopId": "vpc-fh43ygs8yp0d",
21 "nextHopName": "默认私有网络",
22 "nextHopRegion": "su",
23 "nextHopType": "vpc",
24 "asPath": "",
25 "community": "",
26 "blackHole": false
27 }
28 ]
29}