RouteTargetType
- class aws_cdk.aws_ec2_alpha.RouteTargetType(*, endpoint=None, gateway=None)
Bases:
object(experimental) The gateway or endpoint targeted by the route.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
stack = Stack() my_vpc = VpcV2(self, "Vpc") route_table = RouteTable(self, "RouteTable", vpc=my_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.PRIVATE_ISOLATED ) igw = InternetGateway(self, "IGW", vpc=my_vpc ) Route(self, "IgwRoute", route_table=route_table, destination="0.0.0.0/0", target={"gateway": igw} )
- Parameters:
endpoint (
Optional[IVpcEndpoint]) – (experimental) The endpoint route target. This is used for targets such as VPC endpoints. Default: - target is not set to an endpoint, in this case a gateway is needed.gateway (
Optional[IRouteTarget]) – (experimental) The gateway route target. This is used for targets such as egress-only internet gateway or VPC peering connection. Default: - target is not set to a gateway, in this case an endpoint is needed.
- Stability:
experimental
Attributes
- endpoint
(experimental) The endpoint route target.
This is used for targets such as VPC endpoints.
- Default:
target is not set to an endpoint, in this case a gateway is needed.
- Stability:
experimental
- gateway
(experimental) The gateway route target.
This is used for targets such as egress-only internet gateway or VPC peering connection.
- Default:
target is not set to a gateway, in this case an endpoint is needed.
- Stability:
experimental