CreateTransitRouterPeerAttachment
After network instances (VPCs, VBRs, and IPsec connections) are connected to a transit router, to enable communication between network instances in different regions, you must create a cross-region connection under the transit router to which the network instances are connected. You can call the CreateTransitRouterPeerAttachment operation to create a cross-region connection for an Enterprise Edition transit router instance.
Operation description
-
An Enterprise Edition transit router supports the following bandwidth allocation methods:
-
Allocate from a bandwidth plan:
To use this method, you must first purchase a bandwidth plan and allocate bandwidth to the cross-region connection from the bandwidth plan. For more information about how to purchase a bandwidth plan, see CreateCenBandwidthPackage.
-
Pay-by-data-transfer:
To use this method, you must set a bandwidth limit for the cross-inter-region connection. You are billed based on the actual data transfer of the cross-inter-region connection. For more information about billing, see Cross-region data transfer.
-
-
The CreateTransitRouterPeerAttachment operation is asynchronous. The system returns a cross-inter-region connection ID, but the connection is not fully created and the creation task is still running in the background. You can call the ListTransitRouterPeerAttachments operation to query the status of the cross-inter-region connection.
When the cross-region connection is in the Attaching state, inter-region connection is being created. In this state, you can only query inter-region connection and cannot perform other operations.
When the cross-region connection is in the Attached state, inter-region connection is created.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:CreateTransitRouterPeerAttachment |
create |
CenInstance
TransitRouter
|
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 token on your client and ensure that it is unique across different requests. The 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 is different for each API request. |
02fb3da4-130e-11e9-8e44-001**** |
| CenId |
string |
No |
The Cloud Enterprise Network (CEN) instance ID. |
cen-j3jzhw1zpau2km**** |
| TransitRouterId |
string |
No |
The ID of the local Enterprise Edition transit router instance. |
tr-bp1su1ytdxtataupl**** |
| RegionId |
string |
No |
The region ID of the local Enterprise Edition transit router instance. You can call the DescribeRegions operation to query region IDs. |
cn-hangzhou |
| TransitRouterAttachmentName |
string |
No |
The name of the cross-region connection. The name can be empty or 1 to 128 characters in length. It cannot start with http:// or https://. |
testname |
| TransitRouterAttachmentDescription |
string |
No |
The description of the cross-region connection. The description can be empty or 1 to 256 characters in length. It cannot start with http:// or https://. |
testdesc |
| PeerTransitRouterId |
string |
Yes |
The ID of the peer transit router instance. |
tr-m5eq27g6bndum7e88**** |
| PeerTransitRouterRegionId |
string |
No |
The region ID of the peer transit router instance. |
cn-qingdao |
| AutoPublishRouteEnabled |
boolean |
No |
Specifies whether to enable the Enterprise Edition transit router to automatically publish the routes of the cross-region connection to the peer region. Valid values:
|
false |
| Bandwidth |
integer |
No |
The bandwidth of the cross-inter-region connection. Unit: Mbit/s.
|
2 |
| CenBandwidthPackageId |
string |
No |
The ID of the bandwidth plan to associate with the cross-region connection. Note
If BandwidthType is set to DataTransfer, you do not need to configure this parameter. |
cenbwp-3xrxupouolw5ou**** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run on the request, including permission and instance status checks. Valid values:
|
false |
| BandwidthType |
string |
No |
The bandwidth allocation method for the cross-inter-region connection. Valid values:
|
BandwidthPackage |
| Tag |
array<object> |
No |
The tag information. You can specify up to 20 tags at a time. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key of the resource. The tag key cannot be an empty string. It can be up to 64 characters in length and cannot start with You can specify up to 20 tag keys at a time. |
tag_A1 |
| Value |
string |
No |
The tag value of the resource. The tag value cannot be empty. It can be up to 128 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://. Each tag key corresponds to a tag value. You can specify up to 20 tag values at a time. |
value_A1 |
| DefaultLinkType |
string |
No |
The default link type. Valid values: Platinum and Gold. Default value: Gold. You can set this parameter to Platinum only when the bandwidth allocation method is pay-by-data-transfer. |
Gold |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
59422BF5-BAAD-4CFD-9019-9557BD3ACFA3 |
| TransitRouterAttachmentId |
string |
The ID of the cross-region connection. |
tr-attach-nwkiqfvw22qesz**** |
Examples
Success response
JSON format
{
"RequestId": "59422BF5-BAAD-4CFD-9019-9557BD3ACFA3",
"TransitRouterAttachmentId": "tr-attach-nwkiqfvw22qesz****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationUnsupported.TransitRouterRegionId | The specified TransitRouterRegion 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 do not have the permissions to create the service-linked role whose role name is AliyunServiceRolePolicyForCEN and service name is cen.aliyuncs.com. You must acquire the ram:CreateServiceLinkedRole permission before you can create the service-linked role. |
| 400 | InvalidTransitRouterId.NotFound | TransitRouterId is not found. | The error message returned because the ID of the transit router does not exist. |
| 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 Basic Edition transit routers do not support the operation. |
| 400 | MissingParam.Bandwidth | The parameter Bandwidth is mandatory. | The error message returned because no bandwidth value is specified. You must specify a bandwidth value. |
| 400 | IllegalParam.Bandwidth | Bandwidth is illegal. | The error message returned because the specified bandwidth plan ID is invalid. |
| 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.TransitRouterType | The specified TransitRouterType does not support the operation. | The error message returned because this operation is not supported by the specified type of transit router. |
| 400 | OperationUnsupported.BandwidthType | The specified BandwidthType does not support the operation. | The error message returned because this operation is not supported by the specified bandwidth type. |
| 400 | InvalidCenId.NotFound | CenId is not found. | The error message returned because the specified CEN instance does not exist. |
| 400 | IllegalParam.BandwidthType | BandwidthType is illegal. | The error message returned because the specified bandwidth plan type is invalid. |
| 400 | MissingParam.CenIdOrRegionId | Either CenId or RegionId must be specified. | The error message returned because the CenId or RegionId parameter is not set. |
| 400 | OperationUnsupported.BandwidthHS | This bandwidth limit can only be set in China-AsiaPacific-HS | |
| 400 | OperationUnsupported.CenFullLevel | CEN full level does not support TransitRouter | The error message returned because CEN instances of the Full type do not support Enterprise Edition transit routers. |
| 400 | OperationUnsupported.CloudDataTransferService | CCN region not support cloud data transfer service. | The error message returned because the Cloud Data Transfer (CDT) service is not supported in the region of the CCN instance. |
| 400 | InvalidPeerTransitRouterId.NotFound | The specified PeerTransitRouterId is not found. | The error message returned because the specified peer transit router ID (PeerTransitRouterId) does not exist. |
| 400 | IllegalParam.RegionId | RegionId is illegal. | The error message returned because the specified region is invalid. |
| 400 | IllegalParam.PeerRegionId | PeerRegionId is illegal. | The error message returned because the specified peer region ID (PeerRegionId) is invalid. |
| 400 | IllegalParam.TransitRouterRegionId | TransitRouterRegionId is illegal. | The error message returned because the specified transit router region ID (TransitRouterRegionId) is invalid. |
| 400 | InvalidOperation.CenInstanceStatus | The CEN instance is not in a valid state for the operation. | |
| 400 | IncorrectStatus.TransitRouter | The status of TransitRouter is incorrect. | The error message returned because the status of the transit router does not support this operation. Try again later. |
| 400 | InvalidOperation.BwpNotAssociated | Operation is invalid because a bandwidth package corresponding to the geographic span is not associated. | The error message returned because this operation is not supported when no bandwidth plan is applied to the specified region. |
| 400 | InvalidOperation.BwpBusinessStatus | The CBN bandwidth package is not in a valid business state for the operation. | The error message returned because this operation is not supported when the specified bandwidth plan is in an unstable state. |
| 400 | IllegalParam.CenBandwidthPackageId | Parameter CenBandwidthPackageId is illegal. | The error message returned because the specified bandwidth plan ID (CenBandwidthPackageId) is invalid. |
| 400 | InvalidOperation.BwpBandwidthExceeded | Operation is invalid because the total bandwidth limit has exceeded that of the bandwidth package. | |
| 400 | ParameterIllegal.CdtDefaultLinkTypeOnlySupportPlatinumOrGold | DataTransfer only support Platinum and Gold. | DataTransfer only support Platinum and Gold. |
| 400 | ParameterIllegal.BandwidthPackageDefaultLinkTypeOnlySupportGold | Cen bandwidthPackage only support Gold. | Cen bandwidthPackage only support Gold. |
| 400 | ParameterIllegal.CdtDefaultLinkTypeOnlySupportGold | CDT only support Gold when both transitrouters for cross regional connections are not all enterprise version. | CDT only support Gold when both transitrouters for cross regional connections are not all enterprise version. |
| 400 | OperationNotAllowed.DefaultLinkTypeOnlySupportGold | Operation is not allowed because this user can only set default link type to Gold. | This user can only set the default link type to Gold. |
| 400 | OperationInvalid.UserCanNotBuyCrossBorderBwp | According to the laws and regulations of the operator and mainland China, you are currently not eligible to purchase or renew a cross-border bandwidth package. Please contact online customer service or your business manager for consultation. | According to the laws and regulations of the operator and mainland China, you are currently not eligible to purchase or renew a cross-border bandwidth package. Please contact online customer service or your business manager for consultation. |
| 400 | OperationInvalid.IdentityRegistrationStatusNotSupport | Real name registration of enterprises required. | If you want to create a cross-region connection between Chinese mainland regions or between a Chinese mainland region and a region outside the Chinese mainland, ensure that your account meets the following requirements: · Account Type is Enterprise: You must complete information on the Basic Information tab in the Account Center console and the account type must be set to Enterprise. For details, see Create an Alibaba Cloud account. · Enterprise identity verification is completed: Your account must have passed the enterprise identity verification and select the option for "Purchase cloud resources in Chinese mainland or use acceleration regions that include Chinese mainland". For details, see Enterprise identity verification. |
| 400 | InvalidOperation.OnlyOneRegionSupportIpv6 | Peer Attachment is only allowed when both regions support IPv6 or do not support IPv6 at all. | Peer Attachment is only allowed when both regions support IPv6 or do not support IPv6 at all. |
| 400 | InvalidOperation | Operation is invalid. | The error message returned because the operation is invalid. |
| 400 | Forbidden.ResourceOwnerTransitRouterServiceExpired | The transit router service of the account to which the resource belongs has been suspended due to arrears. Please notify the other party to renew the service and try again. | The transit router service of the account to which the resource belongs has been suspended. Please notify the other party to renew the service and try again. |
| 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 | OperationUnsupported.RegionId | The specified RegionId does not support the operation. | The error message returned because this operation is not supported in the specified region. |
| 400 | QuotaExceeded.Bandwidth | Bandwidth quota exceeded. | Bandwidth quota exceeded. |
| 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 | InvalidParameter.PeerTransitRouterId | The specified parameter PeerTransitRouterId is invalid. | The PeerTransitRouterId entered is illegal. |
| 400 | InvalidParameter.ResourceType | The specified parameter ResourceType is invalid. | The ResourceType specified by the user is illegal. |
| 400 | ParameterIllegal.CdtDefaultLinkTypeOnlySupportUnderlaySilver | CDT only support UnderlaySilver when both transitrouters for cross regional connections are not all enterprise version. | CDT only support UnderlaySilver when both transitrouters for cross regional connections are not all enterprise version. |
| 400 | ParameterIllegal.DefaultLinkTypeOnlySupportUnderlaySilver | Cen bandwidthPackage only support UnderlaySilver. | When the bandwidth allocation method is bandwidth package, the default link type supports only silver (UnderlaySilver) |
| 400 | OperationNotAllowed.DefaultLinkTypeOnlySupportUnderlaySilver | This user can only set the default link type to UnderlaySilver. | This user can only set the default link type to UnderlaySilver. |
| 400 | OperationFailed.ValidateVbrInstanceFailedForLowLatencyCircuit | Operation failed when validate VBR instance for Low Latency Circuit. | Failed to verify the loaded VBR instance when creating a low latency link. |
| 400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | The input parameter Tag Value is invalid. |
| 400 | InvalidParameter.CenBandwidthPackageId | The specified parameter CenBandwidthPackageId is invalid. | The parameter CenBandwidthPackageId entered is illegal. |
| 400 | InvalidParameter.CenId | The specified parameter CenId is invalid. | The entered parameter CenId is invalid. |
| 400 | InvalidParameter.TransitRouterId | The specified parameter TransitRouterId is invalid. | The parameter TransitRouterId entered is illegal. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.