Creates an Enterprise Edition transit router.
Operation Description
You can call the CreateTransitRouter operation 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 system returns a request ID and runs the task in the background. You can call the ListTransitRouters operation 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.
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 | Association operation |
---|---|---|---|---|
cen:CreateTransitRouter | Write |
|
| 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 value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters. NoteIf you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different. | 02fb3da4-130e-11e9-8e44-001**** |
CenId | string | Yes | The ID of the 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 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 |
TransitRouterDescription | string | No | The description of the Enterprise Edition transit router. The description must be 2 to 256 characters in length. The description must start with a letter but cannot start with | testdesc |
DryRun | boolean | No | Specifies whether to perform a dry run. 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 the ListTransitRouterAvailableResource operation to query the regions that support multicast. | false |
TransitRouterCidrList | array | No | The CIDR blocks of the transit router. You can add up to five CIDR blocks in each call. For more information about CIDR blocks of transit routers, see CIDR blocks of transit routers. NoteOnly Enterprise Edition transit routers support CIDR blocks. | |
object | No | The CIDR blocks to be added to the transit router. You can specify up to five CIDR blocks in each call. For more information about CIDR blocks of transit routers, see CIDR blocks of transit routers. NoteOnly 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 CIDR block. The name must be 1 to 128 characters in length. | nametest |
Description | string | No | The description of the 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 | No | The information about the tags. You can specify at most 20 tags in each call. | |
object | No | The information about the tags. You can specify at most 20 tags in each call. | ||
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. | tagtest |
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 |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2023-01-03 | The error codes of the API operation change. | |||||
| ||||||
2022-12-22 | The error codes of the API operation change. | |||||
|