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

***********************
delete_internet_gateway
***********************



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

  

  Deletes the specified internet gateway. You must detach the internet gateway from the VPC before you can delete it.

  

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


  **Request Syntax**
  ::

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

    The ID of the internet gateway.

    

  
  
  :returns: None

  **Examples**

  This example deletes the specified Internet gateway.
  ::

    response = client.delete_internet_gateway(
        InternetGatewayId='igw-c0a643a9',
    )
    
    print(response)

  
  Expected Output:
  ::

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

  