Queries the destination route entries and BGP route entries of a VPN gateway instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeVpnRouteEntries |
get |
*VpnGateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the VPN gateway instance. You can call the DescribeRegions operation to obtain the region ID. |
cn-hangzhou |
| VpnGatewayId |
string |
Yes |
The instance ID of the VPN gateway. |
vpn-bp1cmw7jh1nfe43m9**** |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries to return per page. Maximum value: 50. Default value: 10. |
10 |
| RouteEntryType |
string |
No |
The type of the route. Valid values:
|
custom |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries returned per page. |
10 |
| RequestId |
string |
The request ID. |
BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5 |
| TotalCount |
integer |
The total number of entries in the list. |
1 |
| VpnRouteCounts |
object |
||
| VpnRouteCount |
array<object> |
The route statistics for VPN gateway instances in dual-tunnel mode. Note
This information is returned only for VPN gateway instances that support IPsec-VPN connections in dual-tunnel mode. |
|
|
object |
The route statistics. |
||
| RouteCount |
integer |
The number of route entries. |
3 |
| RouteEntryType |
string |
The type of the route entry. Valid values:
|
bgp |
| Source |
string |
The source of the BGP route entry. Valid values:
|
VPN_BGP |
| VpnRouteEntries |
object |
||
| VpnRouteEntry |
array<object> |
The list of route entries. |
|
|
object |
The details of the route entry. |
||
| AsPath |
string |
The AS path that the route entry passes through. |
65501,65001,60011 |
| Community |
string |
The community attribute value of the route entry. |
65001:1000,65501:2000 |
| CreateTime |
integer |
The timestamp when the route entry was created. The timestamp is in the UNIX timestamp format, which indicates the total number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970. |
1563874074000 |
| NextHop |
string |
The next hop of the route entry. |
vco-bp1tui07ob10fmuro**** |
| NextHopTunnelId |
string |
The ID of the tunnel associated with the next hop of the route entry. Note
This parameter is returned only for VPN gateway instances that support IPsec-VPN connections in dual-tunnel mode. |
tun-36cfgpwjn58axj**** |
| PrefixListId |
string |
The instance ID of the prefix list. |
pl-m5estsqsdqwg88hjf**** |
| RouteDest |
string |
The destination CIDR block of the route entry. |
10.0.0.0/24 |
| RouteEntryType |
string |
The type of the route. Valid values:
|
custom |
| Source |
string |
The source of the BGP route entry. Valid values:
|
CLOUD |
| State |
string |
The status of the route entry. Valid values:
|
normal |
| VpnInstanceId |
string |
The instance ID of the VPN gateway. |
vpn-bp1cmw7jh1nfe43m9**** |
| Weight |
integer |
The weight of the destination route.
|
100 |
Examples
Success response
JSON format
{
"PageNumber": 1,
"PageSize": 10,
"RequestId": "BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5",
"TotalCount": 1,
"VpnRouteCounts": {
"VpnRouteCount": [
{
"RouteCount": 3,
"RouteEntryType": "bgp",
"Source": "VPN_BGP"
}
]
},
"VpnRouteEntries": {
"VpnRouteEntry": [
{
"AsPath": "65501,65001,60011",
"Community": "65001:1000,65501:2000",
"CreateTime": 1563874074000,
"NextHop": "vco-bp1tui07ob10fmuro****",
"NextHopTunnelId": "tun-36cfgpwjn58axj****",
"PrefixListId": "",
"RouteDest": "10.0.0.0/24",
"RouteEntryType": "custom",
"Source": "CLOUD",
"State": "normal",
"VpnInstanceId": "vpn-bp1cmw7jh1nfe43m9****",
"Weight": 100
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.RouteEntryType | The specified "RouteEntryType" is invalid. | |
| 400 | InvalidVpnInstanceId.NotFound | The specified VPN was not found. | The specified VPN instance was not found. |
| 400 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | The specified VPN gateway does not exist. Check whether the specified VPN gateway is valid. |
| 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. | You do not have the permissions to manage the specified resource. Apply for the permissions and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.