:doc:`EC2 <../../ec2>` / Client / associate_transit_gateway_multicast_domain

******************************************
associate_transit_gateway_multicast_domain
******************************************



.. py:method:: EC2.Client.associate_transit_gateway_multicast_domain(**kwargs)

  

  Associates the specified subnets and transit gateway attachments with the specified transit gateway multicast domain.

   

  The transit gateway attachment must be in the available state before you can add a resource. Use `DescribeTransitGatewayAttachments <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGatewayAttachments.html>`__ to see the state of the attachment.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTransitGatewayMulticastDomain>`_  


  **Request Syntax**
  ::

    response = client.associate_transit_gateway_multicast_domain(
        TransitGatewayMulticastDomainId='string',
        TransitGatewayAttachmentId='string',
        SubnetIds=[
            'string',
        ],
        DryRun=True|False
    )
    
  :type TransitGatewayMulticastDomainId: string
  :param TransitGatewayMulticastDomainId: **[REQUIRED]** 

    The ID of the transit gateway multicast domain.

    

  
  :type TransitGatewayAttachmentId: string
  :param TransitGatewayAttachmentId: **[REQUIRED]** 

    The ID of the transit gateway attachment to associate with the transit gateway multicast domain.

    

  
  :type SubnetIds: list
  :param SubnetIds: **[REQUIRED]** 

    The IDs of the subnets to associate with the transit gateway multicast domain.

    

  
    - *(string) --* 

    

  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Associations': {
              'TransitGatewayMulticastDomainId': 'string',
              'TransitGatewayAttachmentId': 'string',
              'ResourceId': 'string',
              'ResourceType': 'vpc'|'vpn'|'vpn-concentrator'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'|'network-function',
              'ResourceOwnerId': 'string',
              'Subnets': [
                  {
                      'SubnetId': 'string',
                      'State': 'pendingAcceptance'|'associating'|'associated'|'disassociating'|'disassociated'|'rejected'|'failed'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Associations** *(dict) --* 

        Information about the transit gateway multicast domain associations.

        
        

        - **TransitGatewayMulticastDomainId** *(string) --* 

          The ID of the transit gateway multicast domain.

          
        

        - **TransitGatewayAttachmentId** *(string) --* 

          The ID of the transit gateway attachment.

          
        

        - **ResourceId** *(string) --* 

          The ID of the resource.

          
        

        - **ResourceType** *(string) --* 

          The type of resource, for example a VPC attachment.

          
        

        - **ResourceOwnerId** *(string) --* 

          The ID of the Amazon Web Services account that owns the resource.

          
        

        - **Subnets** *(list) --* 

          The subnets associated with the multicast domain.

          
          

          - *(dict) --* 

            Describes the subnet association with the transit gateway multicast domain.

            
            

            - **SubnetId** *(string) --* 

              The ID of the subnet.

              
            

            - **State** *(string) --* 

              The state of the subnet association.

              
        
      
    
  