Queries policy-based route entries of a VPN gateway.
Debugging
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 | cn-hangzhou |
The ID of the region where the policy-based route 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 | 10 |
The number of the page to return. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Maximum value: 50. Default value: 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | 5BE01CD7-5A50-472D-AC14-CA181C5C03BE |
The ID of the request. |
PageNumber | Integer | 1 |
The page number of the returned page. |
TotalCount | Integer | 12 |
The total number of entries returned. |
VpnPbrRouteEntries | Array of VpnPbrRouteEntry |
The detailed information about the policy-based routes. |
|
VpnPbrRouteEntry | |||
NextHop | String | vco-bp15oes1py4i66rmd**** |
The next hop of the policy-based route. |
Weight | Integer | 0 |
The weight of the policy-based route. Valid values: 0 and 100.
|
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:
|
CreateTime | Long | 1492747187000 |
The time when the policy-based route was created. |
VpnInstanceId | String | vpn-bp1cmw7jh1nfe43m9**** |
The ID of the VPN gateway. |
RouteSource | String | 192.168.0.0/24 |
The source CIDR block of the policy-based route. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeVpnPbrRouteEntries
&RegionId=cn-hangzhou
&VpnGatewayId=vpn-bp1a3kqjiiq9legfx****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeVpnPbrRouteEntriesResponse>
<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<RequestId>E5D94DC7-AEC7-4E73-A203-61B04D1F1160</RequestId>
<PageSize>10</PageSize>
<VpnPbrRouteEntries>
<VpnPbrRouteEntry>
<RouteDest>10.0.0.0/32</RouteDest>
<VpnInstanceId>vpn-bp1cmw7jh1nfe43m9****</VpnInstanceId>
<State>published</State>
<Weight>100</Weight>
<CreateTime>1563881012000</CreateTime>
<NextHop>vco-bp1tui07ob10fmuro****</NextHop>
<RouteSource>11.0.0.0/32</RouteSource>
</VpnPbrRouteEntry>
</VpnPbrRouteEntries>
</DescribeVpnPbrRouteEntriesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageNumber" : 1,
"TotalCount" : 1,
"RequestId" : "E5D94DC7-AEC7-4E73-A203-61B04D1F1160",
"PageSize" : 10,
"VpnPbrRouteEntries" : {
"VpnPbrRouteEntry" : [ {
"RouteDest" : "10.0.0.0/32",
"VpnInstanceId" : "vpn-bp1cmw7jh1nfe43m9****",
"State" : "published",
"Weight" : 100,
"CreateTime" : 1563881012000,
"NextHop" : "vco-bp1tui07ob10fmuro****",
"RouteSource" : "11.0.0.0/32"
} ]
}
}
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. | The error message returned because you are unauthorized to perform this operation on the specified resource. Apply for the required permissions and try again. |
403 | Forbidden | User not authorized to operate on the specified resource. | The error message returned because you are unauthorized to perform this operation on the specified resource. Apply for the required permissions and try again. |
For a list of error codes, visit the API Error Center.