Skip to content
v2.274.0

NatGatewayProps Struct ​

Properties for a NAT gateway.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const natGatewayProps: ec2.NatGatewayProps = {
  eipAllocationIds: ['eipAllocationIds'],
  maxDrainDuration: cdk.Duration.minutes(30),
};

Properties ​

eipAllocationIdsoptionalstring[]eip_allocation_idsoptionaltyping.List[str]eipAllocationIdsoptionalList<String>EipAllocationIdsoptionalstring[]EipAllocationIdsoptional*[]*string#
EIP allocation IDs for the NAT gateways.

Default: No fixed EIPs allocated for the NAT gateways

maxDrainDurationoptionalDurationmax_drain_durationoptionalDurationmaxDrainDurationoptionalDurationMaxDrainDurationoptionalDurationMaxDrainDurationoptionalDuration= Duration.seconds(350)#
Maximum amount of time to wait before forcibly releasing IP addresses if connections are still in progress.