Queries the details about routes in the route tables of an Enterprise Edition transit router.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ListTransitRouterRouteEntries |
get |
TransitRouterRouteEntry
TransitRouterRouteTable
TransitRouterRouteEntry
|
None | 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 |
TransitRouterRouteEntryDestinationCidrBlock
deprecated
|
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. |
testname |
|
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. |
rte-oklkgwmj97z6dn**** |
|
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
|
Parameter |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| NextToken |
string |
A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:
|
fce19**** |
| RequestId |
string |
The request ID. |
C3835E5E-1504-4344-B1BB-98A4110F1079 |
| TotalCount |
integer |
The total number of entries returned. |
6 |
| MaxResults |
integer |
The number of entries per page. |
20 |
| TransitRouterRouteEntries |
array<object> |
A list of route entries. |
|
|
object |
The information about the route. |
||
| TransitRouterRouteEntryId |
string |
The route ID. Note
This parameter is returned only for static routes. |
rte-oklkgwmj97z6dn**** |
| TransitRouterRouteEntryDestinationCidrBlock |
string |
The destination CIDR block of the route entry. An IPv4 or IPv6 CIDR block is returned. |
192.168.0.0/24 |
| TransitRouterRouteEntryType |
string |
The type of the route. Valid values:
|
Static |
| CreateTime |
string |
The time when the route entry was created. The time follows the ISO8601 standard in the YYYY-MM-DDThh:mmZ format. The time is displayed in UTC. Note
This parameter is returned only for static routes. |
2021-06-15T07:01Z |
| TransitRouterRouteEntryName |
string |
The route name. Note
This parameter is returned only for static routes. |
testname |
| TransitRouterRouteEntryStatus |
string |
The route status. Valid values:
|
Active |
| TransitRouterRouteEntryNextHopType |
string |
The next hop type. Valid values:
|
BlackHole |
| TransitRouterRouteEntryNextHopId |
string |
The next hop ID. This parameter is not returned if the route is a blackhole route. |
tr-attach-vx6iwhjr1x1j78**** |
| TransitRouterRouteEntryDescription |
string |
The route description. Note
This parameter is returned only for static routes. |
CidrRoute |
| OperationalMode |
boolean |
Indicates whether the route can be managed. Valid values:
|
false |
| Tag |
string |
The route tag. Only PermitVbr may be returned, which indicates that the route is advertised only to the route tables of the virtual border routers (VBRs) that are connected to the transit router. Note
This parameter is returned only for routes whose CIDR blocks are automatically generated by the system. |
PermitVbr |
| TransitRouterRouteEntryNextHopResourceId |
string |
The next hop ID. |
vpc-m5ent6du8deaq5***** |
| TransitRouterRouteEntryNextHopResourceType |
string |
The next hop type. Valid values:
|
VPC |
| TransitRouterRouteEntryOriginResourceType |
string |
The source instance type. Valid values:
|
VPC |
| TransitRouterRouteEntryOriginResourceId |
string |
The source instance ID. |
vpc-m5ent6du8deaq5***** |
| PrefixListId |
string |
The prefix list ID. |
pl-k1ainl66z3527773d**** |
| PathAttributes |
object |
The route attributes. |
|
| Communities |
array |
The route community. |
|
|
string |
The community attributes of the routes. |
65501:1 |
|
| AsPaths |
array |
The route AS path. |
|
|
string |
The AS path of the route. |
65501 |
|
| OriginInstanceId |
string |
The source instance ID. |
vbr-m5ent6du8deaq5***** |
| OriginInstanceType |
string |
The source instance type. Valid values:
|
VBR |
| OriginRouteType |
string |
The route type. Valid values:
|
BGP |
| Preference |
integer |
The route priority. A smaller value indicates a higher priority. |
50 |
Examples
Success response
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 | ResourceNotFound.PrefixlistAssociation | The prefix list is not associated with this route table. | The error message returned because the specified prefix list is not associated with a route table. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.