Creates an Enterprise Edition transit router.

Description

You can call this operation to create an Enterprise Edition transit router. For more information about the regions that support Enterprise Edition transit routers, see Transit routers.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No CreateTransitRouter

The operation that you want to perform. Set the value to CreateTransitRouter.

CenId String Yes cen-j3jzhw1zpau2km****

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

RegionId String Yes cn-shanghai

The ID of the region where you want to deploy the Enterprise Edition transit router.

ClientToken String No 02fb3da4-130e-11e9-8e44-001****

The client token that is used to ensure the idempotence of the request.

You can use the client to generate a token, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

TransitRouterName String No testname

The name of the transit router.

The name must be 2 to 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.

TransitRouterDescription String No testdesc

The description of the transit router.

The description must be 2 to 256 characters in length. The description must start with a letter but cannot start with http:// or https://.

DryRun Boolean No false

Specifies whether to only precheck the request. Check items include permissions and the status of the transit router. Valid values:

  • false (default): sends a normal request. If the request passes the precheck, an Enterprise Edition transit router is created.
  • true: sends a request for precheck only. No Enterprise Edition transit router is created after the request passes the precheck. If you select this option, the system checks whether the required parameters are set, and whether the request syntax is valid. If the request fails to pass the precheck, the system returns an error. If the request passes the precheck, the system returns the ID of the request.

Response parameters

Parameter Type Example Description
RequestId String 404DA7EC-F495-44B5-B543-6EDCDF90F3D1

The ID of the request.

TransitRouterId String tr-uf6llz2286805i44g****

The ID of the Enterprise Edition transit router.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateTransitRouter
&CenId=cen-j3jzhw1zpau2km****
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

<CreateTransitRouterResponse>
  <RequestId>404DA7EC-F495-44B5-B543-6EDCDF90F3D1</RequestId>
  <TransitRouterId>tr-uf6llz2286805i44g****</TransitRouterId>
</CreateTransitRouterResponse>

JSON format

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

Error codes

HttpCode Error code Error message Description
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. You cannot create transit routers that use the same ID in one region.

For a list of error codes, visit the API Error Center.