全部產品
Search
文件中心

Express Connect:CreateExpressConnectRouterAssociation - 專線網關(ECR)關聯資源

更新時間:Dec 19, 2025

專線網關ECR(Express Connect Router)關聯Virtual Private Cloud或者轉寄路由器(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。

tr-2ze4i71c6be454e2l****

CenId

string

雲企業網執行個體 ID。

cen-of3o1the3i4gwb****

VpcOwnerId

integer

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

說明

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

132193271328****

VpcId

string

VPC 執行個體 ID。

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

返回參數

名稱

類型

描述

樣本值

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. 單個專線網關執行個體可綁定的VPC數量已達到配額上限,請聯絡您的商務經理申請更大的配額數量
400 QuotaExceeded.TrCountPerEcr The number of TR bound to the ECR exceeds the quota. 單個專線網關執行個體可綁定的TR數量已達到配額上限,請聯絡您的商務經理申請更大的配額數量
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. Cen執行個體不存在
400 ResourceNotFound.TrId TRId not found. TR執行個體不存在
400 Conflict.ASNOfVBR ASN already used by other VBR. 當前VBR BgpGroup localAsn與ECR asn不一致,請調整一致後重新綁定。
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. 當前輸入的Cen執行個體ID格式不正確
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. 指定的 TR 資源已經關聯到專線網關 ECR, 請核對後重試。
400 ResourceAlreadyExist.VpcId The specified resource of VpcId already exists. 指定的 VPC 資源已經關聯到專線網關 ECR, 請核對後重試。
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. ECR執行個體不存在

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

變更歷史

更多資訊,參考變更詳情