- Documentation
VPN Connet
API reference
VPN gateway route
DescribeVpnGatewayRoutes - Querying gateway routes
VPN gateway route
DescribeVpnGatewayRoutes - Querying gateway routes
DescribeVpnGatewayRoutes - Querying gateway routes
Call DescribeVpnGatewayRoutes to query destination routes of a VPN gateway based on the specified conditions.
Debug
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
Request parameters
The following only details request parameters specific to this API and key common parameters. For more information, see Common parameters. Action String required Example: DescribeVpnGatewayRoutes
The action that you want to perform. Value: DescribeVpnGatewayRoutes.
Version String required Example: 2020-04-01
The API version.
VpnGatewayId String optional Example: vgw-3tehy13n2l4c6c0v****
The ID of the VPN gateway instance. You can call DescribeVpnGateways to query the ID of the VPN gateway. VpnGatewayRouteIds.N String optional Example: vgr-1cwd2lwd4c8cnh****
ID of the VPN gateway route.
- N represents the sequence number of a route ID.
- Separate multiple IDs with ampersands (&).
PageSize Integer optional Example: 20
The number of rows per page for paginated queries. Maximum: 100. Default: 20.
PageNumber Integer optional Example: 1
Page number for pagination query.
- If you specify this parameter, it must be a non-negative integer.
- If you omit it or set it to 0, the value defaults to 1.
NextHopId String optional Example: vgc-3tex2x1cwd4c6c0v****
ID of the IPsec-VPN connection that will be set as the route's next hop. You can call DescribeVpnConnections to query the ID of the IPsec-VPN connection. DestinationCidrBlock String optional Example: 192.XX.XX.0/24
The destination CIDR block of the VPN gateway route.
RouteType String optional Example: Static
The route type.
tip
Route types synchronized from TR are currently unsupported for display.
Status String optional Example: Available
The status of the VPN gateway route.
- Pending: Configuration in progress.
- Available: The route is effective and preferred.
- Conflicted: The route is ineffective and non-preferred.
tip
When route prefixes are identical, the route priority order is Cloud route > Static route > BGP route. Therefore, multiple routes with the same prefix may have some marked as Available and others as Conflicted.
Response parameters
Only the response parameters specific to this API are listed below. For more information, see Response structure. RequestId String optional Example: 20220322145233010225243081016A****
Request ID.
PageSize Integer optional Example: 20
The number of rows on the current page.
PageNumber Integer optional Example: 1
Current page number.
TotalCount Integer optional Example: 33
Total number of qualified route entries.
VpnGatewayRoutes Object[] optional Example: -
Details of the route entry.
VpnGatewayRouteId String optional Example: vgr-3tex2c6c0v844c****
ID of the VPN gateway route.
VpnGatewayId String optional Example: vgw-3tehy13n2l4c6c0v****
The instance ID of the VPN gateway.
DestinationCidrBlock String optional Example: 192.XX.XX.0/24
The destination CIDR block of the VPN gateway route.
NextHopId String optional Example: vgc-3tex2x1cwd4c6c0v****
ID of the IPsec-VPN connection set as the next hop. If RouteType is Cloud, this parameter returns an empty string.
CreationTime String optional Example: 2021-04-09T08:36:47+08:00
The time when the VPN gateway route is created.
UpdateTime String optional Example: 2021-04-09T09:30:40+08:00
The time when the route of the VPN gateway is modified.
Status String optional Example: Available
The status of the VPN gateway route.
- Pending: Configuration in progress.
- Available: The route is effective and preferred.
- Conflicted: The route is ineffective and non-preferred.
tip
When route prefixes are identical, the route priority order is Cloud route > Static route > BGP route. Therefore, multiple routes with the same prefix may have some marked as Available and others as Conflicted.
RouteType String optional Example: Static
The route type.
tip
Route types synchronized from TR are currently unsupported for display.
NextTunnelId String optional Example: tun-bp18h6dgapdbs1l7p****
ID of the tunnel that will be set as the next hop.
This parameter is returned only for VPN gateways in dual-tunnel mode.
AsPath Object[] optional Example: -
The AS path traversed by the BGP route.
Type String optional Example: Sequence
The type for AS path.
- Sequence: Original sequence
- Set: Aggregated sequence
Numbers Integer[] optional Example: [65533]
The sequence for AS path.
- If the type of AS path is Sequence, the response will be the original ASN sequence, such as [65533].
- If the type of AS path is Set, indicating that the AS path is aggregated, the response will be the aggregated ASN sequence, such as [4,5].
Request examples
Response examples
Error codes
The following table lists the error codes related to the business logic for this API. For details, see Common error codes. Last updated: 2026.05.09 11:19:50