interface CfnNatGatewayProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.CfnNatGatewayProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnNatGatewayProps |
Java | software.amazon.awscdk.services.ec2.CfnNatGatewayProps |
Python | aws_cdk.aws_ec2.CfnNatGatewayProps |
TypeScript | aws-cdk-lib » aws_ec2 » CfnNatGatewayProps |
Properties for defining a CfnNatGateway
.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html
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
Name | Type | Description |
---|---|---|
subnet | string | The ID of the subnet in which the NAT gateway is located. |
allocation | string | [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway. |
connectivity | string | Indicates whether the NAT gateway supports public or private connectivity. |
max | number | The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress. |
private | string | The private IPv4 address to assign to the NAT gateway. |
secondary | string[] | Secondary EIP allocation IDs. |
secondary | number | [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. |
secondary | string[] | Secondary private IPv4 addresses. |
tags? | Cfn [] | 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:
Cfn
[]
(optional)
The tags for the NAT gateway.