All Products
Search
Document Center

:DescribeVpnPbrRouteEntries

更新時間:Aug 22, 2023

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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeVpnPbrRouteEntries

The operation that you want to perform. Set the value to DescribeVpnPbrRouteEntries.

RegionId String Yes eu-central-1

The ID of the region where the VPN gateway is created.

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

VpnGatewayId String Yes vpn-bp1a3kqjiiq9legfx****

The ID of the VPN gateway.

PageNumber Integer No 1

The number of the returned page. Default value: 1.

PageSize Integer No 10

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

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries per page.

RequestId String 5BE01CD7-5A50-472D-AC14-CA181C5C03BE

The request ID.

PageNumber Integer 1

The number of the returned page.

TotalCount Integer 1

The number of entries returned.

VpnPbrRouteEntries Array of VpnPbrRouteEntry

The list of policy-based routes.

VpnPbrRouteEntry
NextHop String vco-bp15oes1py4i66rmd****

The next hop of the policy-based route.

Weight Integer 100

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

  • For a VPN gateway that supports the dual-tunnel mode, the default weight 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.
RouteDest String 10.0.0.0/24

The destination CIDR block of the policy-based route.

State String published

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

  • published: advertised to the virtual private cloud (VPC) route table.
  • normal: not advertised to the VPC route table.
CreateTime Long 1492747187000

The timestamp generated 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.

VpnInstanceId String vpn-bp1a3kqjiiq9legfx****

The ID of the VPN gateway.

RouteSource String 192.168.0.0/24

The source CIDR block of the policy-based route.

Priority Integer 10

The priority of the policy-based route.

A smaller value indicates a higher priority.

NextHopTunnelId String tun-opsqc4d97wni2****

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.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVpnPbrRouteEntries
&RegionId=eu-central-1
&VpnGatewayId=vpn-bp1a3kqjiiq9legfx****
&PageNumber=1
&PageSize=10
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeVpnPbrRouteEntriesResponse>
    <PageSize>10</PageSize>
    <RequestId>5BE01CD7-5A50-472D-AC14-CA181C5C03BE</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <VpnPbrRouteEntries>
        <NextHop>vco-bp15oes1py4i66rmd****</NextHop>
        <Weight>100</Weight>
        <RouteDest>10.0.0.0/24</RouteDest>
        <State>published</State>
        <CreateTime>1492747187000</CreateTime>
        <VpnInstanceId>vpn-bp1a3kqjiiq9legfx****</VpnInstanceId>
        <RouteSource>192.168.0.0/24</RouteSource>
        <Priority>10</Priority>
        <NextHopTunnelId>tun-opsqc4d97wni2****</NextHopTunnelId>
    </VpnPbrRouteEntries>
</DescribeVpnPbrRouteEntriesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "5BE01CD7-5A50-472D-AC14-CA181C5C03BE",
  "PageNumber" : 1,
  "TotalCount" : 1,
  "VpnPbrRouteEntries" : [ {
    "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

HttpCode Error Code Error message Description
403 Forbbiden.SubUser User 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. You can apply for the required permissions and try again.
403 Forbidden User not authorized to operate on the specified resource. You are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.

For a list of error codes, see Service error codes.