为了VPC下的资源可以实现组播通信,调用AssociateTransitRouterMulticastDomain接口将专有网络(VPC)下的交换机(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. | 账号无权限操作。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。