All Products
Search
Document Center

VPN Gateway:DescribeVpnPbrRouteEntries

Last Updated:Aug 07, 2026

Queries the policy-based routes configured for a VPN gateway instance by calling the DescribeVpnPbrRouteEntries operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:DescribeVpnPbrRouteEntries

get

*VpnGateway

acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnGatewayId}

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:

  • 100: high priority. If multiple policy-based routes with the same source and destination CIDR blocks exist, the IPsec-VPN connection associated with this policy-based route serves as the active link.

  • 0: low priority. If multiple policy-based routes with the same source and destination CIDR blocks exist, the IPsec-VPN connection associated with this policy-based route serves as the standby link.

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: The policy-based route is published to the route table of the VPC.

  • normal: The policy-based route is not published to the route table of the VPC.

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.