All Products
Search
Document Center

Virtual Private Cloud:DescribeVpnPbrRouteEntries

Last Updated:Mar 04, 2024

Queries policy-based routes configured for a VPN gateway.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeVpnPbrRouteEntriesRead
  • VpnGateway
    acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnGatewayId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the VPN gateway.

You can call the DescribeRegions operation to query the most recent region list.

cn-zhangjiakou
VpnGatewayIdstringYes

The ID of the VPN gateway.

vpn-bp1a3kqjiiq9legfx****
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Maximum value: 50. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

PageSizeinteger

The number of entries per page.

10
RequestIdstring

The request ID.

5BE01CD7-5A50-472D-AC14-CA181C5C03BE
PageNumberinteger

The page number.

1
TotalCountinteger

The number of entries returned.

1
VpnPbrRouteEntriesobject []

The list of policy-based routes.

NextHopstring

The next hop of the policy-based route.

vco-bp15oes1py4i66rmd****
Weightinteger

The weight of the policy-based route. Valid values:

  • For a VPN gateway that supports the dual-tunnel mode, the default value is 100.

  • For a VPN gateway that supports the single-tunnel mode, the weight specifies the priority of the policy-based route.

    • 100: a high priority If multiple policy-based routes with the same source CIDR block and destination CIDR block exist, the IPsec-VPN connection associated with the policy-based route is the active connection.
    • 0: a low priority If multiple policy-based routes with the same source CIDR block and destination CIDR block exist, the IPsec-VPN connection associated with the policy-based route is the standby connection.
0
RouteDeststring

The destination CIDR block of the policy-based route.

10.0.0.0/24
Statestring

The status of the policy-based route. Valid values:

  • published: advertised to the VPC route table.
  • normal: not advertised to the VPC route table.
published
CreateTimelong

The time when the policy-based route was created. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1492747187000
VpnInstanceIdstring

The VPN gateway ID.

vpn-bp1a3kqjiiq9legfx****
RouteSourcestring

The source CIDR block of the policy-based route.

192.168.0.0/24
Priorityinteger

The priority of the policy-based route.

A smaller value indicates a higher priority.

10
NextHopTunnelIdstring

The ID of the tunnel associated with the next hop of the policy-based route.

This parameter is returned only if the VPN gateway supports the dual-tunnel mode.

tun-opsqc4d97wni2****

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "5BE01CD7-5A50-472D-AC14-CA181C5C03BE\t",
  "PageNumber": 1,
  "TotalCount": 1,
  "VpnPbrRouteEntries": {
    "VpnPbrRouteEntry": [
      {
        "NextHop": "vco-bp15oes1py4i66rmd****\t",
        "Weight": 0,
        "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 codeError codeError messageDescription
400InvalidVpnInstanceId.NotFoundThe specified VPN was not found.The specified VPN gateway is not found.
403Forbbiden.SubUserUser 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. Acquire the required permissions and try again.
403ForbiddenUser 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.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-04The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
2023-10-19API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 403
    Added Error Codes: 400
2023-06-13The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
Output ParametersThe response structure of the API has changed.