Creates an inter-region connection on an Enterprise Edition transit router.
Operation Description
You must purchase a bandwidth plan before you can create an inter-region connection. For more information, see CreateCenBandwidthPackage.
CreateTransitRouterPeerAttachment is an asynchronous operation. After you send a request, the system returns an inter-region connection ID and runs the task in the background. You can call the ListTransitRouterPeerAttachments operation to query the status of an inter-region connection.
- If an inter-region connection is in the Attaching state, the inter-region connection is being created. You can query the inter-region connection but cannot perform other regions.
- If an inter-region connection is in the Attached state, the inter-region connection is created.
debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cen:CreateTransitRouterPeerAttachment | Write |
|
| 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 use the client to generate the value, but you must make sure that it is unique among all requests. The client token can contain only ASCII characters. Note
If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different.
| 02fb3da4-130e-11e9-8e44-001**** |
CenId | string | No | The ID of the Cloud Enterprise Network (CEN) instance. | cen-j3jzhw1zpau2km**** |
TransitRouterId | string | No | The ID of the local Enterprise Edition transit router. | tr-bp1su1ytdxtataupl**** |
RegionId | string | No | The ID of the region where the local Enterprise Edition transit router is deployed. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
TransitRouterAttachmentName | string | No | The name of the inter-region connection. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. | testname |
TransitRouterAttachmentDescription | string | No | The description of the inter-region connection. The description must be 2 to 256 characters in length. The description must start with a letter but cannot start with | testdesc |
PeerTransitRouterId | string | Yes | The ID of the peer transit router. | tr-m5eq27g6bndum7e88**** |
PeerTransitRouterRegionId | string | No | The ID of the region where the peer transit router is deployed. | cn-qingdao |
AutoPublishRouteEnabled | boolean | No | Specifies whether to enable the local Enterprise Edition transit router to automatically advertise the routes of the inter-region connection to the peer transit router. Valid values:
| false |
Bandwidth | integer | No | The maximum bandwidth value of the inter-region connection. Unit: Mbit/s. | 2 |
CenBandwidthPackageId | string | No | The ID of the bandwidth plan that is used to allocate bandwidth to the inter-region connection. If this parameter is not set, the system allocates bandwidth that is used for testing purposes to the inter-region connection. The default bandwidth for testing purpose is 1 Kbit/s. You can use the bandwidth to test the connectivity of IPv4 networks. | cenbwp-3xrxupouolw5ou**** |
DryRun | boolean | No | Specifies whether to perform a dry run. Default values:
| false |
BandwidthType | string | No | The method that is used to allocate bandwidth to the inter-region connection. Valid values: BandwidthPackage: allocates bandwidth from a bandwidth plan. | BandwidthPackage |
Tag | object [] | No | The information about the tags. You can specify at most 20 tags in each call. | |
Key | string | No | 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 You can specify at most 20 tag keys. | tag_A1 |
Value | string | No | The tag value. The tag value can be 0 to 128 characters in length, and cannot start with Each tag key must have a unique tag value. You can specify at most 20 tag values in each call. | value_A1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"TransitRouterAttachmentId": "tr-attach-nwkiqfvw22qesz****",
"RequestId": "59422BF5-BAAD-4CFD-9019-9557BD3ACFA3"
}
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. | The error message returned because the specified bandwidth value exceeds the maximum bandwidth value of the bandwidth plan. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2023-01-04 | The error codes of the API operation change. | see changesets | ||||
| ||||||
2022-12-22 | The error codes of the API operation change. | see changesets | ||||
|