Skip to main content

nat_gateway

Gets an individual nat_gateway resource

Overview

Namenat_gateway
TypeResource
Descriptionnat_gateway
Idawscc.ec2.nat_gateway

Fields

NameDatatypeDescription
subnet_idstringThe ID of the subnet in which the NAT gateway is located.
nat_gateway_idstring
connectivity_typestringIndicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.
private_ip_addressstringThe private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 address will be automatically assigned.
tagsarrayThe tags for the NAT gateway.
allocation_idstring[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway. This property is required for a public NAT gateway and cannot be specified with a private NAT gateway.
secondary_allocation_idsarraySecondary EIP allocation IDs. For more information, see [Create a NAT gateway](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating) in the *Amazon VPC User Guide*.
secondary_private_ip_addressesarraySecondary private IPv4 addresses. For more information about secondary addresses, see [Create a NAT gateway](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating) in the *Amazon Virtual Private Cloud User Guide*.<br/> ``SecondaryPrivateIpAddressCount`` and ``SecondaryPrivateIpAddresses`` cannot be set at the same time.
secondary_private_ip_address_countinteger[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. For more information about secondary addresses, see [Create a NAT gateway](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating) in the *Amazon Virtual Private Cloud User Guide*.<br/> ``SecondaryPrivateIpAddressCount`` and ``SecondaryPrivateIpAddresses`` cannot be set at the same time.
max_drain_duration_secondsintegerThe maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress. Default value is 350 seconds.
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
subnet_id,
nat_gateway_id,
connectivity_type,
private_ip_address,
tags,
allocation_id,
secondary_allocation_ids,
secondary_private_ip_addresses,
secondary_private_ip_address_count,
max_drain_duration_seconds
FROM awscc.ec2.nat_gateway
WHERE data__Identifier = '<NatGatewayId>';

Permissions

To operate on the nat_gateway resource, the following permissions are required:

Delete

ec2:DeleteNatGateway,
ec2:DescribeNatGateways

Read

ec2:DescribeNatGateways

Update

ec2:DescribeNatGateways,
ec2:CreateTags,
ec2:DeleteTags,
ec2:AssociateNatGatewayAddress,
ec2:DisassociateNatGatewayAddress,
ec2:AssignPrivateNatGatewayAddress,
ec2:UnassignPrivateNatGatewayAddress