调用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. | 指定的路由条目类型不合规范。 |
| 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是否正确。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。