Queries the destination route and BGP route information of a VPN gateway instance by calling the DescribeVpnRouteEntries operation.
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 query the region ID. |
cn-hangzhou |
| VpnGatewayId |
string |
Yes |
The instance ID of the VPN gateway. |
vpn-bp1cmw7jh1nfe43m9**** |
| PageNumber |
integer |
No |
The page number of the list. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in a paged query. Maximum value: 50. Default value: 10. |
10 |
| RouteEntryType |
string |
No |
The destination type of the routing entry. Valid values:
|
custom |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries per page in a paging query. |
10 |
| RequestId |
string |
The request ID. |
BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5 |
| PageNumber |
integer |
The page number of the list. |
1 |
| TotalCount |
integer |
The total number of entries in the list. |
1 |
| VpnRouteEntries |
object |
||
| VpnRouteEntry |
array<object> |
The list of route entries. |
|
|
object |
The details of the route entry. |
||
| RouteEntryType |
string |
The type of the route entry. Valid values:
|
custom |
| NextHop |
string |
The next hop of the route entry. |
vco-bp1tui07ob10fmuro**** |
| Weight |
integer |
The weight of the route entry. Valid values: 0 and 100.
|
100 |
| RouteDest |
string |
The destination CIDR block of the route entry. |
10.0.0.0/24 |
| AsPath |
string |
The AS path of the route entry. |
65501,65001,60011 |
| State |
string |
The status of the route entry. Valid values:
|
normal |
| CreateTime |
integer |
The timestamp when the route entry was created. |
1563874074000 |
| Community |
string |
The community attributes of the route entry. |
65001:1000,65501:2000 |
| Source |
string |
The source of the BGP route. Valid values:
|
CLOUD |
| VpnInstanceId |
string |
The ID of the VPN gateway. |
vpn-bp1cmw7jh1nfe43m9**** |
| NextHopTunnelId |
string |
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. |
tun-36cfgpwjn58axj**** |
| VpnRouteCounts |
object |
||
| VpnRouteCount |
array<object> |
The route statistics of the VPN gateway instance in dual-tunnel mode. Note
This information is returned only for VPN gateway instances that support dual-tunnel IPsec-VPN connections. |
|
|
object |
The statistics of the routes. |
||
| RouteEntryType |
string |
The route type. Valid values:
|
bgp |
| RouteCount |
integer |
The number of route entries. |
3 |
| Source |
string |
The source of the BGP route. Valid values:
|
VPN_BGP |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5",
"PageNumber": 1,
"TotalCount": 1,
"VpnRouteEntries": {
"VpnRouteEntry": [
{
"RouteEntryType": "custom",
"NextHop": "vco-bp1tui07ob10fmuro****",
"Weight": 100,
"RouteDest": "10.0.0.0/24",
"AsPath": "65501,65001,60011",
"State": "normal",
"CreateTime": 1563874074000,
"Community": "65001:1000,65501:2000",
"Source": "CLOUD",
"VpnInstanceId": "vpn-bp1cmw7jh1nfe43m9****",
"NextHopTunnelId": "tun-36cfgpwjn58axj****"
}
]
},
"VpnRouteCounts": {
"VpnRouteCount": [
{
"RouteEntryType": "bgp",
"RouteCount": 3,
"Source": "VPN_BGP"
}
]
}
}
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. | |
| 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.