全部產品
Search
文件中心

Cloud Enterprise Network:CreateTransitRouterVbrAttachment

更新時間:Jul 15, 2026

您可以呼叫 CreateTransitRouterVbrAttachment 介面將要互通的邊界路由器 VBR(Virtual Border Router)網路執行個體連線到同地域的轉發路由器執行個體中。連線後,轉發路由器可協助您實現私網互通。

介面說明

  • 企業版轉發路由器支援的地域和可用區資訊,請參閱什麼是雲端企業網

  • 您可以透過以下兩種方式在企業版轉發路由器下建立 VBR 連線:

    • 如果您已經在目標地域建立了企業版轉發路由器執行個體,您可以透過指定 VbrIdRegionIdTransitRouterId 建立 VBR 連線。

    • 如果您在目標地域沒有企業版轉發路由器執行個體,您可以透過指定 VbrIdCenIdRegionId 建立 VBR 連線。建立 VBR 連線時系統為您自動建立企業版轉發路由器執行個體。

  • CreateTransitRouterVbrAttachment 介面屬於非同步介面,即系統會先返回一個 VBR 連線 ID,但該 VBR 連線並未建立完成,系統背景的建立任務仍在進行。您可以呼叫 ListTransitRouterVbrAttachments 介面查詢 VBR 連線的狀態。

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

    • 當 VBR 連線處於 Attached 狀態時,表示 VBR 連線建立完成。

  • 轉發路由器所屬的阿里雲帳號和 VBR 執行個體所屬的阿里雲帳號屬於同一家企業。

  • 轉發路由器支援連線同帳號和跨帳號的 VBR 執行個體。在建立跨帳號的 VBR 連線前,請先獲得跨帳號 VBR 執行個體的授權。具體操作,請參閱跨帳號網路執行個體授權

  • 建立 VBR 連線後,VBR 連線預設不與任何轉發路由器路由表建立路由學習關係和關聯轉發關係。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

cen:CreateTransitRouterVbrAttachment

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

VBR 執行個體所屬地域 ID。

您可以透過呼叫 DescribeRegions 介面取得地域 ID。

cn-hangzhou

TransitRouterAttachmentName

string

VBR 連線名稱。

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

testname

TransitRouterAttachmentDescription

string

VBR 連線描述。

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

testdesc

VbrId

string

VBR 執行個體 ID。

vbr-bp1svadp4lq38janc****

VbrOwnerId

integer

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

說明

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

1250123456123456

AutoPublishRouteEnabled

boolean

是否使企業版轉發路由器自動發佈路由到 VBR 執行個體。

  • false(預設值):否。

  • true:是。

false

DryRun

boolean

是否對此次請求執行預檢,包括權限、執行個體狀態驗證等。取值:

  • false(預設值):傳送正常請求,通過檢查後直接建立 VBR 連線。

  • true:傳送檢查請求,只進行驗證,不會建立 VBR 連線。檢查項目包括是否填寫了必需參數、請求格式等。如果檢查不通過,則返回對應錯誤。如果檢查通過,則返回對應請求 ID。

false

Tag

array<object>

標籤資訊。

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

object

Key

string

資源的標籤鍵。

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

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

TagKey

Value

string

資源的標籤值。

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

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

TagValue

返回參數

名稱

類型

描述

樣本值

object

返回結果。

TransitRouterAttachmentId

string

VBR 連線 ID。

tr-attach-ia340z7xis7t5s****

RequestId

string

請求 ID。

C087A369-82B9-43EF-91F4-4B63A9C6E6B6

樣本

正常返回樣本

JSON格式

{
  "TransitRouterAttachmentId": "tr-attach-ia340z7xis7t5s****",
  "RequestId": "C087A369-82B9-43EF-91F4-4B63A9C6E6B6"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

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 OperationUnsupported.TransitRouterRegionId The specified TransitRouterRegion does not support the operation.
400 InvalidCenId.NotFound CenId is not found. 參數中指定的 CenId 不存在。
400 InvalidStatus.ResourceStatus The resource is not in a valid state for the attachment operation. 目前資源狀態不支援此操作,請稍後重試。
400 InvalidTransitRouterId.NotFound TransitRouterId is not found. 參數中指定的 TransitRouterId 不存在。
400 Forbbiden.TransitRouterServiceNotOpen The user has not open transit router service. 轉發路由器服務未開啟,請開啟後重試。
400 OperationUnsupported.TransitRouterType The specified TransitRouterType does not support the operation. 當前 TransitRouter 類型不支援該操作。
400 MissingParam.CenIdOrRegionId Either CenId or RegionId must be specified. CenId 或 RegionId 是必選參數。
400 IncorrectStatus.Vpc The resource is not in a valid state for the attachment operation. 目前 VPC 的狀態不支援此操作,請稍後重試。
400 Forbidden.VbrDeviceModel Attach VBR on some access device models are forbidden. Vbr 目前接入模式不支援該操作。
400 IllegalParam.AssociateRouteTableId The specified AssociateRouteTableId is illegal. 參數中指定的 AssociateRouteTableId 不合法。
400 Forbbiden.AttachChildInstanceAcrossBid Operation is invalid, please apply for cross-bid attaching.
400 IllegalParam.RegionId RegionId is illegal. 參數中指定的 Region 無效。
400 OperationUnsupported.CenFullLevel CEN full level does not support TransitRouter Full 模式的 CEN 不支援 VPN Bpg。
400 OperationUnsupported.VbrAttachment This region not support vbr attachment. 該地域不支援載入 vbrAttachment。
400 InvalidOperation.CenInstanceStatus The CEN instance is not in a valid state for the operation.
400 OperationUnsupported.CloudBoxVbrNotSupport Cloud Box Vbr does not support. CloudBox 執行個體不允許載入。
400 IncorrectStatus.VbrResource The resource is not in a valid state for the attachment operation. 目前 vbr 資源未處於穩定狀態,無法執行此操作,請等待與目前 vbr 相關的操作結束後再重試。
400 IncorrectStatus.TransitRouter The status of TransitRouter is incorrect. 目前 TR 的狀態不支援此操作,請稍後重試。
400 QuotaExceeded.CenQuotaVbrAttachPerTransitRouter The maximum number of VBR attachment per Transit Router is exceeded. 每個轉發路由器支援連線的邊界路由器 VBR 個數超限,可提交工單提升額度。
400 QuotaFull.ChildInstanceRelatedCen The childinstance has exceed the quota of the times that a childinstance can be attached as an attachment. 該執行個體綁定 CEN 數量已達到上限,無法載入。
400 Forbidden.ResourceOwnerTransitRouterServiceNotOpen The resource owner user has not opened transit router service. 資源所屬帳號轉發路由器服務未開通,請通知對方開通後重試。
400 InvalidOperation.VbrAttachedToEcr VBR has alreay attached to ECR. VBR 已綁定 ECR。
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 InvalidParameter Invalid parameter. 參數不合法。
400 Unauthorized The AccessKeyId is unauthorized. 帳號無權限操作。
400 InvalidParameter.ResourceType The specified parameter ResourceType is invalid.
400 InvalidParameter.TagValue The specified parameter TagValue is invalid. 輸入的參數 Tag Value 不合法。
403 Forbidden.VbrDeviceModel The attached VBR on some access device models are not supported. Please submit a ticket to continue using this VBR on CEN. Vbr 目前接入模式不支援該操作。

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

變更歷史

更多資訊,參考變更詳情