All Products
Search
Document Center

Virtual Private Cloud:DescribeVcoRouteEntries

Last Updated:Aug 29, 2024

Queries the routes of an IPsec-VPN connection.

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: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
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 routes.

object
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. Valid values:

  • 0: a low priority
  • 100: a high priority
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
RequestIdstring

The ID of the request.

E18980E8-C8C2-31BD-8156-AE2BBDEC87E1

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"
    }
  ],
  "RequestId": "E18980E8-C8C2-31BD-8156-AE2BBDEC87E1"
}

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
No change history