Creates a cross-region connection from an Enterprise Edition transit router.

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 CreateTransitRouterPeerAttachment

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

PeerTransitRouterId String Yes tr-m5eq27g6bndum7e88****

The ID of the peer 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 ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

CenId String No cen-j3jzhw1zpau2km****

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

TransitRouterId String No tr-bp1su1ytdxtataupl****

The ID of the local Enterprise Edition transit router.

RegionId String No cn-hangzhou

The ID of the region where the local Enterprise Edition transit router is deployed.

You can call the DescribeRegions operation to query region IDs.

TransitRouterAttachmentName String No testname

The name of the cross-region connection.

The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). It must start with a letter.

TransitRouterAttachmentDescription String No testdesc

The description of the cross-region connection.

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

PeerTransitRouterRegionId String No cn-qingdao

The ID of the region where the peer transit router is deployed.

AutoPublishRouteEnabled Boolean No false

Specifies whether to enable automatic route advertisement for the local Enterprise Edition transit router. After you enable automatic route advertisement, the local Enterprise Edition transit router automatically advertises routes of the cross-region connection to the peer transit router. Valid values:

  • false: disables automatic route advertisement. This is the default value.
  • true: enables automatic route advertisement.
Bandwidth Integer No 2

The bandwidth allocated to the cross-region connection. Unit: Mbit/s.

CenBandwidthPackageId String No cenbwp-3xrxupouolw5ou****

The ID of the bandwidth plan that is used to allocate bandwidth to the cross-region connection.

If this parameter is not set, the system allocates bandwidth that is used for testing purposes to the cross-region connection. The default bandwidth for testing is 1 Kbit/s, which is used only to verify network connectivity.

DryRun Boolean No false

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

  • false (default): sends a normal request. If the request passes the precheck, the cross-region connection is created.
  • true: sends a request for precheck only. The cross-region connection is not 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 59422BF5-BAAD-4CFD-9019-9557BD3ACFA3

The ID of the request.

TransitRouterAttachmentId String tr-attach-nwkiqfvw22qesz****

The ID of the cross-region connection.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateTransitRouterPeerAttachment
&PeerTransitRouterId=tr-m5eq27g6bndum7e88****
&<Common request parameters>

Sample success responses

XML format

<CreateTransitRouterPeerAttachmentResponse> 
  <TransitRouterAttachmentId>tr-attach-nwkiqfvw22qesz****</TransitRouterAttachmentId>
  <RequestId>59422BF5-BAAD-4CFD-9019-9557BD3ACFA3</RequestId>
</CreateTransitRouterPeerAttachmentResponse>

JSON format

{
  "TransitRouterAttachmentId": "tr-attach-nwkiqfvw22qesz****",
  "RequestId": "59422BF5-BAAD-4CFD-9019-9557BD3ACFA3"
}

Error codes

HttpCode Error code Error message Description
400 OperationUnsupported.TransitRouterRegionId The specified TransitRouterRegion does not support the operation. The error message returned because the specified region does not support the operation.
400 NoPermission.AliyunServiceRolePolicyForCEN You are not authorized to create the service linked role. Role Name: AliyunServiceRolePolicyForCEN. Service Name: cen.aliyuncs.com. Make sure that the user has been granted the ram:CreateServiceLinkedRole permission. The error message returned because you are unauthorized to create the service-linked role AliyunServiceRolePolicyForCEN for the service ServiceName:cen.aliyuncs.com. You must acquire the ram:CreateServiceLinkedRole permission before you can perform the operation.
400 InvalidTransitRouterId.NotFound TransitRouterId is not found. The error message returned because the ID of the transit router is invalid.
400 IllegalParam.PeerTransitRouterId PeerTransitRouterId is illegal. The error message returned because the ID of the peer transit router is invalid.
400 OperationUnsupported.TransitRouterId TransitRouterId is unsupported. The error message returned because the specified type of transit router does not support the operation.
400 MissingParam.Bandwidth The parameter Bandwidth is mandatory. The error message returned because no bandwidth is specified.
400 IllegalParam.Bandwidth Bandwidth is illegal The error message returned because the specified bandwidth value is invalid.

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