Queries the information about transit routers that are connected to a Cloud Enterprise Network (CEN) instance.
Operation description
You can set the RegionId and TransitRouterId parameters based on your requirements.
- If you do not set RegionId or TransitRouterId, the system queries all transit routers that are connected to the specified CEN instance.
- If you set only RegionId, the system queries transit routers that are deployed in the specified region.
- If you set only TransitRouterId, the system queries the specified transit router.
- If you set both RegionId and TransitRouterId, the system queries the specified transit router in the specified region.
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:ListTransitRouters | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
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. Valid values: 1 to 50. Default value: 10. | 10 |
CenId | string | Yes | 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 information about the tags. You can specify at most 20 tags in each call. | |
object | No | The information about the tags. | ||
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 at most 20 tag keys. | TagKey |
Value | string | No | The tag value. The tag value can be 0 to 128 characters in length, and cannot start with Each tag key must have a unique tag value. You can specify at most 20 tag values in each call. | TagValue |
Status | string | No | The status of the transit router. Valid values:
| Active |
Type | string | No | The edition of the transit router. Valid values:
| Enterprise |
TransitRouterName | string | No | The name of the Enterprise Edition transit router. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with | testname |
FeatureFilter | array<object> | No | The field that is used to enable or disable a feature of the transit router. | |
object | No | The field that is used to enable or disable a feature of the transit router. | ||
Key | string | No | The value of the field that is used to enable or disable a feature of the transit router. Supported fields:
| Multicast |
Value | array | No | The fields that are used to enable or disable the features of the transit router. The Multicast field supports only one value. Valid values:
| |
string | No | The field that is used to enable or disable a feature of the transit router. Valid values of the Multicast field:
| Enabled |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-10-18 | The Error code has changed | View Change Details |
2023-01-09 | The Error code has changed. The request parameters of the API has changed | View Change Details |