Class RouteTable
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.ec2.alpha.RouteTable
- All Implemented Interfaces:
IResource,IRouteTable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:49.822Z")
@Stability(Experimental)
public class RouteTable
extends Resource
implements IRouteTable
(experimental) Creates a route table for the specified VPC.
Example:
Stack stack = new Stack();
VpcV2 myVpc = new VpcV2(this, "Vpc");
VPNGatewayV2 vpnGateway = myVpc.enableVpnGatewayV2(VPNGatewayV2Options.builder()
.vpnRoutePropagation(List.of(SubnetSelection.builder().subnetType(SubnetType.PUBLIC).build()))
.type(VpnConnectionType.IPSEC_1)
.build());
RouteTable routeTable = RouteTable.Builder.create(stack, "routeTable")
.vpc(myVpc)
.build();
Route.Builder.create(stack, "route")
.destination("172.31.0.0/24")
.target(Map.of("gateway", vpnGateway))
.routeTable(routeTable)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forRouteTable.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IRouteTable
IRouteTable.Jsii$Default, IRouteTable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRouteTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedRouteTable(software.amazon.jsii.JsiiObjectRef objRef) RouteTable(software.constructs.Construct scope, String id, RouteTableProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRoute(String id, String destination, RouteTargetType target) (experimental) Adds a new custom route to the route table.voidaddRoute(String id, String destination, RouteTargetType target, String routeName) (experimental) Adds a new custom route to the route table.(experimental) The route table CFN resource.(experimental) The ID of the route table.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
RouteTable
protected RouteTable(software.amazon.jsii.JsiiObjectRef objRef) -
RouteTable
protected RouteTable(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
RouteTable
@Stability(Experimental) public RouteTable(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull RouteTableProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
addRoute
@Stability(Experimental) public void addRoute(@NotNull String id, @NotNull String destination, @NotNull RouteTargetType target, @Nullable String routeName) (experimental) Adds a new custom route to the route table.- Parameters:
id- This parameter is required.destination- The IPv4 or IPv6 CIDR block used for the destination match. This parameter is required.target- The gateway or endpoint targeted by the route. This parameter is required.routeName- The resource name of the route.
-
addRoute
@Stability(Experimental) public void addRoute(@NotNull String id, @NotNull String destination, @NotNull RouteTargetType target) (experimental) Adds a new custom route to the route table.- Parameters:
id- This parameter is required.destination- The IPv4 or IPv6 CIDR block used for the destination match. This parameter is required.target- The gateway or endpoint targeted by the route. This parameter is required.
-
getResource
(experimental) The route table CFN resource. -
getRouteTableId
(experimental) The ID of the route table.- Specified by:
getRouteTableIdin interfaceIRouteTable
-