全部產品
Search
文件中心

:CreateTransitRouterPeerAttachment - 為企業版轉寄路由器執行個體建立跨地區串連

更新時間:Dec 14, 2025

網路執行個體(VPC、VBR、IPsec串連)被串連至轉寄路由器後,如果要實現不同地區網路執行個體的互連,需要在網路執行個體串連的轉寄路由器下建立跨地區串連,您可以調用CreateTransitRouterPeerAttachment介面為企業版轉寄路由器執行個體建立跨地區串連。

介面說明

  • 企業版轉寄路由器支援以下兩種頻寬分配方式:

    • 從頻寬包分配

      使用此種分配方式,您需要先購買頻寬包,從頻寬包中為跨地區串連分配頻寬。購買頻寬包具體操作,請參見 CreateCenBandwidthPackage

    • 按流量付費

      使用此種分配方式,您需要為跨地區串連設定限速頻寬,系統會按照跨地區串連實際使用的流量計費。具體計費資訊,請參見跨地區流量

  • CreateTransitRouterPeerAttachment 介面屬於非同步介面,即系統會先返回一個跨地區串連 ID,但該跨地區串連並未建立完成,系統背景建立任務仍在進行。您可以調用 ListTransitRouterPeerAttachments 介面查詢跨地區串連的狀態。

    • 當跨地區串連處於 Attaching 狀態時,表示跨地區串連正在建立中,在該狀態下,您只能對跨地區串連執行查詢操作,不能執行其他動作。

    • 當跨地區串連處於 Attached 狀態時,表示跨地區串連建立完成。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

cen:CreateTransitRouterPeerAttachment

create

CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

TransitRouter

