Associates a vSwitch in a virtual private cloud (VPC) with a multicast domain.

Usage notes

  • A vSwitch can be associated with only one multicast domain. Make sure that the vSwitch is not associated with other multicast domains. For more information about how to disassociate a vSwitch from a multicast domain, see DisassociateTransitRouterMulticastDomain.
  • AssociateTransitRouterMulticastDomain is an asynchronous operation. After you send a request, the request ID is returned but the operation is still being performed in the system background. You can call ListTransitRouterMulticastDomainAssociations to query the association status between a vSwitch and a multicast domain.
    • Associating: The vSwitch is being associated with the multicast domain. In this case, you can query the vSwitch but cannot perform other operations.
    • Associated: The vSwitch is associated with the multicast domain.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AssociateTransitRouterMulticastDomain

The operation that you want to perform. Set the value to AssociateTransitRouterMulticastDomain.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. ClientToken can contain only ASCII characters.

TransitRouterMulticastDomainId String Yes tr-mcast-domain-91wpg6wbhchjeq****

The ID of the multicast domain.

TransitRouterAttachmentId String Yes tr-attach-g3kz2k3u76amsk****

The ID of the VPC connection.

VSwitchIds.N String No vsw-p0wxk12u6okfkr8xy****

The ID of the vSwitch.

You can specify at most five vSwitch IDs in each call.

DryRun Boolean No false

Specifies whether only to precheck the request. Valid values:

  • true: prechecks the request but does not associate the vSwitch with the multicast domain. The system checks the required parameters, the request format, and the service limits. If the request fails to pass the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends the request. The vSwitch is associated with the multicast domain after the request passes the precheck.

Response parameters

Parameter Type Example Description
RequestId String F88AC12C-943B-50E9-A344-4F8820BB07A7

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AssociateTransitRouterMulticastDomain
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&TransitRouterMulticastDomainId=tr-mcast-domain-91wpg6wbhchjeq****
&TransitRouterAttachmentId=tr-attach-g3kz2k3u76amsk****
&VSwitchIds=["vsw-p0wxk12u6okfkr8xy****"]
&DryRun=false
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<AssociateTransitRouterMulticastDomainResponse>
    <RequestId>F88AC12C-943B-50E9-A344-4F8820BB07A7</RequestId>
</AssociateTransitRouterMulticastDomainResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

HttpCode Error code Error message Description
400 InvalidAttachmentId.NotFound The specified AttachmentId is not found. The error message returned because the specified network instance ID does not exist.
400 DryRunOperation Request validation has been passed with DryRun flag set. The error message returned because the dry run request passed the precheck.

For a list of error codes, visit the API Error Center.