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

*************************************
associate_transit_gateway_route_table
*************************************



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

  

  Associates the specified attachment with the specified transit gateway route table. You can associate only one route table with an attachment.

  

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


  **Request Syntax**
  ::

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

    The ID of the transit gateway route table.

    

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

    The ID of the attachment.

    

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

    
    ::

      {
          'Association': {
              'TransitGatewayRouteTableId': 'string',
              'TransitGatewayAttachmentId': 'string',
              'ResourceId': 'string',
              'ResourceType': 'vpc'|'vpn'|'vpn-concentrator'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'|'network-function',
              'State': 'associating'|'associated'|'disassociating'|'disassociated'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Association** *(dict) --* 

        The ID of the association.

        
        

        - **TransitGatewayRouteTableId** *(string) --* 

          The ID of the transit gateway route table.

          
        

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

          The ID of the attachment.

          
        

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

          The ID of the resource.

          
        

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

          The resource type. Note that the ``tgw-peering`` resource type has been deprecated.

          
        

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

          The state of the association.

          
    
  