Queries destination-based and BGP route entries of 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 DescribeVpnRouteEntries

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

RegionId String Yes cn-hangzhou

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-bp1cmw7jh1nfe43m9****

The ID of the VPN gateway.

PageNumber Integer No 1

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.

RouteEntryType String No System

The type of the route entry. Valid values:

  • Custom: custom
  • System: system

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

RequestId String BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 1

The total number of entries returned.

VpnRouteEntries Array of VpnRouteEntry

The list of route entries.

VpnRouteEntry
RouteEntryType String System

The type of the route entry. Valid values:

  • Custom: custom
  • System: system
NextHop String vco-bp1tui07ob10fmuro****

The next hop of the route entry.

Weight Integer 100

The weight of the route entry. Valid values: 0 and 100.

  • 0: a low priority
  • 100: a high priority
RouteDest String 10.0.0.0/24

The destination CIDR block of the route entry.

AsPath String 65501,65001,60011

The AS path of the route entry.

State String normal

The status of the route entry. Valid values:

  • published: advertised
  • normal: not advertised
CreateTime Long 1563874074000

The timestamp when the route entry was created.

Community String 65001:1000,65501:2000

The community attributes of the route entry.

Source String 192.168.10.0/24

The source CIDR block of the route entry.

VpnInstanceId String vpn-bp1cmw7jh1nfe43m9****

The ID of the VPN gateway.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVpnRouteEntries
&RegionId=cn-hangzhou
&VpnGatewayId=vpn-bp1a3kqjiiq9legfx****
&<Common request parameters>

Sample success responses

XML format

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

<DescribeVpnRouteEntriesResponse>
	<PageNumber>1</PageNumber>
	<TotalCount>1</TotalCount>
	<VpnRouteEntries>
		<VpnRouteEntry>
			<RouteDest>10.0.0.0/24</RouteDest>
			<VpnInstanceId>vpn-bp1cmw7jh1nfe43m9****</VpnInstanceId>
			<State>normal</State>
			<Weight>100</Weight>
			<CreateTime>1563874074000</CreateTime>
			<NextHop>vco-bp1tui07ob10fmuro****</NextHop>
		</VpnRouteEntry>
	</VpnRouteEntries>
	<PageSize>10</PageSize>
	<RequestId>BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5</RequestId>
</DescribeVpnRouteEntriesResponse>

JSON format

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

{
  "PageNumber" : 1,
  "TotalCount" : 1,
  "VpnRouteEntries" : {
    "VpnRouteEntry" : [ {
      "RouteDest" : "10.0.0.0/24",
      "VpnInstanceId" : "vpn-bp1cmw7jh1nfe43m9****",
      "State" : "normal",
      "Weight" : 100,
      "CreateTime" : 1563874074000,
      "NextHop" : "vco-bp1tui07ob10fmuro****"
    } ]
  },
  "PageSize" : 10,
  "RequestId" : "BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5"
}

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.