aws-cdk-lib.aws_ec2.CfnNatGatewayProps

interface CfnNatGatewayProps

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnNatGatewayProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnNatGatewayProps
Javasoftware.amazon.awscdk.services.ec2.CfnNatGatewayProps
Pythonaws_cdk.aws_ec2.CfnNatGatewayProps
TypeScript aws-cdk-lib » aws_ec2 » CfnNatGatewayProps

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 = {
  subnetId: 'subnetId',

  // the properties below are optional
  allocationId: 'allocationId',
  connectivityType: 'connectivityType',
  maxDrainDurationSeconds: 123,
  privateIpAddress: 'privateIpAddress',
  secondaryAllocationIds: ['secondaryAllocationIds'],
  secondaryPrivateIpAddressCount: 123,
  secondaryPrivateIpAddresses: ['secondaryPrivateIpAddresses'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
subnetIdstringThe ID of the subnet in which the NAT gateway is located.
allocationId?string[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.
connectivityType?stringIndicates whether the NAT gateway supports public or private connectivity.
maxDrainDurationSeconds?numberThe maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress.
privateIpAddress?stringThe private IPv4 address to assign to the NAT gateway.
secondaryAllocationIds?string[]Secondary EIP allocation IDs.
secondaryPrivateIpAddressCount?number[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.
secondaryPrivateIpAddresses?string[]Secondary private IPv4 addresses.
tags?CfnTag[]The tags for the NAT gateway.

subnetId

Type: string

The ID of the subnet in which the NAT gateway is located.


allocationId?

Type: string (optional)

[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.


connectivityType?

Type: string (optional)

Indicates whether the NAT gateway supports public or private connectivity.

The default is public connectivity.


maxDrainDurationSeconds?

Type: number (optional)

The 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.


privateIpAddress?

Type: string (optional)

The private IPv4 address to assign to the NAT gateway.

If you don't provide an address, a private IPv4 address will be automatically assigned.


secondaryAllocationIds?

Type: string[] (optional)

Secondary EIP allocation IDs.

For more information, see Create a NAT gateway in the Amazon VPC User Guide .


secondaryPrivateIpAddressCount?

Type: number (optional)

[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 in the Amazon Virtual Private Cloud User Guide .

SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.


secondaryPrivateIpAddresses?

Type: string[] (optional)

Secondary private IPv4 addresses.

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.


tags?

Type: CfnTag[] (optional)

The tags for the NAT gateway.