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

******************
delete_nat_gateway
******************



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

  

  Deletes the specified NAT gateway. Deleting a public NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.

  

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


  **Request Syntax**
  ::

    response = client.delete_nat_gateway(
        DryRun=True|False,
        NatGatewayId='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 NatGatewayId: string
  :param NatGatewayId: **[REQUIRED]** 

    The ID of the NAT gateway.

    

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

    
    ::

      {
          'NatGatewayId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NatGatewayId** *(string) --* 

        The ID of the NAT gateway.

        
  

  **Examples**

  This example deletes the specified NAT gateway.
  ::

    response = client.delete_nat_gateway(
        NatGatewayId='nat-04ae55e711cec5680',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'NatGatewayId': 'nat-04ae55e711cec5680',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  