All Products
Search
Document Center

Virtual Private Cloud:DescribeVpnRouteEntries

Last Updated:Aug 29, 2024

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.

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:DescribeVpnRouteEntriesget
  • VpnGateway
    acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnGatewayId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

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

cn-hangzhou
VpnGatewayIdstringYes

The ID of the VPN gateway.

vpn-bp1cmw7jh1nfe43m9****
PageNumberintegerNo

The number of the page to return. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Maximum value: 50. Default value: 10.

10
RouteEntryTypestringNo

The type of the route entry. Valid values:

  • Custom: custom
  • System: system
System

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5
PageNumberinteger

The page number of the returned page.

1
TotalCountinteger

The total number of entries returned.

1
VpnRouteEntriesarray<object>

The list of route entries.

object
RouteEntryTypestring

The type of the route entry. Valid values:

  • Custom: custom
  • System: system
System
NextHopstring

The next hop of the route entry.

vco-bp1tui07ob10fmuro****
Weightinteger

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

  • 0: a low priority
  • 100: a high priority
100
RouteDeststring

The destination CIDR block of the route entry.

10.0.0.0/24
AsPathstring

The AS path of the route entry.

65501,65001,60011
Statestring

The status of the route entry. Valid values:

  • published: advertised
  • normal: not advertised
normal
CreateTimelong

The timestamp when the route entry was created.

1563874074000
Communitystring

The community attributes of the route entry.

65001:1000,65501:2000
Sourcestring

The source CIDR block of the route entry.

192.168.10.0/24
VpnInstanceIdstring

The ID of the VPN gateway.

vpn-bp1cmw7jh1nfe43m9****
NextHopTunnelIdstring

The ID of the tunnel associated with the next hop.

Note This parameter is returned only if the VPN gateway supports the dual-tunnel mode.
tun-36cfgpwjn58axj****

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "BF3995A6-FA4F-4C74-B90F-89ECF4BFF4D5",
  "PageNumber": 1,
  "TotalCount": 1,
  "VpnRouteEntries": {
    "VpnRouteEntry": [
      {
        "RouteEntryType": "System",
        "NextHop": "vco-bp1tui07ob10fmuro****",
        "Weight": 100,
        "RouteDest": "10.0.0.0/24",
        "AsPath": "65501,65001,60011",
        "State": "normal",
        "CreateTime": 1563874074000,
        "Community": "65001:1000,65501:2000",
        "Source": "192.168.10.0/24",
        "VpnInstanceId": "vpn-bp1cmw7jh1nfe43m9****",
        "NextHopTunnelId": "tun-36cfgpwjn58axj****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.RouteEntryTypeThe specified "RouteEntryType" is invalid.-
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 changedView Change Details
2023-10-19API Description Update. The Error code has changedView Change Details
2023-06-13The Error code has changed. The response structure of the API has changedView Change Details