全部產品
Search
文件中心

:AssociateTransitRouterMulticastDomain - 將Virtual Private Cloud下的交換器關聯至組播域

更新時間:Dec 14, 2025

為了VPC下的資源可以實現組播通訊,調用AssociateTransitRouterMulticastDomain介面將Virtual Private Cloud下的交換器(VSwitch)關聯到組播域中。

介面說明

  • 一個交換器只支援關聯至一個組播域。請確保待關聯的交換器未與其他組播域建立關聯關係。解除交換器與組播域的關聯關係,請參見 DisassociateTransitRouterMulticastDomain

  • AssociateTransitRouterMulticastDomain 介面屬於非同步介面,即系統會先返回一個 RequestId,但交換器和組播域並未完全建立關聯關係,系統背景關聯任務仍在進行。您可以調用 ListTransitRouterMulticastDomainAssociations 介面查詢交換器和組播域的關聯狀態。

    • 當關聯狀態為 Associating 時,表示交換器和組播域正在建立關聯關係,在該狀態下,您只能對交換器執行查詢操作,不能執行其他動作。

    • 當關聯狀態為 Associated 時,表示交換器和組播域已成功建立關聯關係。

  • 交換器所屬的 VPC 必須已經串連到企業版轉寄路由器。建立 VPC 串連,請參見 CreateTransitRouterVpcAttachment

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

cen:AssociateTransitRouterMulticastDomain

update

*TransitRouterMulticastDomain

acs:cen:*:{#accountId}:centransitroutermulticast/{#centransitroutermulticastId}

請求參數

名稱

類型

必填

描述

樣本值

ClientToken

string

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

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

123e4567-e89b-12d3-a456-426655440000

TransitRouterMulticastDomainId

string

組播域 ID。

tr-mcast-domain-91wpg6wbhchjeq****

TransitRouterAttachmentId

string

VPC 串連 ID。

tr-attach-g3kz2k3u76amsk****

VSwitchIds

array

交換器 ID 列表。

string

交換器 ID。

一次最多支援關聯 5 個交換器,一個組播域最多支援關聯 10 個交換器。

vsw-p0wxk12u6okfkr8xy****

DryRun

boolean

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

  • true:發送檢查請求,不會將交換器關聯至組播域。檢查項包括是否填寫了必需參數、請求格式、業務限制等。如果檢查不通過,則返回對應錯誤。如果檢查通過,則返回錯誤碼DryRunOperation

  • false(預設值):發送正常請求,通過檢查後直接將交換器關聯至組播域。

false

返回參數

名稱

類型

描述

樣本值

object

返回結果。

RequestId

string

請求 ID。

F88AC12C-943B-50E9-A344-4F8820BB07A7

樣本

正常返回樣本

JSON格式

{
  "RequestId": "F88AC12C-943B-50E9-A344-4F8820BB07A7"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidMulticastDomain.NotFound The specified MulticastDomain is not found. 參數中指定的MulticastDomain不存在。
400 IncorrectStatus.MulticastDomain The status of MulticastDomain is incorrect. 當前MulticastDomain的狀態不支援該操作,請稍後重試。
400 InvalidAttachmentId.NotFound The specified AttachmentId is not found.
400 IllegalParam.AttachmentId The specified AttachmentId is illegal. 參數中指定的AttachmentId不合法。
400 IncorrectStatus.Attachment The status of Attachment is incorrect. 當前Attachment的狀態不支援該操作,請稍後重試。
400 MissingParam.VSwitchIds The parameter VSwitchIds is mandatory. 缺少參數VSwitchIds。
400 InstanceNotExist The instance is not exist. 指定執行個體不存在。
400 OperationUnsupported.CloudBoxVpc The specified CloudBoxVpc does not support the operation. 雲盒VPC不支援該操作。
400 AssociationExist.VSwitchIds The association already exists. Vswitch已綁定。
400 QuotaFull.VswitchPerMulticastDomain The number of vswitch associated with multicast domain has exceed the maximum value that can be created. 組播域關聯的vswitch數量已達到上限。
400 DryRunOperation Request validation has been passed with DryRun flag set. DryRun請求驗證通過。
400 OperationUnsupported.VpcRegion The specified Region is not support for this operation. 當前地區不支援該操作。
400 OperationUnsupported.AdvancedFeature The specified vpc does not support the operation.
400 QuotaFull.MulticastDomainPerVpc The number of multicast domain that vpc associated has exceed the maximum value that can be associated. VPC可以關聯的組播域數量已達到上限。
400 IllegalParam.VSwitchIds The parameter VSwitchIds is illegal. 參數VSwitchIds不合法。
400 InvalidParameter Invalid parameter. 參數不合法。
400 Unauthorized The AccessKeyId is unauthorized. 帳號無許可權操作。

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

變更歷史

更多資訊,參考變更詳情