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

************************
disassociate_route_table
************************



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

  

  Disassociates a subnet or gateway from a route table.

   

  After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see `Route tables <https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html>`__ in the *Amazon VPC User Guide*.

  

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


  **Request Syntax**
  ::

    response = client.disassociate_route_table(
        DryRun=True|False,
        AssociationId='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``.

    

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

    The association ID representing the current association between the route table and subnet or gateway.

    

  
  
  :returns: None

  **Examples**

  This example disassociates the specified route table from its associated subnet.
  ::

    response = client.disassociate_route_table(
        AssociationId='rtbassoc-781d0d1a',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  