Interface RouteProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
RouteProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:21.294Z")
@Stability(Experimental)
public interface RouteProps
extends software.amazon.jsii.JsiiSerializable
(experimental) Properties to define a route.
Example:
VpcV2 myVpc = new VpcV2(this, "Vpc");
RouteTable routeTable = RouteTable.Builder.create(this, "RouteTable")
.vpc(myVpc)
.build();
SubnetV2 subnet = SubnetV2.Builder.create(this, "Subnet")
.vpc(myVpc)
.availabilityZone("eu-west-2a")
.ipv4CidrBlock(new IpCidr("10.0.0.0/24"))
.subnetType(SubnetType.PRIVATE_ISOLATED)
.build();
NatGateway natgw = NatGateway.Builder.create(this, "NatGW")
.subnet(subnet)
.vpc(myVpc)
.connectivityType(NatConnectivityType.PRIVATE)
.privateIpAddress("10.0.0.42")
.build();
Route.Builder.create(this, "NatGwRoute")
.routeTable(routeTable)
.destination("0.0.0.0/0")
.target(Map.of("gateway", natgw))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forRoutePropsstatic final classAn implementation forRouteProps -
Method Summary
Modifier and TypeMethodDescriptionstatic RouteProps.Builderbuilder()(experimental) The IPv4 or IPv6 CIDR block used for the destination match.default String(experimental) The resource name of the route.(experimental) The ID of the route table for the route.(experimental) The gateway or endpoint targeted by the route.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDestination
(experimental) The IPv4 or IPv6 CIDR block used for the destination match.Routing decisions are based on the most specific match.
-
getRouteTable
(experimental) The ID of the route table for the route. -
getTarget
(experimental) The gateway or endpoint targeted by the route. -
getRouteName
(experimental) The resource name of the route.Default: - provisioned without a route name
-
builder
- Returns:
- a
RouteProps.BuilderofRouteProps
-