全部產品
Search
文件中心

VPN Gateway:DescribeVcoRouteEntries - 查詢IPsec串連下路由條目的資訊

更新時間:Apr 27, 2026

調用DescribeVcoRouteEntries介面查詢IPsec串連下路由條目的資訊。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

IPsec 串連所屬的地區 ID。

您可以通過調用 DescribeRegions 介面擷取地區 ID。

cn-hangzhou

VpnConnectionId

string

IPsec 串連 ID。

vco-p0w2jpkhi2eeop6q6****

RouteEntryType

string

路由項目類型。取值:

  • custom(預設值):目的路由條目。

  • bgp:BGP 路由條目。

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:表示當前目的路由條目發行至轉寄路由器執行個體中。

  • Active:表示當前 BGP 路由條目可用。

published

RouteEntryType

string

路由項目類型。

  • custom:表示當前路由條目為目的路由條目。

  • bgp:表示當前路由條目為 BGP 路由條目。

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:表示當前 BGP 路由條目是 IPsec 串連通過轉寄路由器學習到的。

  • VPN_BGP:表示當前 BGP 路由條目是 IPsec 串連從本機資料中心學習到的。

CLOUD

NextHopTunnelIdList

array

下一跳隧道列表。

說明
  • 僅雙隧道模式的 IPsec 串連會返回該資訊。

  • 僅隧道狀態為第二階段協商成功時,介面才會返回隧道資訊。

string

隧道 ID。

tun-0jothw962cp3bvhbw****

RequestId

string

請求 ID。

E18980E8-C8C2-31BD-8156-AE2BBDEC87E1

VpnRouteCounts

array<object>

雙隧道模式 IPsec 串連的路由條目統計資訊。

說明

僅雙隧道模式的 IPsec 串連會返回該組資訊。

object

路由條目統計資訊。

RouteEntryType

string

路由項目類型。

  • custom:目的路由條目。

  • bgp:BGP 路由條目。

bgp

RouteCount

integer

路由條目數量。

3

Source

string

BGP 路由條目的來源。

  • CLOUD:表示當前 BGP 路由條目是 IPsec 串連通過轉寄路由器學習到的。

  • VPN_BGP:表示當前 BGP 路由條目是 IPsec 串連從本機資料中心學習到的。

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. 指定的路由項目類型不合規範。
400 Vco.StatusNotSupport The current VPN connection state does not support this operation. 當前的執行個體狀態不支援該操作
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. 您沒有許可權操作指定資源,請申請許可權後再操作。
404 InvalidVpnConnectionInstanceId.NotFound The specified vpn connection instance id does not exist. 指定的VPN串連不存在,請您檢查該VPN串連ID是否正確。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情