delete_nat_gateway

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

Request Syntax

response = client.delete_nat_gateway(
    DryRun=True|False,
    NatGatewayId='string'
)
Parameters
  • DryRun (boolean) -- 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 .
  • NatGatewayId (string) --

    [REQUIRED]

    The ID of the NAT gateway.

Return type

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': {
        '...': '...',
    },
}