為了VPC下的資源可以實現組播通訊,調用AssociateTransitRouterMulticastDomain介面將Virtual Private Cloud下的交換器(VSwitch)關聯到組播域中。
介面說明
-
一個交換器只支援關聯至一個組播域。請確保待關聯的交換器未與其他組播域建立關聯關係。解除交換器與組播域的關聯關係,請參見 DisassociateTransitRouterMulticastDomain 。
-
AssociateTransitRouterMulticastDomain 介面屬於非同步介面,即系統會先返回一個 RequestId,但交換器和組播域並未完全建立關聯關係,系統背景關聯任務仍在進行。您可以調用 ListTransitRouterMulticastDomainAssociations 介面查詢交換器和組播域的關聯狀態。
當關聯狀態為 Associating 時,表示交換器和組播域正在建立關聯關係,在該狀態下,您只能對交換器執行查詢操作,不能執行其他動作。
當關聯狀態為 Associated 時,表示交換器和組播域已成功建立關聯關係。
-
交換器所屬的 VPC 必須已經串連到企業版轉寄路由器。建立 VPC 串連,請參見 CreateTransitRouterVpcAttachment 。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cen:AssociateTransitRouterMulticastDomain |
update |
*TransitRouterMulticastDomain
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| 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 |
否 |
是否只預檢此次請求。取值:
|
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. | 帳號無許可權操作。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。