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.104.0 (build e79254c)",
date="2024-10-31T19:13:07.753Z")
@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
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forRouteTable
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IRouteTable
IRouteTable.Jsii$Default, IRouteTable.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
RouteTable
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
RouteTable
(software.amazon.jsii.JsiiObjectRef objRef) RouteTable
(software.constructs.Construct scope, String id, RouteTableProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRoute
(String id, String destination, RouteTargetType target) (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, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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) (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:
getRouteTableId
in interfaceIRouteTable
-