Queries the routes of an IPsec-VPN connection.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeVcoRouteEntries | The operation that you want to perform. Set the value to DescribeVcoRouteEntries. |
RegionId | String | Yes | ap-southeast-2 | The region ID of the IPsec-VPN connection. You can call the DescribeRegions operation to query the most recent list of regions. |
VpnConnectionId | String | Yes | vco-p0w2jpkhi2eeop6q6**** | The ID of the IPsec-VPN connection. |
RouteEntryType | String | No | custom | The route type. Valid values:
|
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. Default value: 10. Valid values: 1 to 50. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-4266**** | 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. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TotalCount | Integer | 1 | The number of entries returned. |
PageNumber | Integer | 1 | The number of the returned page. |
PageSize | Integer | 10 | The number of entries returned per page. |
VcoRouteEntries | Array of VcoRouteEntrie | The list of routes. |
|
VpnConnectionId | String | vco-p0w2jpkhi2eeop6q6**** | The ID of the IPsec-VPN connection. |
RouteDest | String | 192.168.10.0/24 | The destination CIDR block of the route. |
NextHop | String | vco-p0w2jpkhi2eeop6q6**** | The next hop of the route. |
Weight | Integer | 100 | The weight of the destination-based route. Valid values:
|
State | String | published | The status of the route.
|
RouteEntryType | String | custom | The route type. Valid values:
|
CreateTime | Long | 1658217008000 | 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. |
AsPath | String | [12000] | The list of autonomous system (AS) numbers that the BGP route goes through. |
Community | String | 65535:65510 | The community value carried by the BGP route. |
Source | String | CLOUD | The source of the BGP route. Valid values:
|
RequestId | String | E18980E8-C8C2-31BD-8156-AE2BBDEC87E1 | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeVcoRouteEntries
&RegionId=ap-southeast-2
&VpnConnectionId=vco-p0w2jpkhi2eeop6q6****
&RouteEntryType=custom
&PageNumber=1
&PageSize=10
&ClientToken=123e4567-e89b-12d3-a456-4266****
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeVcoRouteEntriesResponse>
<TotalCount>1</TotalCount>
<PageSize>10</PageSize>
<RequestId>E18980E8-C8C2-31BD-8156-AE2BBDEC87E1</RequestId>
<PageNumber>1</PageNumber>
<VcoRouteEntries>
<RouteDest>192.168.10.0/24</RouteDest>
<NextHop>vco-p0w2jpkhi2eeop6q6****</NextHop>
<State>published</State>
<RouteEntryType>custom</RouteEntryType>
<CreateTime>1658217008000</CreateTime>
<VpnConnectionId>vco-p0w2jpkhi2eeop6q6****</VpnConnectionId>
<Weight>100</Weight>
</VcoRouteEntries>
</DescribeVcoRouteEntriesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 1,
"PageSize" : 10,
"RequestId" : "E18980E8-C8C2-31BD-8156-AE2BBDEC87E1",
"PageNumber" : 1,
"VcoRouteEntries" : [ {
"RouteDest" : "192.168.10.0/24",
"NextHop" : "vco-p0w2jpkhi2eeop6q6****",
"State" : "published",
"RouteEntryType" : "custom",
"CreateTime" : 1658217008000,
"VpnConnectionId" : "vco-p0w2jpkhi2eeop6q6****",
"Weight" : 100
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.RouteEntryType | The specified RouteEntryType is invalid. | The error message returned because the specified route type does not meet the requirements. |
400 | Vco.StatusNotSupport | The current VPN connection state does not support this operation. | The operation cannot be performed when the VPN connection is in the current state. |
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. Acquire 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. |
404 | InvalidVpnConnectionInstanceId.NotFound | The specified vpn connection instance id does not exist. | The error message returned because the specified IPsec-VPN connection does not exist. Check whether the ID of the IPsec-VPN connection is valid. |
For a list of error codes, see Service error codes.