RouterType

class aws_cdk.aws_ec2.RouterType(value)

Bases: Enum

Type of router used in route.

ExampleMetadata:

infused

Example:

vpc = ec2.Vpc(self, "VPC",
    subnet_configuration=[ec2.SubnetConfiguration(
        subnet_type=ec2.SubnetType.PUBLIC,
        name="Public"
    ), ec2.SubnetConfiguration(
        subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,
        name="Isolated"
    )]
)

(vpc.isolated_subnets[0]).add_route("StaticRoute",
    router_id=vpc.internet_gateway_id,
    router_type=ec2.RouterType.GATEWAY,
    destination_cidr_block="8.8.8.8/32"
)

Attributes

CARRIER_GATEWAY

Carrier gateway.

EGRESS_ONLY_INTERNET_GATEWAY

Egress-only Internet Gateway.

GATEWAY

Internet Gateway.

INSTANCE

Instance.

LOCAL_GATEWAY

Local Gateway.

NAT_GATEWAY

NAT Gateway.

NETWORK_INTERFACE

Network Interface.

TRANSIT_GATEWAY

Transit Gateway.

VPC_ENDPOINT

VPC Endpoint for gateway load balancers.

VPC_PEERING_CONNECTION

VPC peering connection.