呼叫 DescribeVpnRouteEntries 介面查詢 VPN 閘道執行個體的目的路由條目資訊和 BGP 路由條目資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DescribeVpnRouteEntries |
get |
*VpnGateway
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
VPN 閘道執行個體所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| VpnGatewayId |
string |
是 |
VPN 閘道的執行個體 ID。 |
vpn-bp1cmw7jh1nfe43m9**** |
| PageNumber |
integer |
否 |
列表的頁碼。預設值:1。 |
1 |
| PageSize |
integer |
否 |
分頁查詢時每頁的行數。最大值:50。預設值:10。 |
10 |
| RouteEntryType |
string |
否 |
路由條目的類型。取值:
|
custom |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| PageSize |
integer |
分頁查詢時每頁的行數。 |
10 |
| RequestId |
string |
請求 ID。 |
BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5 |
| PageNumber |
integer |
列表的頁碼。 |
1 |
| TotalCount |
integer |
列表總條目數。 |
1 |
| VpnRouteEntries |
object |
||
| VpnRouteEntry |
array<object> |
路由條目資訊列表。 |
|
|
object |
路由條目詳細資訊。 |
||
| RouteEntryType |
string |
路由條目的類型。
|
custom |
| NextHop |
string |
路由條目的下一跳。 |
vco-bp1tui07ob10fmuro**** |
| Weight |
integer |
目的路由的權重值。
|
100 |
| RouteDest |
string |
路由條目的目標網段。 |
10.0.0.0/24 |
| AsPath |
string |
路由條目經過的 AS 路徑。 |
65501,65001,60011 |
| State |
string |
路由條目的狀態。取值:
|
normal |
| CreateTime |
integer |
建立路由條目的時間戳記。 時間戳記的格式採用 Unix 時間戳記,表示從格林威治時間 1970 年 01 月 01 日 00 時 00 分 00 秒至建立路由條目時的總時間長度。 |
1563874074000 |
| Community |
string |
路由條目的 Community 屬性值。 |
65001:1000,65501:2000 |
| Source |
string |
BGP 路由條目的來源。
|
CLOUD |
| VpnInstanceId |
string |
VPN 閘道執行個體 ID。 |
vpn-bp1cmw7jh1nfe43m9**** |
| NextHopTunnelId |
string |
路由條目下一跳關聯的隧道 ID。 說明
僅支援雙隧道模式 IPsec-VPN 串連的 VPN 閘道執行個體會返回當前參數。 |
tun-36cfgpwjn58axj**** |
| VpnRouteCounts |
object |
||
| VpnRouteCount |
array<object> |
雙隧道模式 VPN 閘道執行個體的路由條目統計資訊。 說明
僅支援雙隧道模式 IPsec-VPN 連線的 VPN 閘道執行個體會返回該組資訊。 |
|
|
object |
路由條目的統計資訊。 |
||
| RouteEntryType |
string |
路由項目類型。
|
bgp |
| RouteCount |
integer |
路由條目數量。 |
3 |
| Source |
string |
BGP 路由條目的來源。
|
VPN_BGP |
樣本
正常返回樣本
JSON格式
{
"PageSize": 10,
"RequestId": "BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5",
"PageNumber": 1,
"TotalCount": 1,
"VpnRouteEntries": {
"VpnRouteEntry": [
{
"RouteEntryType": "custom",
"NextHop": "vco-bp1tui07ob10fmuro****",
"Weight": 100,
"RouteDest": "10.0.0.0/24",
"AsPath": "65501,65001,60011",
"State": "normal",
"CreateTime": 1563874074000,
"Community": "65001:1000,65501:2000",
"Source": "CLOUD",
"VpnInstanceId": "vpn-bp1cmw7jh1nfe43m9****",
"NextHopTunnelId": "tun-36cfgpwjn58axj****"
}
]
},
"VpnRouteCounts": {
"VpnRouteCount": [
{
"RouteEntryType": "bgp",
"RouteCount": 3,
"Source": "VPN_BGP"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IllegalParam.RouteEntryType | The specified "RouteEntryType" is invalid. | |
| 400 | InvalidVpnInstanceId.NotFound | The specified VPN was not found. | |
| 400 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | |
| 403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。