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
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:
|
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.