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
Request Syntax
response = client.delete_nat_gateway(
DryRun=True|False,
NatGatewayId='string'
)
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.[REQUIRED]
The ID of the NAT gateway.
dict
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': {
'...': '...',
},
}