You can call the ListTransitRouters operation to query information about transit routers in a Cloud Enterprise Network (CEN) instance, such as the instance type, status, instance ID, and whether the multicast feature is enabled.
Operation description
When you call this operation to query transit routers in a CEN instance, you can specify the RegionId and TransitRouterId parameters. Note the following information about these parameters:
If you do not specify RegionId or TransitRouterId, all transit routers in the CEN instance are queried.
If you specify only RegionId, the transit routers in the specified region are queried.
If you specify only TransitRouterId, the specified transit router is queried.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ListTransitRouters |
get |
CenInstance
*TransitRouter
TransitRouter
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 1 to 50. Default value: 10. |
10 |
| CenId |
string |
No |
The ID of the CEN instance. |
cen-j3jzhw1zpau2km**** |
| TransitRouterId |
string |
No |
The ID of the transit router. |
tr-uf654ttymmljlvh2x**** |
| RegionId |
string |
No |
The ID of the region where the transit router is deployed. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| Tag |
array<object> |
No |
The tags. You can specify up to 20 tags. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with You can specify up to 20 tag keys. |
TagKey |
| Value |
string |
No |
The tag value. The tag value can be an empty string or a string of up to 128 characters. It cannot start with Each tag key must have a unique tag value. You can specify up to 20 tag values. |
TagValue |
| Status |
string |
No |
The status of the transit router.
|
Active |
| Type |
string |
No |
The type of the transit router.
|
Enterprise |
| TransitRouterName |
string |
No |
The name of the transit router. The name must be 1 to 128 characters in length and cannot start with |
testname |
| FeatureFilter |
array<object> |
No |
The feature to be filtered. |
|
|
object |
No |
The feature to be filtered. |
||
| Key |
string |
No |
The key of the feature to be filtered. The following key is supported:
|
Multicast |
| Value |
array |
No |
A list of values for the feature. If you set the key to Multicast, you can specify only one value. Valid values:
|
|
|
string |
No |
The value of the feature. If you set the key to Multicast, you can set the value to one of the following options:
|
Enabled |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
The response. |
||
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
68521297-5FA6-46CB-B4EB-658F1C68C8CC |
| PageNumber |
integer |
The page number. |
1 |
| TotalCount |
integer |
The total number of entries returned. |
1 |
| TransitRouters |
array<object> |
A list of transit routers. |
|
|
object |
The information about the transit router. |
||
| CreationTime |
string |
The time when the transit router was created. The time is displayed in the |
2021-03-15T09:39Z |
| Type |
string |
The type of the transit router.
|
Enterprise |
| Status |
string |
The status of the transit router.
|
Active |
| TransitRouterId |
string |
The ID of the transit router. |
tr-bp1su1ytdxtataupl**** |
| TransitRouterDescription |
string |
The description of the transit router. |
testdesc |
| TransitRouterName |
string |
The name of the transit router. |
testname |
| CenId |
string |
The ID of the CEN instance. |
cen-j3jzhw1zpau2km**** |
| AliUid |
integer |
The ID of the Alibaba Cloud account to which the CEN instance belongs. |
1210123456123456 |
| RegionId |
string |
The ID of the region where the transit router is deployed. |
cn-hangzhou |
| SupportMulticast |
boolean |
Indicates whether the multicast feature is enabled for the transit router.
|
false |
| TransitRouterCidrList |
array<object> |
A list of CIDR blocks of the transit router. |
|
|
object |
The CIDR block of the transit router. |
||
| Cidr |
string |
The CIDR block of the transit router. |
192.168.1.0/24 |
| Name |
string |
The name of the CIDR block. |
CIDRname |
| Description |
string |
The description of the CIDR block. |
CIDRdesc |
| TransitRouterCidrId |
string |
The ID of the CIDR block. |
cidr-46p5ceg21e8152**** |
| PublishCidrRoute |
boolean |
Indicates whether the system automatically adds a route for the transit router CIDR block to the route table of the transit router.
|
true |
| Tags |
array<object> |
A list of tags. |
|
|
object |
The tag. |
||
| Key |
string |
The tag key. |
TagKey |
| Value |
string |
The tag value. |
TagValue |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "68521297-5FA6-46CB-B4EB-658F1C68C8CC",
"PageNumber": 1,
"TotalCount": 1,
"TransitRouters": [
{
"CreationTime": "2021-03-15T09:39Z",
"Type": "Enterprise",
"Status": "Active",
"TransitRouterId": "tr-bp1su1ytdxtataupl****",
"TransitRouterDescription": "testdesc",
"TransitRouterName": "testname",
"CenId": "cen-j3jzhw1zpau2km****",
"AliUid": 1210123456123456,
"RegionId": "cn-hangzhou",
"SupportMulticast": false,
"TransitRouterCidrList": [
{
"Cidr": "192.168.1.0/24",
"Name": "CIDRname",
"Description": "CIDRdesc",
"TransitRouterCidrId": "cidr-46p5ceg21e8152****",
"PublishCidrRoute": true
}
],
"Tags": [
{
"Key": "TagKey",
"Value": "TagValue"
}
]
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterCombination.TransitRouter | Region ID is required if no TransitRouterId or CenId specified. | The error message returned because you must specify at least a region, a transit router ID, or a CEN instance ID. |
| 400 | InvalidOperation.UnsupportFilterValue | The specified FeatureFilter Value is not supported by this operation. | The error message returned because the specified filter value is invalid. |
| 400 | InvalidOperation.UnsupportFilter | The specified FeatureFilter is not supported by this operation. | The error message returned because the specified filter is invalid. |
| 400 | IllegalParam.TagValue | The tag values are not valid. | The error message returned because the specified tag value is invalid. |
| 400 | IllegalParam.TagKey | The tag keys are not valid. | The error message returned because the specified tag key is invalid. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.