调用DescribeVpnRouteEntries接口查询VPN网关实例的目的路由条目信息和BGP路由条目信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeVpnRouteEntries |
系统规定参数。取值:DescribeVpnRouteEntries。 |
RegionId | String | 是 | cn-hangzhou |
VPN网关实例所在的地域ID。 您可以通过调用DescribeRegions接口获取地域ID。 |
VpnGatewayId | String | 是 | vpn-bp1cmw7jh1nfe43m9**** |
VPN网关的实例ID。 |
PageNumber | Integer | 否 | 1 |
列表的页码。默认值:1。 |
PageSize | Integer | 否 | 10 |
分页查询时每页的行数。最大值:50。默认值:10。 |
RouteEntryType | String | 否 | System |
路由条目的类型。取值:
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
PageSize | Integer | 10 |
分页查询时每页的行数。 |
RequestId | String | BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5 |
请求ID。 |
PageNumber | Integer | 1 |
列表的页码。 |
TotalCount | Integer | 1 |
列表总条目数。 |
VpnRouteEntries | Array of VpnRouteEntry |
路由条目信息列表。 |
|
VpnRouteEntry | |||
RouteEntryType | String | System |
路由条目的类型。取值:
|
NextHop | String | vco-bp1tui07ob10fmuro**** |
路由条目的下一跳。 |
Weight | Integer | 100 |
路由条目的权重值。取值:0或100。
|
RouteDest | String | 10.0.0.0/24 |
路由条目的目标网段。 |
AsPath | String | 65501,65001,60011 |
路由条目经过的AS路径。 |
State | String | normal |
路由条目的状态。取值:
|
CreateTime | Long | 1563874074000 |
创建路由条目的时间戳。 |
Community | String | 65001:1000,65501:2000 |
路由条目的Community属性值。 |
Source | String | 192.168.10.0/24 |
路由条目的源网段。 |
VpnInstanceId | String | vpn-bp1cmw7jh1nfe43m9**** |
VPN网关实例ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeVpnRouteEntries
&RegionId=cn-hangzhou
&VpnGatewayId=vpn-bp1a3kqjiiq9legfx****
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeVpnRouteEntriesResponse>
<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<VpnRouteEntries>
<VpnRouteEntry>
<RouteDest>10.0.0.0/24</RouteDest>
<VpnInstanceId>vpn-bp1cmw7jh1nfe43m9****</VpnInstanceId>
<State>normal</State>
<Weight>100</Weight>
<CreateTime>1563874074000</CreateTime>
<NextHop>vco-bp1tui07ob10fmuro****</NextHop>
</VpnRouteEntry>
</VpnRouteEntries>
<PageSize>10</PageSize>
<RequestId>BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5</RequestId>
</DescribeVpnRouteEntriesResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageNumber" : 1,
"TotalCount" : 1,
"VpnRouteEntries" : {
"VpnRouteEntry" : [ {
"RouteDest" : "10.0.0.0/24",
"VpnInstanceId" : "vpn-bp1cmw7jh1nfe43m9****",
"State" : "normal",
"Weight" : 100,
"CreateTime" : 1563874074000,
"NextHop" : "vco-bp1tui07ob10fmuro****"
} ]
},
"PageSize" : 10,
"RequestId" : "BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
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. | 您没有权限操作指定资源,请申请权限后再操作。 |
访问错误中心查看更多错误码。