Creates an Enterprise Edition transit router.
Operation description
-
You can call CreateTransitRouter to create an Enterprise Edition transit router. For more information about the regions that support Enterprise Edition transit routers, see What is CEN?
-
CreateTransitRouter is an asynchronous operation. After you send a request, the transit router ID is returned but the operation is still being performed in the system background. You can call ListTransitRouters to query the status of an Enterprise Edition transit router.
- If an Enterprise Edition transit router is in the Creating state, the Enterprise Edition transit router is being created. In this case, you can query the Enterprise Edition transit router but cannot perform other operations.
- If an Enterprise Edition transit router is in the Active state, the Enterprise Edition transit router is created.
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:CreateTransitRouter | create | *CenInstance acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId} *TransitRouter acs:cen:*:{#accountId}:centransitrouter/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not set this parameter, the system automatically uses RequestId as ClientToken. The value of RequestId of each API request is different.
| 02fb3da4-130e-11e9-8e44-001**** |
CenId | string | Yes | The ID of the Cloud Enterprise Network (CEN) instance. | cen-j3jzhw1zpau2km**** |
RegionId | string | Yes | The ID of the region where the Enterprise Edition transit router is deployed. You can call the DescribeChildInstanceRegions operation to query the most recent region list. | cn-zhangjiakou |
TransitRouterName | string | No | The name of the Enterprise Edition transit router. The name must be 1 to 128 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty. | testname |
TransitRouterDescription | string | No | The description of the Enterprise Edition transit router instance. The description must be 1 to 256 characters in length, and cannot start with http:// or https://. You can also leave this parameter empty. | testdesc |
DryRun | boolean | No | Specifies whether to check the request without performing the operation. Check items include permissions and the status of the specified cloud resources. Valid values:
| false |
SupportMulticast | boolean | No | Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:
The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast. | false |
TransitRouterCidrList | array<object> | No | The CIDR blocks to be added to the transit router. | |
object | No | The CIDR blocks to be added to the transit router. You can specify at most five CIDR blocks in each call. For more information about CIDR blocks of transit routers, see CIDR blocks of transit routers. Note
Only Enterprise Edition transit routers support CIDR blocks.
| ||
Cidr | string | No | The CIDR block of the transit router. | 192.168.10.0/24 |
Name | string | No | The name of the transit router CIDR block. The name must be 1 to 128 characters in length. | nametest |
Description | string | No | The description of the transit router CIDR block. The description must be 1 to 256 characters in length. | desctest |
PublishCidrRoute | boolean | No | Specifies whether to allow the system to automatically add a route that points to the CIDR block to the route table of the transit router.
| true |
Tag | array<object> | No | The tags. | |
object | No | The tags. You can specify at most 20 tags. | ||
Key | string | No | The tag key. The tag keys cannot be an empty string. The tag key can be up to 64 characters in length. It cannot start with You can specify at most 20 tag keys in each call. | tagtest |
Value | string | No | The tag value. The tag value can be an empty string or up to 128 characters in length. It cannot start with Each key-value must be unique. You can specify at most 20 tag values in each call. | TagValue |
Response parameters
Examples
Sample success responses
JSON
format
{
"TransitRouterId": "tr-uf6llz2286805i44g****",
"RequestId": "404DA7EC-F495-44B5-B543-6EDCDF90F3D1"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | OperationUnsupported.RegionId | The specified Region is not supported. | The error message returned because this operation is not supported in the specified region. |
400 | InstanceExist.TransitRouterInstance | The instance already exists. | The error message returned because a transit router with the same ID already exists in the current region. Transit router IDs in the same region must be unique. |
400 | Forbbiden.TransitRouterServiceNotOpen | The user has not open transit router service. | The error message returned because the transit router is disabled. Enable the transit router and try again. |
400 | OperationUnsupported.SupportMulticast | The multicast is not supported in the specified region. | The error message returned because multicast is not supported in the specified region. |
400 | OperationUnsupported.CenFullLevel | CEN full level does not support TransitRouter. | - |
400 | IllegalParam.Cidr | Cidr is illegal. | The error message returned because the specified CIDR block is invalid. |
400 | Illegal.TrType | The TransitRouter type is illegal. | The error message returned because the specified type of transit router does not support this operation. |
400 | OperationUnsupported.TransitRouterCidrList | The TransitRouterCidrList is not support in the specified Region. | The error message returned because this operation is not supported in the specified region. |
400 | OperationFailed.CidrConflict | Operation is invalid because the cidr conflict. | The error message returned because the specified CIDR block conflicts with another one. |
400 | IllegalParam.Region | The specified region is invalid. | The error message returned because the specified region is invalid. |
400 | OverLappingExist.Cidr | The cidr overlapping exist. | The error message returned because CIDR overlapping is already enabled. |
400 | IllegalParam.ServiceMode | The specified ServiceMode is invalid. | The error message returned because the specified service mode is invalid. |
400 | ParamExclusive.ServiceModeAndSupportMulticast | ServiceMode and SupportMulticast is mutually exclusive. | The error message returned because transit routers in the current mode do not support multicast. |
400 | ParamExclusive.ServiceModeAndTransitRouterCidrList | ServiceMode and TransitRouterCidrList is mutually exclusive. | The error message returned because transit routers in the current mode do not support CIDR blocks. |
400 | OperationUnsupported.Tag | The Tag is not supported in the specified region. | The error message returned because transit routers in the current region do not support tags. |
400 | IllegalParam.SupportMulticast | Basic Transit router is not support multicast. | The error message returned because Basic Edition transit routers do not support multicast. |
400 | ParamExclusive.BasicAndPrimaryStandby | Basic and PrimaryStandby is mutually exclusive. | The error message returned because Basic Edition transit routers do not support the PrimaryStandby mode. |
400 | ParamExclusive.BasicAndMultiPrimary | Basic and MultiPrimary is mutually exclusive. | The error message returned because Basic Edition transit routers do not support the MultiPrimary mode. |
400 | IllegalParam.RegionId | The Specified Parameter RegionId is illegal. | The region specified in the parameter is invalid. |
400 | OperationFailed.PostPay95BwpNotAllowEnterpriseTr | Cbn with post pay 95 bandwidth package does not allow enterprise tr. | Cbn with post pay 95 bandwidth package does not allow enterprise tr. |
400 | Forbidden.TransitRouterServiceExpired | The transit router service is out of service. | The transit router service has been suspended due for payment. Please renew the service and try again. |
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 |
---|---|---|
2024-10-28 | The Error code has changed | View Change Details |
2024-07-10 | The Error code has changed | View Change Details |
2023-10-20 | The Error code has changed | View Change Details |
2023-01-03 | The Error code has changed | View Change Details |
2022-12-22 | The Error code has changed | View Change Details |