Queries the routes of an IPsec-VPN connection.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:DescribeVcoRouteEntries | list |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the IPsec-VPN connection. You can call the DescribeRegions operation to query the most recent list of regions. | cn-hangzhou |
VpnConnectionId | string | Yes | The ID of the IPsec-VPN connection. | vco-p0w2jpkhi2eeop6q6**** |
RouteEntryType | string | No | The route type. Valid values:
| custom |
PageNumber | integer | No | The number of the page to return. Default value: 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. Default value: 10. Valid values: 1 to 50. | 10 |
ClientToken | string | No | 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
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.RouteEntryType | The specified RouteEntryType is invalid. | The error message returned because the specified route type is invalid. |
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. | 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. | You do not have the permissions to manage the specified resource. Apply for the permissions and try again. |
404 | InvalidVpnConnectionInstanceId.NotFound | The 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 time | Summary of changes | Operation |
---|