acs:cen:*:{#accountId}:centransitrouter/{#TransitRouterId}

請求參數

名稱

類型

必填

描述

樣本值

ClientToken

string

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

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

說明

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

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

CenId

string

雲企業網執行個體 ID。

cen-j3jzhw1zpau2km****

TransitRouterId

string

本端企業版轉寄路由器執行個體 ID。

tr-bp1su1ytdxtataupl****

RegionId

string

本端企業版轉寄路由器執行個體所屬地區 ID。

您可以通過調用 DescribeRegions 介面擷取地區 ID。

cn-hangzhou

TransitRouterAttachmentName

string

跨地區串連的名稱。

名稱可以為空白或長度為 1~128 個字元,不能以 http://或 https://開頭。

testname

TransitRouterAttachmentDescription

string

跨地區串連的描述資訊。

描述可以為空白或長度為 1~256 個字元,不能以 http://或 https://開頭。

testdesc

PeerTransitRouterId

string

對端轉寄路由器執行個體 ID。

tr-m5eq27g6bndum7e88****

PeerTransitRouterRegionId

string

對端轉寄路由器執行個體所屬地區 ID。

cn-qingdao

AutoPublishRouteEnabled

boolean

是否使企業版轉寄路由器自動發布跨地區串連的路由到對端地區。

  • false(預設值):否。

  • true:是。

false

Bandwidth

integer

跨地區串連的頻寬值。單位:Mbps。

  • BandwidthType 取值為 BandwidthPackage 時,該參數表示跨地區串連可使用的頻寬值。

  • BandwidthType 取值為 DataTransfer 時,該參數表示跨地區串連的限速頻寬值。

2

CenBandwidthPackageId

string

跨地區串連要綁定的頻寬包 ID。

說明

BandwidthType 取值為 DataTransfer 時,無需配置該項。

cenbwp-3xrxupouolw5ou****

DryRun

boolean

是否對此次請求執行預檢,包括許可權、執行個體狀態校正等。取值:

  • false(預設值):發送正常請求,通過檢查後直接建立跨地區串連。

  • true:發送檢查請求,只進行校正,不會建立跨地區串連。檢查項包括是否填寫了必需參數、請求格式等。如果檢查不通過,則返回對應錯誤。如果檢查通過,則返回對應請求 ID。

false

BandwidthType

string

跨地區串連的頻寬分配方式。取值:

  • BandwidthPackage:從頻寬包中分配頻寬。

  • DataTransfer:不為跨地區串連分配頻寬,按使用流量計費。

BandwidthPackage

Tag

array<object>

標籤資訊。

一次最多支援輸入 20 個標籤資訊。

object

Key

string

資源的標籤鍵。

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

一次最多支援輸入 20 個標籤的標籤鍵。

tag_A1

Value

string

資源的標籤值。

標籤值可以為空白或輸入不超過 128 個字元的字串,不能以aliyun或者acs:開頭,不能包含http://或者https://

每一個標籤鍵對應一個標籤值,一次最多支援輸入 20 個標籤鍵對應的標籤值。

value_A1

DefaultLinkType

string

預設鏈路類型。

可選值為 Platinum(鉑金),Gold(金),預設為 Gold(金)。

且僅在頻寬分配方式是按流量計費時,才可以配置為 Platinum(鉑金)。

Gold

返回參數

名稱

類型

描述

樣本值

object

返回結果。

TransitRouterAttachmentId

string

跨地區串連 ID。

tr-attach-nwkiqfvw22qesz****

RequestId

string

請求 ID。

59422BF5-BAAD-4CFD-9019-9557BD3ACFA3

樣本

正常返回樣本

JSON格式

{
  "TransitRouterAttachmentId": "tr-attach-nwkiqfvw22qesz****",
  "RequestId": "59422BF5-BAAD-4CFD-9019-9557BD3ACFA3"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

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. 您沒有許可權建立服務關聯角色,角色名稱:AliyunServiceRolePolicyForCEN,服務名:cen.aliyuncs.com。請確保已授予目前使用者ram:CreateServiceLinkedRole許可權。
400 InvalidTransitRouterId.NotFound TransitRouterId is not found. 轉寄路由執行個體ID不存在。
400 IllegalParam.PeerTransitRouterId PeerTransitRouterId is illegal. 跨地區串連時,對端的轉寄路由器ID非法。
400 OperationUnsupported.TransitRouterId TransitRouterId is unsupported. 轉寄路由器類型是基礎版時不支援。
400 MissingParam.Bandwidth The parameter Bandwidth is mandatory. 頻寬值參數是必需的。
400 IllegalParam.Bandwidth Bandwidth is illegal. 頻寬包ID不合法。
400 Forbbiden.TransitRouterServiceNotOpen The user has not open transit router service. 轉寄路由器服務未開啟,請開啟後重試。
400 OperationUnsupported.TransitRouterType The specified TransitRouterType does not support the operation. 當前TransitRouter類型不支援該操作。
400 OperationUnsupported.BandwidthType The specified BandwidthType does not support the operation. 當前BandwidthType不支援該操作。
400 InvalidCenId.NotFound CenId is not found. CEN執行個體不存在。
400 IllegalParam.BandwidthType BandwidthType is illegal. 頻寬包類型不合法。
400 MissingParam.CenIdOrRegionId Either CenId or RegionId must be specified. CenId或者RegionId是必選參數。
400 OperationUnsupported.BandwidthHS This bandwidth limit can only be set in China-AsiaPacific-HS
400 OperationUnsupported.CenFullLevel CEN full level does not support TransitRouter Full類型CEN不支援建立企業版轉寄路由器。
400 OperationUnsupported.CloudDataTransferService CCN region not support cloud data transfer service. CCN地區中不支援cloud data transfer服務。
400 InvalidPeerTransitRouterId.NotFound The specified PeerTransitRouterId is not found. 參數中指定的PeerTransitRouterId不存在。
400 IllegalParam.RegionId RegionId is illegal. 參數中指定的Region不合法。
400 IllegalParam.PeerRegionId PeerRegionId is illegal. 參數中指定的PeerRegionId不合法。
400 IllegalParam.TransitRouterRegionId TransitRouterRegionId is illegal. TransitRouterRegionId不合法。
400 InvalidOperation.CenInstanceStatus The CEN instance is not in a valid state for the operation.
400 IncorrectStatus.TransitRouter The status of TransitRouter is incorrect. 當前TransitRouter的狀態不支援該操作,請稍後重試。
400 InvalidOperation.BwpNotAssociated Operation is invalid because a bandwidth package corresponding to the geographic span is not associated. 與地區對應的頻寬包未關聯,無法操作。
400 InvalidOperation.BwpBusinessStatus The CBN bandwidth package is not in a valid business state for the operation. 頻寬包不處於穩態,無法操作。
400 IllegalParam.CenBandwidthPackageId Parameter CenBandwidthPackageId is illegal. 參數中指定的CenBandwidthPackageId不合法。
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. 頻寬分配方式為按流量計費時,預設鏈路類型僅支援鉑金(Platinum)和金(Gold)。
400 ParameterIllegal.BandwidthPackageDefaultLinkTypeOnlySupportGold Cen bandwidthPackage only support Gold. 頻寬分配方式為頻寬包時,預設鏈路類型僅支援金(Gold)
400 ParameterIllegal.CdtDefaultLinkTypeOnlySupportGold CDT only support Gold when both transitrouters for cross regional connections are not all enterprise version. 當跨地區串連的兩端轉寄路由器不全是企業版且頻寬分配方式為按流量計費時,預設鏈路類型僅支援金(Gold)。
400 OperationNotAllowed.DefaultLinkTypeOnlySupportGold Operation is not allowed because this user can only set 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. 根據電訊廠商及中國大陸法律法規的要求,您當前暫不符合購買/續約跨境頻寬包條件,請聯絡線上客服或您的商務經理諮詢處理。
400 OperationInvalid.IdentityRegistrationStatusNotSupport Real name registration of enterprises required. 因您在“地區”或“對端地區”選擇了“中國內地”的地區,您需要是企業使用者且已完成企業實名登記,才能繼續購買。關於如何做企業實名登記,請查看實名認證文檔
400 InvalidOperation.OnlyOneRegionSupportIpv6 Peer Attachment is only allowed when both regions support IPv6 or do not support IPv6 at all. 只有當兩端地區均支援或均不支援IPv6時才可以建立跨地區串連。
400 InvalidOperation 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. 資源所屬帳號的轉寄路由器服務已欠費停服,請通知對方續約後重試。
400 Forbidden.TransitRouterServiceExpired The transit router service is out of service. 轉寄路由器服務已欠費停服,請續約後重試。
400 OperationUnsupported.RegionId The specified RegionId does not support the operation. 當前地區不支援該操作。
400 QuotaExceeded.Bandwidth Bandwidth quota exceeded. 頻寬值超出配額限制。
400 InvalidParameter Invalid parameter. 參數不合法。
400 Unauthorized The AccessKeyId is unauthorized. 帳號無許可權操作。
400 InvalidParameter.PeerTransitRouterId The specified parameter PeerTransitRouterId is invalid.
400 InvalidParameter.ResourceType The specified parameter ResourceType is invalid.
400 ParameterIllegal.CdtDefaultLinkTypeOnlySupportUnderlaySilver CDT only support UnderlaySilver when both transitrouters for cross regional connections are not all enterprise version. 當跨地區串連的兩端轉寄路由器不全是企業版且頻寬分配方式為按流量計費時,預設鏈路類型僅支援銀(UnderlaySilver)。
400 ParameterIllegal.DefaultLinkTypeOnlySupportUnderlaySilver Cen bandwidthPackage only support UnderlaySilver. 頻寬分配方式為頻寬包時,預設鏈路類型僅支援銀(UnderlaySilver)
400 OperationNotAllowed.DefaultLinkTypeOnlySupportUnderlaySilver This user can only set the default link type to UnderlaySilver. 本使用者只能設定預設鏈路類型為銀(UnderlaySilver)。
400 OperationFailed.ValidateVbrInstanceFailedForLowLatencyCircuit Operation failed when validate VBR instance for Low Latency Circuit. 建立低時延鏈路時校正載入的VBR執行個體失敗。

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

變更歷史

更多資訊,參考變更詳情