Queries the details about routes in the route tables of an Enterprise Edition transit router.
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 |
---|---|---|---|---|
cen:ListTransitRouterRouteEntries | get | *TransitRouterRouteEntry acs:cen:*:{#accountId}:centransitrouterroutentry/{#centransitrouterroutentryId} *TransitRouterRouteTable acs:cen:*:{#accountId}:centransitrouterroutetable/{#centransitrouterroutetableId} *TransitRouterRouteEntry acs:cen:*:{#accountId}:centransitrouterroutentry/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
MaxResults | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 20. | 20 |
TransitRouterRouteEntryDestinationCidrBlockdeprecated | string | No | The destination CIDR block of the route. This parameter is to be deprecated. We recommend that you use the RouteFilter parameter. | 192.168.0.0/24 |
TransitRouterRouteEntryStatus | string | No | The status of the route. Valid values:
If you do not specify a value, routes in the active state are queried. | Active |
TransitRouterRouteTableId | string | Yes | The ID of the route table of the Enterprise Edition transit router. | vtb-bp1dudbh2d5na6b50**** |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
| fce19**** |
TransitRouterRouteEntryNames | array | No | The route name. | |
string | No | The route name. The name is optional. If you enter a name, it must be 1 to 128 characters in length, and cannot start with http:// or https://. Note
You can use this parameter to query only static routes in the specified route table. This parameter conflicts with other query conditions except for TransitRouterRouteEntryIds.
| testname | |
TransitRouterRouteEntryIds | array | No | The route ID. | |
string | No | The route ID. Note
You can use this parameter to query only static routes in the specified route table. This parameter conflicts with other query conditions except for TransitRouterRouteEntryNames.
| rte-oklkgwmj97z6dn**** | |
TransitRouterRouteEntryType | string | No | The route type. Valid values:
| Propagated |
TransitRouterRouteEntryNextHopType | string | No | The next hop type. Valid values:
| Attachment |
TransitRouterRouteEntryNextHopId | string | No | The ID of the network instance connection that you want to specify as the next hop. | tr-attach-nls9fzkfat8934**** |
TransitRouterRouteEntryNextHopResourceId | string | No | The next hop ID. | vpc-m5ent6du8deaq5***** |
TransitRouterRouteEntryNextHopResourceType | string | No | The next hop type. Valid values:
| VPC |
TransitRouterRouteEntryOriginResourceId | string | No | The source instance ID. | vpc-m5ent6du8deaq5***** |
TransitRouterRouteEntryOriginResourceType | string | No | The source instance type. Valid values:
| VPC |
PrefixListId | string | No | The prefix list ID. | pl-6ehtn5kqxgeyy08fi**** |
RouteFilter | array<object> | No | The filter conditions. | |
object | No | The filter conditions. | ||
Key | string | No | The match pattern for filtering CIDR blocks. Valid values:
By default, the logical operator among filter conditions is AND. Information about a route entry is returned only if the route entry matches all filter conditions. Filter conditions must be unique. | PrefixExactMatchCidrs |
Value | array | No | The filter value. | |
string | No | Specify a filter value based on the Key. You can specify multiple values for a key. The logical operator among values is OR, which indicates that a route entry is a match if the request matches one of the values. You can specify at most 500 values for each match condition. | 192.168.1.0/24 |
Response parameters
Examples
Sample success responses
JSON
format
{
"NextToken": "fce19****",
"RequestId": "C3835E5E-1504-4344-B1BB-98A4110F1079",
"TotalCount": 6,
"MaxResults": 20,
"TransitRouterRouteEntries": [
{
"TransitRouterRouteEntryId": "rte-oklkgwmj97z6dn****",
"TransitRouterRouteEntryDestinationCidrBlock": "192.168.0.0/24",
"TransitRouterRouteEntryType": "Static",
"CreateTime": "2021-06-15T07:01Z",
"TransitRouterRouteEntryName": "testname",
"TransitRouterRouteEntryStatus": "Active",
"TransitRouterRouteEntryNextHopType": "BlackHole",
"TransitRouterRouteEntryNextHopId": "tr-attach-vx6iwhjr1x1j78****",
"TransitRouterRouteEntryDescription": "CidrRoute",
"OperationalMode": false,
"Tag": "PermitVbr",
"TransitRouterRouteEntryNextHopResourceId": "vpc-m5ent6du8deaq5*****",
"TransitRouterRouteEntryNextHopResourceType": "VPC",
"TransitRouterRouteEntryOriginResourceType": "VPC",
"TransitRouterRouteEntryOriginResourceId": "vpc-m5ent6du8deaq5*****",
"PrefixListId": "pl-k1ainl66z3527773d****",
"PathAttributes": {
"Communities": [
"65501:1"
],
"AsPaths": [
"65501"
],
"OriginInstanceId": "vbr-m5ent6du8deaq5*****\n",
"OriginInstanceType": "VBR",
"OriginRouteType": "BGP",
"Preference": 50
}
}
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.TransitRouterRouteTableId | TransitRouterRouteTableId is illegal. | The error message returned because the route table ID of the transit router (TransitRouterRouteTableId) is invalid. |
400 | IllegalParam.TransitRouterRouteEntryStatus | TransitRouterRouteEntryStatus is illegal. | The error message returned because the status of the route on the transit router (TransitRouterRouteEntryStatus) is invalid. |
400 | IllegalParam.NextToken | NextToken is illegal. | The error message returned because the NextToken parameter is set to an invalid value. |
400 | ParamExclusive.RouteEntryIdsAndStatus | TransitRouterRouteEntryIds and TransitRouterRouteEntryStatus is mutually exclusive. | The error message returned because the TransitRouterRouteEntryIds and TransitRouterRouteEntryStatus parameters conflict with each other. |
400 | InvalidTransitRouterRouteTableId.NotFound | TransitRouterRouteTableId is not found. | The error message returned because the specified route table ID of the transit router does not exist. |
400 | FilterKeyDuplicated.RouteFilter | The keys in RouteFilter are duplicated. | The error message returned because RouteFilter contains duplicate key values. |
400 | InvalidFilterKey | The key in filter is invalid. | The key in filter is invalid. |
400 | IllegalParam.TransitRouterRouteEntryNextHopType | TransitRouterRouteEntryNextHopType is invalid. | The error message returned because the TransitRouterRouteEntryNextHopType parameter is set to an invalid value. |
400 | IllegalParam.TransitRouterRouteEntryNextHopAttachmentId | TransitRouterRouteEntryNextHopAttachmentId is invalid. | The error message returned because TransitRouterRouteEntryNextHopAttachmentId is set to an invalid value. |
400 | IllegalParam.TransitRouterRouteEntryNextHopResourceId | TransitRouterRouteEntryNextHopResourceId is invalid. | The error message returned because TransitRouterRouteEntryNextHopResourceId is set to an invalid value. |
400 | IllegalParam.TransitRouterRouteEntryNextHopResourceType | TransitRouterRouteEntryNextHopResourceType is invalid. | The error message returned because TransitRouterRouteEntryNextHopResourceType is set to an invalid value. |
400 | IllegalParam.TransitRouterRouteEntryOriginResourceId | TransitRouterRouteEntryOriginResourceId is invalid. | The error message returned because TransitRouterRouteEntryOriginResourceId is set to an invalid value. |
400 | IllegalParam.TransitRouterRouteEntryOriginResourceType | TransitRouterRouteEntryOriginResourceType is invalid. | The error message returned because TransitRouterRouteEntryOriginResourceType is set to an invalid value. |
400 | IllegalParam.TransitRouterRouteEntryType | TransitRouterRouteEntryType is invalid. | The error message returned because TransitRouterRouteEntryType is set to an invalid value. |
400 | IllegalParam.PrefixExactMatchCidr | PrefixExactMatchCidr is invalid. | The error message returned because PrefixExactMatchCidr is set to an invalid value. |
400 | IllegalParam.LongestPrefixMatchCidr | LongestPrefixMatchCidr is invalid. | The error message returned because LongestPrefixMatchCidr is set to an invalid value. |
400 | IllegalParam.SubnetOfMatchCidr | SubnetOfMatchCidr is invalid. | The error message returned because SubnetOfMatchCidr is set to an invalid value. |
400 | IllegalParam.SupernetOfMatchCidr | SupernetOfMatchCidr is invalid. | The error message returned because SupernetOfMatchCidr is set to an invalid value. |
400 | InvalidName | Name is invalid. | The error message returned because the specified name is invalid. |
400 | IllegalParam.TextMatchCidr | The TextMatchCidr specified in the parameter is illegal. | The TextMatchCidr specified in the parameter is illegal. |
400 | InvalidParameter | Invalid parameter. | The error message returned because the parameter is set to an invalid value. |
400 | Unauthorized | The AccessKeyId is unauthorized. | The error message returned because you do not have the permissions to perform this operation. |
404 | InvalidRouteTableId.NotFound | The specified RouteTableId is not found. | The specified route table ID does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-10 | The Error code has changed | View Change Details |
2023-12-13 | The Error code has changed | View Change Details |
2023-07-13 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-07-07 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-07-07 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-04 | The Error code has changed | View Change Details |
2023-03-02 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |