NatGatewayProps

class aws_cdk.aws_ec2.NatGatewayProps(*, eip_allocation_ids=None, max_drain_duration=None)

Bases: object

Properties for a NAT gateway.

Parameters:
  • eip_allocation_ids (Optional[Sequence[str]]) – EIP allocation IDs for the NAT gateways. Default: - No fixed EIPs allocated for the NAT gateways

  • max_drain_duration (Optional[Duration]) – Maximum amount of time to wait before forcibly releasing IP addresses if connections are still in progress. Default: Duration.seconds(350)

ExampleMetadata:

fixture=_generated

Example:

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

nat_gateway_props = ec2.NatGatewayProps(
    eip_allocation_ids=["eipAllocationIds"],
    max_drain_duration=cdk.Duration.minutes(30)
)

Attributes

eip_allocation_ids

EIP allocation IDs for the NAT gateways.

Default:
  • No fixed EIPs allocated for the NAT gateways

max_drain_duration

Maximum amount of time to wait before forcibly releasing IP addresses if connections are still in progress.

Default:

Duration.seconds(350)