All Products
Search
Document Center

Cloud Enterprise Network:CreateTransitRouter

Last Updated:Oct 26, 2026

Creates an Enterprise Edition transit router instance.

Operation description

  • You can invoke the CreateTransitRouter operation to create an Enterprise Edition transit router instance to forward traffic and perform routing. Enterprise Edition transit routers are available only in specific regions. For more information about the supported regions, see What is Cloud Enterprise Network?.

  • The CreateTransitRouter operation is asynchronous. After you invoke this operation, the system returns the Enterprise Edition transit router instance ID. However, the instance is not immediately created, and the creation node is still running in the background. You can invoke the ListTransitRouters operation to query the status of the Enterprise Edition transit router instance.
    • If the Enterprise Edition transit router instance is in the Creating state, the instance is being created. In this state, you can only execute query operations on the instance and cannot perform other operations.

    • If the Enterprise Edition transit router instance is in the Active state, the instance is created.

  • You can create only one transit router instance in each region for a Cloud Enterprise Network (CEN) instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cen:CreateTransitRouter

create

CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

TransitRouter

acs:cen:*:{#accountId}:centransitrouter/*

None 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 generate the parameter value on your client. Make sure that the token is unique among different requests. The client token can contain only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request is different.

02fb3da4-130e-11e9-8e44-001****

CenId

string

Yes

The Cloud Enterprise Network (CEN) instance ID.

cen-j3jzhw1zpau2km****

RegionId

string

Yes

The region ID of the Enterprise Edition transit router instance.

You can call the DescribeChildInstanceRegions operation to query region IDs.

cn-zhangjiakou

TransitRouterName

string

No

The name of the Enterprise Edition transit router instance.

The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://.

testname

TransitRouterDescription

string

No

The description of the Enterprise Edition transit router instance.

The description can be empty or 1 to 256 characters in length, and cannot start with http:// or https://.

testdesc

DryRun

boolean

No

Specifies whether to perform a dry run on the creation request. The dry run includes permission and instance status checks. Valid values:

  • false (default): sends a normal request and creates the Enterprise Edition transit router instance after the request passes the check.

  • true: sends a dry run request and performs only the check without creating the Enterprise Edition transit router instance. The system checks whether required parameters are specified and whether the request format is valid. If the request fails the check, the system returns an error. If the request passes the check, the system returns the error code DryRunOperation.

false

SupportMulticast

boolean

No

Specifies whether to enable the multicast feature for the Enterprise Edition transit router. Valid values:

  • false (default): disables the feature.

  • true: enables the feature.

The multicast feature is supported only by Enterprise Edition transit routers in specific regions. You can call the ListTransitRouterAvailableResource operation to query the regions that support the multicast feature.

false

TransitRouterCidrList

array<object>

No

The transit router CIDR blocks.

object

No

The transit router CIDR blocks.

You can add up to 5 transit router CIDR blocks at a time. For more information about transit router CIDR blocks, see Transit router CIDR blocks.

Note

Only Enterprise Edition transit routers support adding CIDR blocks.

Cidr

string

No

The transit router CIDR block.

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 for the transit router CIDR block to the transit router route table. Valid values:

  • true (default): allows the system to automatically add the route.

    If you select this value, after you create a VPN connection of the private network gateway type and create a route learning correlation for the VPN connection, the system automatically adds a route entry to the transit router route table that has a route learning correlation with the VPN connection:

    The destination CIDR block of the route is a blackhole route for the transit router CIDR block. The transit router CIDR block refers to the CIDR block to which a gateway IP address has been assigned for the IPsec connection.

    The blackhole route is propagated only to the route table of the Virtual Border Router (VBR) instance under the transit router.

  • false: does not allow the system to automatically add the route.

true

Tag

array<object>

No

The tag information.

object

No

The tag information.

You can specify up to 20 tags at a time.

Key

string

No

The tag key of the resource.

The tag key cannot be an empty string. The tag key can be up to 64 characters in length, and cannot start with aliyun or acs:. The tag key cannot contain http:// or https://.

You can specify up to 20 tag keys at a time.

tagtest

Value

string

No

The tag value of the resource.

The tag value cannot be empty. The tag value can be up to 128 characters in length, and cannot start with aliyun or acs:. The tag value cannot contain http:// or https://.

Each tag key corresponds to a tag value. You can specify up to 20 tag values at a time.

TagValue

Response elements

Element

Type

Description

Example

object

The response result.

TransitRouterId

string

The Enterprise Edition transit router instance ID, which is used to forward traffic and perform routing. After the instance is created, it is in the Creating state. You must wait until the instance enters the Active state before you can proceed to What to do next. You can invoke the ListTransitRouters operation to query the instance status.

tr-uf6llz2286805i44g****

RequestId

string

The request ID.

404DA7EC-F495-44B5-B543-6EDCDF90F3D1

Examples

Success response

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.
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.
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.TagValue The specified parameter TagValue is invalid. The input parameter Tag Value is invalid.
400 ParamExclusive.ServiceModeAndSupportJumboFrame Parameter ServiceMode And SupportJumboFrame are mutually exclusive. Parameter ServiceMode And SupportJumboFrame are mutually exclusive.
400 OperationUnsupported.SupportJumboFrame JumboFrame is unsupported. JumboFrame is unsupported.
400 ParamExclusive.SupportJumboFrameAndSupportMulticast Transit Router can not support JumboFrame and Multicast at the same time. Transit Router can not support JumboFrame and Multicast at the same time.
400 IllegalParam.SupportJumboFrame The error message returned because Basic Edition transit routers do not support JumboFrame. The Basic Forwarding Router does not support multicast.
400 InvalidParameter.CenId The specified parameter CenId is invalid. The entered parameter CenId is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.