InternetGatewayOptions

class aws_cdk.aws_ec2_alpha.InternetGatewayOptions(*, internet_gateway_name=None, ipv4_destination=None, ipv6_destination=None, subnets=None)

Bases: object

(experimental) Options to define InternetGateway for VPC.

Parameters:
  • internet_gateway_name (Optional[str]) – (experimental) The resource name of the internet gateway. Provided name will be used for tagging Default: - provisioned without a resource name

  • ipv4_destination (Optional[str]) – (experimental) Destination Ipv6 address for EGW route. Default: - ‘0.0.0.0’ all Ipv4 traffic

  • ipv6_destination (Optional[str]) – (experimental) Destination Ipv6 address for EGW route. Default: - ‘::/0’ all Ipv6 traffic

  • subnets (Optional[Sequence[Union[SubnetSelection, Dict[str, Any]]]]) – (experimental) List of subnets where route to IGW will be added. Default: - route created for all subnets with Type SubnetType.Public

Stability:

experimental

ExampleMetadata:

infused

Example:

stack = Stack()
my_vpc = VpcV2(self, "Vpc")

subnet = SubnetV2(self, "Subnet",
    vpc=my_vpc,
    availability_zone="eu-west-2a",
    ipv4_cidr_block=IpCidr("10.0.0.0/24"),
    subnet_type=SubnetType.PUBLIC
)

my_vpc.add_internet_gateway(
    ipv4_destination="192.168.0.0/16"
)

Attributes

internet_gateway_name

(experimental) The resource name of the internet gateway.

Provided name will be used for tagging

Default:
  • provisioned without a resource name

Stability:

experimental

ipv4_destination

(experimental) Destination Ipv6 address for EGW route.

Default:
  • ‘0.0.0.0’ all Ipv4 traffic

Stability:

experimental

ipv6_destination

(experimental) Destination Ipv6 address for EGW route.

Default:
  • ‘::/0’ all Ipv6 traffic

Stability:

experimental

subnets

(experimental) List of subnets where route to IGW will be added.

Default:
  • route created for all subnets with Type SubnetType.Public

Stability:

experimental