CfnNatGatewayProps

class aws_cdk.aws_ec2.CfnNatGatewayProps(*, subnet_id, allocation_id=None, connectivity_type=None, max_drain_duration_seconds=None, private_ip_address=None, secondary_allocation_ids=None, secondary_private_ip_address_count=None, secondary_private_ip_addresses=None, tags=None)

Bases: object

Properties for defining a CfnNatGateway.

Parameters:
  • subnet_id (str) – The ID of the subnet in which the NAT gateway is located.

  • allocation_id (Optional[str]) – [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.

  • connectivity_type (Optional[str]) – Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.

  • max_drain_duration_seconds (Union[int, float, None]) – 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.

  • private_ip_address (Optional[str]) – 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.

  • secondary_allocation_ids (Optional[Sequence[str]]) – Secondary EIP allocation IDs. For more information, see Create a NAT gateway in the Amazon VPC User Guide .

  • secondary_private_ip_address_count (Union[int, float, None]) –

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

  • secondary_private_ip_addresses (Optional[Sequence[str]]) –

    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 (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The tags for the NAT gateway.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

cfn_nat_gateway_props = ec2.CfnNatGatewayProps(
    subnet_id="subnetId",

    # the properties below are optional
    allocation_id="allocationId",
    connectivity_type="connectivityType",
    max_drain_duration_seconds=123,
    private_ip_address="privateIpAddress",
    secondary_allocation_ids=["secondaryAllocationIds"],
    secondary_private_ip_address_count=123,
    secondary_private_ip_addresses=["secondaryPrivateIpAddresses"],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

allocation_id

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-allocationid

connectivity_type

Indicates whether the NAT gateway supports public or private connectivity.

The default is public connectivity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-connectivitytype

max_drain_duration_seconds

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-maxdraindurationseconds

private_ip_address

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-privateipaddress

secondary_allocation_ids

Secondary EIP allocation IDs.

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-secondaryallocationids

secondary_private_ip_address_count

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-secondaryprivateipaddresscount

secondary_private_ip_addresses

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-secondaryprivateipaddresses

subnet_id

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-subnetid

tags

The tags for the NAT gateway.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html#cfn-ec2-natgateway-tags