AssociateTransitRouterMulticastDomain - 将专有网络VPC下的交换机关联至组播域

为了VPC下的资源可以实现组播通信,调用AssociateTransitRouterMulticastDomain接口将专有网络(VPC)下的交换机(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. 账号无权限操作。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情