All Products
Search
Document Center

VPN Gateway:DescribeVcoRouteEntries

Last Updated:Mar 11, 2025

Queries the routes of an IPsec-VPN connection.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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:DescribeVcoRouteEntrieslist
*VpnConnections
acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the IPsec-VPN connection.

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

cn-hangzhou
VpnConnectionIdstringYes

The ID of the IPsec-VPN connection.

vco-p0w2jpkhi2eeop6q6****
RouteEntryTypestringNo

The route type. Valid values:

  • custom (default): a destination-based route
  • bgp: a BGP route
custom
PageNumberintegerNo

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

1
PageSizeintegerNo

The number of entries to return on each page. Default value: 10. Valid values: 1 to 50.

10
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among all requests. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, the system uses RequestId as ClientToken. The value of RequestId for each API request may be different.
123e4567-e89b-12d3-a456-4266****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountinteger

The number of entries returned.

1
PageNumberinteger

The number of the returned page.

1
PageSizeinteger

The number of entries returned per page.

10
VcoRouteEntriesarray<object>

The list of route entries.

VcoRouteEntrieobject

The information about the routes.

VpnConnectionIdstring

The ID of the IPsec-VPN connection.

vco-p0w2jpkhi2eeop6q6****
RouteDeststring

The destination CIDR block of the route.

192.168.10.0/24
NextHopstring

The next hop of the route.

vco-p0w2jpkhi2eeop6q6****
Weightinteger

The weight of the destination-based route.

Note The current parameter has no effect.
100
Statestring

The status of the route.

  • published: indicates that the current route is advertised to the transit router.
  • Active: indicates that the current BGP route is available.
published
RouteEntryTypestring

The route type. Valid values:

  • custom: a destination-based route
  • bgp: a BGP route
custom
CreateTimelong

The timestamp when the route was created.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

1658217008000
AsPathstring

The list of autonomous system (AS) numbers that the BGP route goes through.

[12000]
Communitystring

The community value carried by the BGP route.

65535:65510
Sourcestring

The source of the BGP route. Valid values:

  • CLOUD: indicates that the current BGP route is learned by the IPsec-VPN connection from the transit router.
  • VPN_BGP: indicates that the current BGP route is learned by the IPsec-VPN connection from the data center.
CLOUD
NextHopTunnelIdListarray

The list of next hops.

Note
  • This parameter is returned only by dual-tunnel IPsec connections.
  • This parameter is returned only when the tunnel status is Phase 2 Negotiation Successful.
  • NextHopTunnelIdstring

    The tunnel ID.

    tun-0jothw962cp3bvhbw****
    RequestIdstring

    The ID of the request.

    E18980E8-C8C2-31BD-8156-AE2BBDEC87E1
    VpnRouteCountsarray<object>

    The information on route entries of the dual-tunnel IPsec connection.

    Note This parameter is returned only for IPsec connections in dual-tunnel mode.
    VpnRouteCountobject

    The information about the route entries.

    RouteEntryTypestring

    The route type. Valid values:

    • custom: destination-based route.
    • bgp: BGP route.
    bgp
    RouteCountinteger

    The number of route entries.

    3
    Sourcestring

    The source of the BGP route. Valid values:

    • CLOUD: The current BGP route is learned by the IPsec connection from the transit router.
    • VPN_BGP: The current BGP route is learned by the IPsec connection from the data center.
    VPN_BGP

    Examples

    Sample success responses

    JSONformat

    {
      "TotalCount": 1,
      "PageNumber": 1,
      "PageSize": 10,
      "VcoRouteEntries": [
        {
          "VpnConnectionId": "vco-p0w2jpkhi2eeop6q6****",
          "RouteDest": "192.168.10.0/24",
          "NextHop": "vco-p0w2jpkhi2eeop6q6****",
          "Weight": 100,
          "State": "published",
          "RouteEntryType": "custom",
          "CreateTime": 1658217008000,
          "AsPath": "[12000]",
          "Community": "65535:65510",
          "Source": "CLOUD",
          "NextHopTunnelIdList": [
            "tun-0jothw962cp3bvhbw****"
          ]
        }
      ],
      "RequestId": "E18980E8-C8C2-31BD-8156-AE2BBDEC87E1",
      "VpnRouteCounts": [
        {
          "RouteEntryType": "bgp",
          "RouteCount": 3,
          "Source": "VPN_BGP"
        }
      ]
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400IllegalParam.RouteEntryTypeThe specified RouteEntryType is invalid.The error message returned because the specified route type is invalid.
    400Vco.StatusNotSupportThe current VPN connection state does not support this operation.The operation cannot be performed when the VPN connection is in the current state.
    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.
    404InvalidVpnConnectionInstanceId.NotFoundThe specified vpn connection instance id does not exist.The specified vpn connection instance id does not exist.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-10-24API Description Update. The Error code has changed. The response structure of the API has changedView Change Details