All Products
Search
Document Center

Cloud Enterprise Network:CreateTransitRouter

Last Updated:Mar 06, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cen:CreateTransitRouterWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

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****
CenIdstringYes

The ID of the Cloud Enterprise Network (CEN) instance.

cen-j3jzhw1zpau2km****
RegionIdstringYes

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
TransitRouterNamestringNo

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
TransitRouterDescriptionstringNo

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
DryRunbooleanNo

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 (default): sends the request. If the request passes the check, an Enterprise Edition transit router is created.
  • true: checks the request but does not create the Enterprise Edition transit router. If you use this value, the system checks whether the required parameters are set, and whether the request syntax is valid. If the request fails the check, an error message is returned. If the request passes the check, the DryRunOperation error code is returned.
false
SupportMulticastbooleanNo

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

  • false (default): no
  • true: yes

The multicast feature is supported only in specific regions. You can call ListTransitRouterAvailableResource to query the regions that support multicast.

false
TransitRouterCidrListobject []No

The CIDR blocks of the transit router.

You can add up to five CIDR blocks at a time. For more information about CIDR blocks of transit routers, see CIDR blocks of transit routers.

Note Only Enterprise Edition transit routers support CIDR blocks.
CidrstringNo

The CIDR block of the transit router.

192.168.10.0/24
NamestringNo

The name of the CIDR block.

The name must be 1 to 128 characters in length.

nametest
DescriptionstringNo

The description of the CIDR block.

The description must be 1 to 256 characters in length.

desctest
PublishCidrRoutebooleanNo

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 (default): yes.

    A value of true specifies that after you create a private VPN connection and enable route learning for the connection, the system automatically adds a blackhole route to the route table of the transit router to which the VPN connection is attached.

    The destination CIDR block of the blackhole route is the CIDR block of the transit router. The CIDR block of the transit router refers to the CIDR block from which gateway IP addresses are allocated to IPsec-VPN connections.

    The blackhole route is only advertised to the route table of the virtual border router (VBR) that is connected to the transit router.

  • false: no.

true
Tagobject []No

The information about the tags.

You can specify at most 20 tags in each call.

KeystringNo

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 acs: or aliyun. It cannot contain http:// or https://.

You can specify at most 20 tag keys.

tagtest
ValuestringNo

The tag value.

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

Each tag key has a unique tag value. You can specify at most 20 tag values in each call.

TagValue

Response parameters

ParameterTypeDescriptionExample
object
TransitRouterIdstring

The ID of the Enterprise Edition transit router.

tr-uf6llz2286805i44g****
RequestIdstring

The ID of the request.

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

Examples

Sample success responses

JSONformat

{
  "TransitRouterId": "tr-uf6llz2286805i44g****",
  "RequestId": "404DA7EC-F495-44B5-B543-6EDCDF90F3D1"
}

Error codes

HTTP status codeError codeError messageDescription
400OperationUnsupported.RegionIdThe specified Region is not supported.The error message returned because this operation is not supported in the specified region.
400InstanceExist.TransitRouterInstanceThe 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.
400Forbbiden.TransitRouterServiceNotOpenThe user has not open transit router service.The error message returned because the transit router is disabled. Enable the transit router and try again.
400OperationUnsupported.SupportMulticastThe multicast is not supported in the specified region.The error message returned because multicast is not supported in the specified region.
400OperationUnsupported.CenFullLevelCEN full level does not support TransitRouter.-
400IllegalParam.CidrCidr is illegal.The error message returned because the specified CIDR block is invalid.
400Illegal.TrTypeThe TransitRouter type is illegal.The error message returned because the specified type of transit router does not support this operation.
400OperationUnsupported.TransitRouterCidrListThe TransitRouterCidrList is not support in the specified Region.The error message returned because this operation is not supported in the specified region.
400OperationFailed.CidrConflictOperation is invalid because the cidr conflict.The error message returned because the specified CIDR block conflicts with another one.
400IllegalParam.RegionThe specified region is invalid.The error message returned because the specified region is invalid.
400OverLappingExist.CidrThe cidr overlapping exist.The error message returned because CIDR overlapping is already enabled.
400IllegalParam.ServiceModeThe specified ServiceMode is invalid.The error message returned because the specified service mode is invalid.
400ParamExclusive.ServiceModeAndSupportMulticastServiceMode and SupportMulticast is mutually exclusive.The error message returned because transit routers in the current mode do not support multicast.
400ParamExclusive.ServiceModeAndTransitRouterCidrListServiceMode and TransitRouterCidrList is mutually exclusive.The error message returned because transit routers in the current mode do not support CIDR blocks.
400OperationUnsupported.TagThe Tag is not supported in the specified region.The error message returned because transit routers in the current region do not support tags.
400IllegalParam.SupportMulticastBasic Transit router is not support multicast.The error message returned because Basic Edition transit routers do not support multicast.
400ParamExclusive.BasicAndPrimaryStandbyBasic and PrimaryStandby is mutually exclusive.The error message returned because Basic Edition transit routers do not support the PrimaryStandby mode.
400ParamExclusive.BasicAndMultiPrimaryBasic and MultiPrimary is mutually exclusive.The error message returned because Basic Edition transit routers do not support the MultiPrimary mode.
400InvalidParameterInvalid parameter.The error message returned because the parameter is set to an invalid value.
400UnauthorizedThe 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 timeSummary of changesOperation
2023-10-20The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
2023-01-03The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
2022-12-22The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change