呼叫 DescribeVcoRouteEntries 介面查詢 IPsec 連線下路由項目的資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DescribeVcoRouteEntries |
list |
*VpnConnections
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
IPsec 連線所屬的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| VpnConnectionId |
string |
是 |
IPsec 連線 ID。 |
vco-p0w2jpkhi2eeop6q6**** |
| RouteEntryType |
string |
否 |
路由項目類型。取值:
|
custom |
| PageNumber |
integer |
否 |
清單的頁碼。預設值:1。 |
1 |
| PageSize |
integer |
否 |
分頁查詢時每頁的項目數。預設值:10。取值範圍:1~50。 |
10 |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 識別碼。每次 API 請求的 RequestId 不一樣。 |
123e4567-e89b-12d3-a456-4266**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| TotalCount |
integer |
清單項目數。 |
1 |
| PageNumber |
integer |
清單的頁碼。 |
1 |
| PageSize |
integer |
分頁查詢時每頁的項目數。 |
10 |
| VcoRouteEntries |
array<object> |
路由項目資訊清單。 |
|
|
object |
路由項目資訊。 |
||
| VpnConnectionId |
string |
IPsec 連線 ID。 |
vco-p0w2jpkhi2eeop6q6**** |
| RouteDest |
string |
路由項目的目標網段。 |
192.168.10.0/24 |
| NextHop |
string |
路由項目的下一跳。 |
vco-p0w2jpkhi2eeop6q6**** |
| Weight |
integer |
目的地路由項目的權重值。 說明
目前參數無實際作用。 |
100 |
| State |
string |
路由項目的狀態。
|
published |
| RouteEntryType |
string |
路由項目類型。
|
custom |
| CreateTime |
integer |
建立目的地路由項目的時間戳記。 時間戳記的格式採用 Unix 時間戳記,表示從格林威治時間 1970 年 01 月 01 日 00 時 00 分 00 秒至建立目的地路由項目時的總時長。 |
1658217008000 |
| AsPath |
string |
BGP 路由項目經過的自治系統號清單。 |
[12000] |
| Community |
string |
BGP 路由項目攜帶的 Community 值。 |
65535:65510 |
| Source |
string |
BGP 路由項目的來源。
|
CLOUD |
| NextHopTunnelIdList |
array |
下一跳通道清單。 說明
|
|
|
string |
通道 ID。 |
tun-0jothw962cp3bvhbw**** |
|
| RequestId |
string |
請求 ID。 |
E18980E8-C8C2-31BD-8156-AE2BBDEC87E1 |
| VpnRouteCounts |
array<object> |
雙通道模式 IPsec 連線的路由項目統計資訊。 說明
僅雙通道模式的 IPsec 連線會返回該組資訊。 |
|
|
object |
路由項目統計資訊。 |
||
| RouteEntryType |
string |
路由項目類型。
|
bgp |
| RouteCount |
integer |
路由項目數量。 |
3 |
| Source |
string |
BGP 路由項目的來源。
|
VPN_BGP |
樣本
正常返回樣本
JSON格式
{
"TotalCount": 1,
"PageNumber": 1,
"PageSize": 10,
"VcoRouteEntries": [
{
"VpnConnectionId": "vco-p0w2jpkhi2eeop6q6****",
"RouteDest": "192.168.10.0/24",
"NextHop": "vco-p0w2jpkhi2eeop6q6****",
"Weight": 100,
"State": "published",
"RouteEntryType": "custom",
"CreateTime": 1658217008000,
"AsPath": "[12000]",
"Community": "65535:65510",
"Source": "CLOUD",
"NextHopTunnelIdList": [
"tun-0jothw962cp3bvhbw****"
]
}
],
"RequestId": "E18980E8-C8C2-31BD-8156-AE2BBDEC87E1",
"VpnRouteCounts": [
{
"RouteEntryType": "bgp",
"RouteCount": 3,
"Source": "VPN_BGP"
}
]
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IllegalParam.RouteEntryType | The specified RouteEntryType is invalid. | 參數 RouteEntryType 不合法。 |
| 400 | Vco.StatusNotSupport | The current VPN connection state does not support this operation. | 目前該 VCO 狀態不支援進行修改、刪除等操作。 |
| 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. | EIP 不屬於目前呼叫者,請您檢查該 EIP 是否可被您呼叫。 |
| 404 | InvalidVpnConnectionInstanceId.NotFound | The specified vpn connection instance id does not exist. | 指定的 VPN 連線不存在,請您檢查該 VPN 連線 ID 是否正確。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。