All Products
Search
Document Center

Cloud Enterprise Network:CreateTransitRouter

Last Updated:Nov 18, 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:CreateTransitRoutercreate
*CenInstance
acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}
*TransitRouter
acs:cen:*:{#accountId}:centransitrouter/*
    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
TransitRouterCidrListarray<object>No

The CIDR blocks to be added to the transit router.

objectNo

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.
CidrstringNo

The CIDR block of the transit router.

192.168.10.0/24
NamestringNo

The name of the transit router CIDR block.

The name must be 1 to 128 characters in length.

nametest
DescriptionstringNo

The description of the transit router 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)

    If you set the value to true, after you create a VPN attachment on a private VPN gateway and enable route learning for the VPN attachment, the system automatically adds the following route to the route table of the transit router that is in route learning relationship with the VPN attachment:

    A blackhole route whose destination CIDR block is the transit router CIDR block, which refers to the CIDR block from which gateway IP addresses are allocated to the IPsec-VPN connection.

    The blackhole route is advertised only to the route tables of virtual border routers (VBRs) connected to the transit router.

  • false

true
Tagarray<object>No

The tags.

objectNo

The tags.

You can specify at most 20 tags.

KeystringNo

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

You can specify at most 20 tag keys in each call.

tagtest
ValuestringNo

The tag value.

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

Each key-value must be unique. 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.
400IllegalParam.RegionIdThe Specified Parameter RegionId is illegal.The region specified in the parameter is invalid.
400OperationFailed.PostPay95BwpNotAllowEnterpriseTrCbn with post pay 95 bandwidth package does not allow enterprise tr.Cbn with post pay 95 bandwidth package does not allow enterprise tr.
400Forbidden.TransitRouterServiceExpiredThe transit router service is out of service.The transit router service has been suspended due for payment. Please renew the service and try again.
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
2024-10-28The Error code has changedView Change Details
2024-07-10The Error code has changedView Change Details
2023-10-20The Error code has changedView Change Details
2023-01-03The Error code has changedView Change Details
2022-12-22The Error code has changedView Change Details