EgressOnlyInternetGatewayProps

class aws_cdk.aws_ec2_alpha.EgressOnlyInternetGatewayProps(*, vpc, egress_only_internet_gateway_name=None)

Bases: object

(experimental) Properties to define an egress-only internet gateway.

Parameters:
  • vpc (IVpcV2) – (experimental) The ID of the VPC for which to create the egress-only internet gateway.

  • egress_only_internet_gateway_name (Optional[str]) – (experimental) The resource name of the egress-only internet gateway. Default: - provisioned without a resource name

Stability:

experimental

ExampleMetadata:

infused

Example:

stack = Stack()
my_vpc = VpcV2(self, "Vpc",
    primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
    secondary_address_blocks=[IpAddresses.amazon_provided_ipv6(
        cidr_block_name="AmazonProvided"
    )]
)

eigw = EgressOnlyInternetGateway(self, "EIGW",
    vpc=my_vpc
)

route_table = RouteTable(self, "RouteTable",
    vpc=my_vpc
)

route_table.add_route("EIGW", "::/0", {"gateway": eigw})

Attributes

egress_only_internet_gateway_name

(experimental) The resource name of the egress-only internet gateway.

Default:
  • provisioned without a resource name

Stability:

experimental

vpc

(experimental) The ID of the VPC for which to create the egress-only internet gateway.

Stability:

experimental