ConfigureNatOptions

class aws_cdk.aws_ec2.ConfigureNatOptions(*, nat_subnets, private_subnets, vpc)

Bases: object

Options passed by the VPC when NAT needs to be configured.

Parameters:
  • nat_subnets (Sequence[PublicSubnet]) – The public subnets where the NAT providers need to be placed.

  • private_subnets (Sequence[PrivateSubnet]) – The private subnets that need to route through the NAT providers. There may be more private subnets than public subnets with NAT providers.

  • vpc (Vpc) – The VPC we’re configuring NAT for.

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

# private_subnet: ec2.PrivateSubnet
# public_subnet: ec2.PublicSubnet
# vpc: ec2.Vpc

configure_nat_options = ec2.ConfigureNatOptions(
    nat_subnets=[public_subnet],
    private_subnets=[private_subnet],
    vpc=vpc
)

Attributes

nat_subnets

The public subnets where the NAT providers need to be placed.

private_subnets

The private subnets that need to route through the NAT providers.

There may be more private subnets than public subnets with NAT providers.

vpc

The VPC we’re configuring NAT for.