All Products
Search
Document Center

Express Connect:CreateExpressConnectRouterAssociation

Last Updated:Aug 13, 2024

Associates a virtual private cloud (VPC) or a transit router (TR) with an Express Connect router (ECR).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
expressconnectrouter:CreateExpressConnectRouterAssociationcreate
  • ExpressConnectRouter
    acs:expressconnectrouter::{#accountId}:expressconnectrouter/{#EcrId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EcrIdstringYes

The ECR ID.

ecr-mezk2idmsd0vx2****
AssociationRegionIdstringYes

The region ID of the resource to be associated.

cn-hangzhou
TransitRouterOwnerIdlongNo

The ID of the Alibaba Cloud account that owns the TR. Default value: ID of the Alibaba Cloud account that logs in.

Note If you want to connect to a network instance that belongs to a different account, this parameter is required.
189159362009****
TransitRouterIdstringNo

The TR ID.

tr-2ze4i71c6be454e2l****
CenIdstringNo

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

cen-of3o1the3i4gwb****
VpcOwnerIdlongNo

The ID of the Alibaba Cloud account that owns the VPC. Default value: ID of the Alibaba Cloud account that logs in.

Note If you want to connect to a network instance that belongs to a different account, this parameter is required.
132193271328****
VpcIdstringNo

The VPC ID.

vpc-bp1h37fchc6jmfyln****
AllowedPrefixesarrayNo

The allowed route prefixes.

stringNo

The allowed route prefix.

192.0.20.0/28
CreateAttachmentbooleanNo

Specifies whether to initiate an association on the TR when the ECR is associated with the TR. Valid values:

  • true: You do not need to initiate an association on the TR.
  • false: You need to initiate an association on the TR.
true
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run.
  • false (default): performs a dry run and performs the actual request.
false
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 specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
02fb3da4-130e-11e9-8e44-00****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

05130E79-588D-5C40-A718-C4863A59****
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
True
Codestring

The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.

200
Messagestring

The returned message.

OK
HttpStatusCodeinteger

The HTTP status code.

200
DynamicCodestring

The dynamic error code.

IllegalParamFormat.EcrId
DynamicMessagestring

The dynamic part in the error message. This parameter is used to replace the %s variable in ErrMessage.

Note For example, if the value of ErrMessage is The Value of Input Parameter %s is not valid and the value of DynamicMessage is DtsJobId, the request parameter DtsJobId is invalid.
The param format of EcrId **** is illegal.
AccessDeniedDetailstring

The details about the access denial.

Authentication is failed for ****
AssociationIdstring

The ID of the association between the ECR and the VPC or TR.

ecr-assoc-9p2qxx5phpca2m****

Examples

Sample success responses

JSONformat

{
  "RequestId": "05130E79-588D-5C40-A718-C4863A59****",
  "Success": true,
  "Code": "200",
  "Message": "OK",
  "HttpStatusCode": 200,
  "DynamicCode": "IllegalParamFormat.EcrId\n",
  "DynamicMessage": "The param format of EcrId **** is illegal.\n",
  "AccessDeniedDetail": "Authentication is failed for ****\n",
  "AssociationId": "ecr-assoc-9p2qxx5phpca2m****"
}

Error codes

HTTP status codeError codeError messageDescription
400IncorrectStatus.EcrEcr Status does not allow current operation.The status of the express connect gateway instance does not allow the current operation. Currently, other operations are being performed or the express connect gateway instance is being deleted. Please try again later.
400OperationDenied.ForceDeletingThe current instance is being deleted.Your current operation is rejected and the leased line gateway instance is being forcibly deleted. Please try again later.
400UnsupportedRegionFeature not supported in specified region.The specified region does not support the leased line gateway function.
400QuotaExceeded.VpcCountPerEcrThe number of VPC bound to the ECR exceeds the quota.The number of VPCs that can be bound to a dedicated gateway instance has reached the quota limit. Please contact your business manager to apply for a larger quota.
400QuotaExceeded.TrCountPerEcrThe number of TR bound to the ECR exceeds the quota.The number of TRs that can be bound to a dedicated gateway instance has reached the quota limit. Please contact your business manager to apply for a larger quota.
400IllegalParamFormat.AllowedPrefixesThe prefix parameter format is invalid. Procedure.The format of the specified prefix route segment is incorrect.
400OperationDenied.NotGrantedByNodeOwnerThe node owner is not authorized.Your current operation is rejected, and the leased line gateway product is not authorized.
400OperationFailed.CdtNotOpenedThe Cdt function is disabled.The current operation fails, and the Alibaba Cloud data transmission function is not enabled.
400OperationFailed.CdtCrossBoarderNotOpenedThe Cdt cross-border transmission function is disabled.The current operation fails. The cross-border data transmission function of Alibaba Cloud is not enabled.
400OperationFailed.CrossBorderNotAllowedThere is no qualification for creating cross-border links.The operation failed. The current enterprise does not have the permission to create cross-border links. Please contact your business manager to add this permission.
400ResourceNotFound.CenIdCenId not found.Cen instance does not exist
400ResourceNotFound.TrIdTRId not found.TR instance does not exist
400Conflict.ASNOfVBRASN already used by other VBR.The current VBR BgpGroup localAsn is inconsistent with the ECR asn. Adjust the consistency and rebind.
400MissingParam.%sThe param of %s is missing.The request parameters are not specified. Please check the corresponding parameters and try again.
400IllegalParamFormat.%sThe param format of %s is illegal.Illegal parameter format
400IllegalParamFormat.CenIdThe format of the entered Cen instance ID is incorrect.The format of the currently entered Cen instance ID is incorrect
400OperationDenied.CrossBidAssociatingCross-border binding of resources is subject to compliance constraints.Your current binding resources involve cross-Chinese site resources and overseas site resources. Due to compliance constraints, please contact your business manager for communication and handling.
400ExclusiveParam.TransitRouterIdAndVpcIdA private network instance cannot be bound to a forwarding router instance at the same time.The VPC instance and the forwarding router instance cannot be bound at the same time, please select one of the instances to bind after adjustment.
400IllegalParamSize.AllowedPrefixesThe number of prefix routes exceeded the quota.The number of prefix routes you have entered exceeds the quota. Please apply for expansion.
400OperationDenied.CrossAccountAttachingIf the forwarding router is bound to another account, perform this operation on the same account.The current operation is rejected. When you bind another account to the forwarding router, you need to do this operation under this account.
400OperationDenied.AttachmentInCurrentRegionExistedOnly one forwarding router can be bound to an area.The current operation is rejected. The leased line gateway instance can only bind one forwarding router in the same region.
400Conflict.LockThere are other unfinished operations.You currently have other unfinished operations, please try again later
400OperationFailed.CallingVpcYaochiThe system is abnormal. Please try again later.The operation failed and the system is abnormal. Please try again later. If the retry still fails, please contact your business manager for help.
404ResourceNotFound.EcrIdEcrId not found.ECR instance does not exist

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-28API Description Update. The Error code has changedView Change Details
2024-03-28The Error code has changedView Change Details