Queries destination-based routes and BGP routes of a VPN gateway.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
| Action | String | Yes | DescribeVpnRouteEntries | The operation that you want to perform. Set the value to DescribeVpnRouteEntries. |
| RegionId | String | Yes | cn-hangzhou | The ID of the region where the VPN gateway is created. You can call the DescribeRegions operation to query the most recent region list. |
| VpnGatewayId | String | Yes | vpn-bp1cmw7jh1nfe43m9**** | The ID of the VPN gateway. |
| PageNumber | Integer | No | 1 | The number of the page to return. Default value: 1. |
| PageSize | Integer | No | 10 | The number of entries to return on each page. Maximum value: 50. Default value: 10. |
| RouteEntryType | String | No | custom | The route type. Valid values:
|
Response parameters
| Parameter | Type | Example | Description |
| PageSize | Integer | 10 | The number of entries per page. |
| RequestId | String | BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5 | The request ID. |
| PageNumber | Integer | 1 | The number of the returned page. |
| TotalCount | Integer | 1 | The total number of entries returned. |
| VpnRouteEntries | Array of VpnRouteEntry | The queried routes. |
|
| VpnRouteEntry | |||
| RouteEntryType | String | custom | The route type.
|
| NextHop | String | vco-bp1tui07ob10fmuro**** | The next hop of the route. |
| Weight | Integer | 100 | The weight of the destination-based route.
|
| RouteDest | String | 10.0.0.0/24 | The destination CIDR block of the route. |
| AsPath | String | 65501,65001,60011 | The AS path of the route. |
| State | String | normal | The status of the route. Valid values:
|
| CreateTime | Long | 1563874074000 | The time when the route entry was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
| Community | String | 65001:1000,65501:2000 | The route community value. |
| Source | String | CLOUD | The source of the route.
|
| VpnInstanceId | String | vpn-bp1cmw7jh1nfe43m9**** | The ID of the VPN gateway. |
| NextHopTunnelId | String | tun-36cfgpwjn58axj**** | The ID of the tunnel associated with the next hop. Note This parameter is returned only if the VPN gateway supports the dual-tunnel mode. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeVpnRouteEntries
&RegionId=cn-hangzhou
&VpnGatewayId=vpn-bp1a3kqjiiq9legfx****
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeVpnRouteEntriesResponse>
<PageSize>10</PageSize>
<RequestId>BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5</RequestId>
<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<VpnRouteEntries>
<RouteEntryType>custom</RouteEntryType>
<NextHop>vco-bp1tui07ob10fmuro****</NextHop>
<Weight>100</Weight>
<RouteDest>10.0.0.0/24</RouteDest>
<State>normal</State>
<CreateTime>1563874074000</CreateTime>
<VpnInstanceId>vpn-bp1cmw7jh1nfe43m9****</VpnInstanceId>
<NextHopTunnelId>tun-36cfgpwjn58axj****</NextHopTunnelId>
</VpnRouteEntries>
</DescribeVpnRouteEntriesResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : 10,
"RequestId" : "BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5",
"PageNumber" : 1,
"TotalCount" : 1,
"VpnRouteEntries" : [ {
"RouteEntryType" : "custom",
"NextHop" : "vco-bp1tui07ob10fmuro****",
"Weight" : 100,
"RouteDest" : "10.0.0.0/24",
"State" : "normal",
"CreateTime" : 1563874074000,
"VpnInstanceId" : "vpn-bp1cmw7jh1nfe43m9****",
"NextHopTunnelId" : "tun-36cfgpwjn58axj****"
} ]
}
Error codes
| HttpCode | Error code | Error message | Description |
| 403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | You are unauthorized to perform this operation on the specified resource. You can apply for the required permissions and try again. |
| 403 | Forbidden | User not authorized to operate on the specified resource. | You are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again. |
For a list of error codes, see Service error codes.