CfnNatGatewayProps Struct
Properties for defining a CfnNatGateway.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnNatGatewayProps: ec2.CfnNatGatewayProps = {
allocationId: 'allocationId',
availabilityMode: 'availabilityMode',
availabilityZoneAddresses: [{
allocationIds: ['allocationIds'],
// the properties below are optional
availabilityZone: 'availabilityZone',
availabilityZoneId: 'availabilityZoneId',
}],
connectivityType: 'connectivityType',
maxDrainDurationSeconds: 123,
privateIpAddress: 'privateIpAddress',
secondaryAllocationIds: ['secondaryAllocationIds'],
secondaryPrivateIpAddressCount: 123,
secondaryPrivateIpAddresses: ['secondaryPrivateIpAddresses'],
subnetId: 'subnetId',
tags: [{
key: 'key',
value: 'value',
}],
vpcId: 'vpcId',
};
Properties
allocationIdstring | IEIPRefallocation_idtyping.Union[str, IEIPRef]allocationIdStringAllocationIdstringAllocationIdinterface{}#This property is required for a public NAT gateway and cannot be specified with a private NAT gateway.
availabilityModestringavailability_modestravailabilityModeStringAvailabilityModestringAvailabilityMode*string#notes
A zonal NAT gateway is a NAT Gateway that provides redundancy and scalability within a single availability zone. A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing redundancy, scalability and availability across all the AZs in a Region.
For more information, see Regional NAT gateways for automatic multi-AZ expansion in the Amazon VPC User Guide .
availabilityZoneAddressesIResolvable | IResolvable | CfnNatGateway.AvailabilityZoneAddressProperty[]availability_zone_addressestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AvailabilityZoneAddressProperty]]]availabilityZoneAddressesIResolvableAvailabilityZoneAddressesIResolvableAvailabilityZoneAddressesinterface{}#notes
The regional NAT gateway uses these EIPs to handle outbound NAT traffic from their respective AZs. If not specified, the NAT gateway will automatically expand to new AZs and associate EIPs upon detection of an elastic network interface. If you specify this parameter, auto-expansion is disabled and you must manually manage AZ coverage.
A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing redundancy, scalability and availability across all the AZs in a Region.
For more information, see Regional NAT gateways for automatic multi-AZ expansion in the Amazon VPC User Guide .
connectivityTypestringconnectivity_typestrconnectivityTypeStringConnectivityTypestringConnectivityType*string#The default is public connectivity.
maxDrainDurationSecondsnumbermax_drain_duration_secondsint | floatmaxDrainDurationSecondsNumberMaxDrainDurationSecondsdoubleMaxDrainDurationSeconds*float64#Default value is 350 seconds.
privateIpAddressstringprivate_ip_addressstrprivateIpAddressStringPrivateIpAddressstringPrivateIpAddress*string#If you don't provide an address, a private IPv4 address will be automatically assigned.
secondaryAllocationIdsstring[]secondary_allocation_idstyping.List[str]secondaryAllocationIdsList<String>SecondaryAllocationIdsstring[]SecondaryAllocationIds*[]*string#For more information, see Create a NAT gateway in the Amazon VPC User Guide .
secondaryPrivateIpAddressCountnumbersecondary_private_ip_address_countint | floatsecondaryPrivateIpAddressCountNumberSecondaryPrivateIpAddressCountdoubleSecondaryPrivateIpAddressCount*float64#notes
For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .
SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.
secondaryPrivateIpAddressesstring[]secondary_private_ip_addressestyping.List[str]secondaryPrivateIpAddressesList<String>SecondaryPrivateIpAddressesstring[]SecondaryPrivateIpAddresses*[]*string#notes
For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .
SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.
subnetIdstring | ISubnetRefsubnet_idtyping.Union[str, ISubnetRef]subnetIdStringSubnetIdstringSubnetIdinterface{}#