全部產品
Search
文件中心

Express Connect:CreateExpressConnectRouterAssociation

更新時間:Aug 18, 2026

專線閘道器 ECR(Express Connect Router)關聯專有網路(VPC)或轉發路由器(TR)。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

expressconnectrouter:CreateExpressConnectRouterAssociation

create

*ExpressConnectRouter

acs:expressconnectrouter::{#accountId}:expressconnectrouter/{#EcrId}

請求參數

名稱

類型

必填

描述

樣本值

EcrId

string

專線閘道器執行個體 ID。

ecr-mezk2idmsd0vx2****

AssociationRegionId

string

關聯資源所屬的地域。

cn-hangzhou

TransitRouterOwnerId

integer

轉發路由器執行個體所屬阿里雲帳號(主帳號)ID。預設值為目前登入的阿里雲帳號 ID。

說明

如果您要載入跨帳號的網路執行個體,本參數為必填。

189159362009****

TransitRouterId

string

轉發路由器 ID。

說明

TransitRouterId 和 VpcId 參數二者互斥且必須提供其一。需先透過 Cbn(2017-09-12) 產品的 CreateTransitRouter API 建立轉發路由器並取得 TransitRouterId。

tr-2ze4i71c6be454e2l****

CenId

string

雲企業網執行個體 ID。

說明

指定 TransitRouterId 時 CenId 為必填,需先透過 Cbn(2017-09-12) 產品的 CreateCen 建立 CEN 執行個體並取得 CenId。

cen-of3o1the3i4gwb****

VpcOwnerId

integer

VPC 執行個體所屬阿里雲帳號(主帳號)ID。預設為目前登入的阿里雲帳號 ID。

說明

如果您要載入跨帳號的網路執行個體,本參數為必填。

132193271328****

VpcId

string

VPC 執行個體 ID。

說明

VpcId 和 TransitRouterId 參數二者互斥且必須提供其一。 需先透過 Vpc(2016-04-28) 產品的 CreateVpc API 建立 VPC 並取得 VpcId。

vpc-bp1h37fchc6jmfyln****

AllowedPrefixes

array

允許的前綴路由清單。

string

允許的前綴路由。

192.0.20.0/24

CreateAttachment

boolean

ECR 綁定 TR 時是否發起關聯。取值:

  • true:不需要在轉發路由器側發起關聯。

  • false:需要在轉發路由器側發起關聯。

true

DryRun

boolean

是否僅預檢此次請求。取值:

  • true:傳送檢查請求,不會修改服務資源。

  • false(預設值):傳送正常請求。

false

ClientToken

string

用戶端 Token,用於保證請求的冪等性。

從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 僅支援 ASCII 字元。

說明

若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 識別碼。每次 API 請求的 RequestId 不一樣。

02fb3da4-130e-11e9-8e44-00****

AllowedPrefixesMode

string

前綴路由模式,取值:

  • MatchMode:匹配模式,僅發佈設定好的路由網段至 IDC,並對原有已發佈的詳細路由進行撤回。

  • IncrementalMode:增量模式,在將設定好的路由網段發佈至 IDC 的同時,對原有已發佈且落在設定路由網段內的詳細路由進行撤回,未落在設定網段內的詳細路由則維持發佈狀態。

MatchMode

Description

string

關聯資源的描述資訊。長度為 0~128 個字元。

test

Tag

array<object>

標籤清單。

最多可以綁定 20 個標籤。

object

Key

string

資源的標籤鍵。一旦傳入該值,則不允許為空字串。最多支援 128 個字元,不能以 aliyun 或者 acs: 開頭,不能包含 http:// 或者 https://

TestKey

Value

string

資源的標籤值。可以為空字串,最多支援 128 個字元,不能包含 http:// 或者 https://

TestValue

返回參數

名稱

類型

描述

樣本值

object

RpcResponse

RequestId

string

請求 ID。

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

Success

boolean

是否呼叫成功。取值:

  • True:成功。

  • False:失敗。

True

Code

string

判斷呼叫是否成功。返回值為 200 表示載入成功,返回其他值表示載入失敗,失敗原因請參見錯誤碼。

200

Message

string

操作返回資訊。

OK

HttpStatusCode

integer

HTTP 狀態碼。

200

DynamicCode

string

動態錯誤碼。

IllegalParamFormat.EcrId

DynamicMessage

string

動態錯誤訊息,用於替換返回參數 ErrMessage 錯誤訊息中的 %s

說明

如果 ErrMessage 返回 The Value of Input Parameter %s is not valid,且 DynamicMessage 返回 DtsJobId,則表示所傳入的請求參數 DtsJobId 不合法。

The param format of EcrId **** is illegal.

AccessDeniedDetail

string

存取被拒絕詳細資訊。

Authentication is failed for ****

AssociationId

string

專線閘道器與 VPC 或 TR 的關聯 ID。

ecr-assoc-9p2qxx5phpca2m****

樣本

正常返回樣本

JSON格式

{
  "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****"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 IncorrectStatus.Ecr Ecr Status does not allow current operation.
400 OperationDenied.ForceDeleting The current instance is being deleted.
400 UnsupportedRegion Feature not supported in specified region.
400 QuotaExceeded.VpcCountPerEcr The number of VPC bound to the ECR exceeds the quota.
400 QuotaExceeded.TrCountPerEcr The number of TR bound to the ECR exceeds the quota.
400 IllegalParamFormat.AllowedPrefixes The prefix parameter format is invalid. Procedure.
400 OperationDenied.NotGrantedByNodeOwner The node owner is not authorized.
400 OperationFailed.CdtNotOpened The Cdt function is disabled.
400 OperationFailed.CdtCrossBoarderNotOpened The Cdt cross-border transmission function is disabled.
400 OperationFailed.CrossBorderNotAllowed There is no qualification for creating cross-border links.
400 ResourceNotFound.CenId CenId not found.
400 ResourceNotFound.TrId TRId not found.
400 Conflict.ASNOfVBR ASN already used by other VBR.
400 MissingParam.%s The param of %s is missing.
400 IllegalParamFormat.%s The param format of %s is illegal.
400 IllegalParamFormat.CenId The format of the entered Cen instance ID is incorrect.
400 OperationDenied.CrossBidAssociating Cross-border binding of resources is subject to compliance constraints.
400 ExclusiveParam.TransitRouterIdAndVpcId A private network instance cannot be bound to a forwarding router instance at the same time.
400 IllegalParamSize.AllowedPrefixes The number of prefix routes exceeded the quota.
400 OperationDenied.CrossAccountAttaching If the forwarding router is bound to another account, perform this operation on the same account.
400 OperationDenied.AttachmentInCurrentRegionExisted Only one forwarding router can be bound to an area.
400 Conflict.Lock There are other unfinished operations.
400 OperationFailed.CallingVpcYaochi The system is abnormal. Please try again later.
400 ResourceAlreadyExist.TransitRouterId The specified resource of transit router already exists.
400 ResourceAlreadyExist.VpcId The specified resource of VpcId already exists.
400 Conflict.AllowedPrefixes The allowed route prefixes [%s] is conflict.
400 UnsupportedFeature.JumboFrame The region where the sub-instance is located does not support the jumbo frame feature and cannot be attached to the express connect router.
400 InternalErrorTemp The request processing has failed due to some unknown error.
404 ResourceNotFound.EcrId EcrId not found.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情