RouteProps
- class aws_cdk.aws_ec2_alpha.RouteProps(*, destination, route_table, target, route_name=None)
Bases:
object
(experimental) Properties to define a route.
- Parameters:
destination (
str
) – (experimental) The IPv4 or IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.route_table (
IRouteTable
) – (experimental) The ID of the route table for the route.target (
RouteTargetType
) – (experimental) The gateway or endpoint targeted by the route.route_name (
Optional
[str
]) – (experimental) The resource name of the route. Default: - provisioned without a route name
- Stability:
experimental
- ExampleMetadata:
infused
Example:
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 ) natgw = NatGateway(self, "NatGW", subnet=subnet, vpc=my_vpc, connectivity_type=NatConnectivityType.PRIVATE, private_ip_address="10.0.0.42" ) Route(self, "NatGwRoute", route_table=route_table, destination="0.0.0.0/0", target={"gateway": natgw} )
Attributes
- destination
(experimental) The IPv4 or IPv6 CIDR block used for the destination match.
Routing decisions are based on the most specific match.
- Stability:
experimental
- route_name
(experimental) The resource name of the route.
- Default:
provisioned without a route name
- Stability:
experimental
- route_table
(experimental) The ID of the route table for the route.
- Stability:
experimental
- Attribute:
routeTable
- target
(experimental) The gateway or endpoint targeted by the route.
- Stability:
experimental