Queries the policy-based routes configured for a VPN gateway instance by calling the DescribeVpnPbrRouteEntries operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeVpnPbrRouteEntries |
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. |
eu-central-1 |
| VpnGatewayId |
string |
Yes |
The instance ID of the VPN gateway. |
vpn-bp1a3kqjiiq9legfx**** |
| 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 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries per page in a paged query. |
10 |
| RequestId |
string |
The request ID. |
5BE01CD7-5A50-472D-AC14-CA181C5C03BE |
| PageNumber |
integer |
The page number of the list. |
1 |
| TotalCount |
integer |
The total number of entries in the list. |
1 |
| VpnPbrRouteEntries |
object |
||
| VpnPbrRouteEntry |
array<object> |
The list of policy-based routes. |
|
|
object |
The information about the policy-based route. |
||
| NextHop |
string |
The next hop of the policy-based route. |
vco-bp15oes1py4i66rmd**** |
| Weight |
integer |
The weight of the policy-based route. For VPN gateway instances that support single-tunnel IPsec-VPN connections, the weight value represents the priority of the policy-based route:
Note
For VPN gateway instances that support dual-tunnel IPsec-VPN connections, this parameter does not take effect. |
100 |
| RouteDest |
string |
The destination CIDR block of the policy-based route. |
10.0.0.0/24 |
| State |
string |
The publish status of the policy-based route.
|
published |
| CreateTime |
integer |
The timestamp when the policy-based route was created. Unit: milliseconds. The timestamp is in UNIX format and represents the total number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
1492747187000 |
| VpnInstanceId |
string |
The VPN gateway instance ID. |
vpn-bp1a3kqjiiq9legfx**** |
| RouteSource |
string |
The source CIDR block of the policy-based route. |
192.168.0.0/24 |
| Priority |
integer |
The policy priority of the policy-based route. A smaller value indicates a higher priority. |
10 |
| NextHopTunnelId |
string |
The tunnel ID associated with the next hop of the policy-based route. This parameter is returned only for VPN gateway instances that support dual-tunnel IPsec-VPN connections. |
tun-opsqc4d97wni2**** |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "5BE01CD7-5A50-472D-AC14-CA181C5C03BE",
"PageNumber": 1,
"TotalCount": 1,
"VpnPbrRouteEntries": {
"VpnPbrRouteEntry": [
{
"NextHop": "vco-bp15oes1py4i66rmd****",
"Weight": 100,
"RouteDest": "10.0.0.0/24",
"State": "published",
"CreateTime": 1492747187000,
"VpnInstanceId": "vpn-bp1a3kqjiiq9legfx****",
"RouteSource": "192.168.0.0/24",
"Priority": 10,
"NextHopTunnelId": "tun-opsqc4d97wni2****"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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.