AWS::EC2::NatGateway¶
Specifies a network address translation (NAT) gateway in the specified subnet.
Generated by cfn-typegen --out cfn_types AWS::EC2::NatGateway into cfn_types/ec2.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::EC2 resources."""
from collections.abc import Sequence
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, Tag, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
CONSTRAINTS:dict[str,Any]={
'AWS::EC2::NatGateway':{'SecondaryPrivateIpAddressCount':{'m':1}},
}
ATTRIBUTES:dict[str,Any]={"AWS::EC2::NatGateway":["AutoProvisionZones","AutoScalingIps","EniId","NatGatewayId","RouteTableId"]}
RULES:dict[str,Any]={}
Nested types (4)
These are defined above the properties in the generated module.
class NatGatewayAvailabilityZoneAddress(TypedDict, closed=True):
'For regional NAT gateways only: The configuration specifying which Elastic IP address (EIP) to use for handling outbound NAT traffic from a specific Availabi...'
AvailabilityZone: NotRequired[Expr[str]]
'For regional NAT gateways only: The Availability Zone where this specific NAT gateway configuration will be active.'
AvailabilityZoneId: NotRequired[Expr[str]]
'For regional NAT gateways only: The ID of the Availability Zone where this specific NAT gateway configuration will be active.'
AllocationIds: Expr[list[Expr[str]]]
'The allocation IDs of the Elastic IP addresses (EIPs) to be used for handling outbound NAT traffic in this specific Availability Zone.'
class NatGatewayProps(TypedDict, closed=True):
'Specifies a network address translation (NAT) gateway in the specified subnet.'
SubnetId: NotRequired[Expr[str]]
'The ID of the subnet in which the NAT gateway is located.'
ConnectivityType: NotRequired[Expr[str]]
'Indicates whether the NAT gateway supports public or private connectivity.'
PrivateIpAddress: NotRequired[Expr[str]]
'The private IPv4 address to assign to the NAT gateway.'
Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
'The tags for the NAT gateway.'
AllocationId: NotRequired[Expr[str]]
"[Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway."
SecondaryAllocationIds: NotRequired[Expr[list[Expr[str]]]]
'Secondary EIP allocation IDs.'
SecondaryPrivateIpAddresses: NotRequired[Expr[list[Expr[str]]]]
'Secondary private IPv4 addresses.'
SecondaryPrivateIpAddressCount: NotRequired[Expr[int]]
'[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.'
MaxDrainDurationSeconds: NotRequired[Expr[int]]
'The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress.'
VpcId: NotRequired[Expr[str]]
'The ID of the VPC in which the NAT gateway is located.'
AvailabilityMode: NotRequired[Expr[str]]
'Indicates whether this is a zonal (single-AZ) or regional (multi-AZ) NAT gateway.'
AvailabilityZoneAddresses: NotRequired[Expr[Sequence[Expr[NatGatewayAvailabilityZoneAddress]]]]
'For regional NAT gateways only: Specifies which Availability Zones you want the NAT gateway to support and the Elastic IP addresses (EIPs) to use in each AZ.'
class NatGateway(ResourceAttrs):
'Specifies a network address translation (NAT) gateway in the specified subnet.'
Type: Literal['AWS::EC2::NatGateway']
Properties: NotRequired[NatGatewayProps]
def nat_gateway(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[NatGatewayProps],
) -> NatGateway:
return build('AWS::EC2::NatGateway', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)
Attributes¶
Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.
AutoProvisionZonesAutoScalingIpsEniIdNatGatewayIdRouteTableId