Class Route
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.ec2.alpha.Route
- All Implemented Interfaces:
IResource
,IRouteV2
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:18.791Z")
@Stability(Experimental)
public class Route
extends Resource
implements IRouteV2
(experimental) Creates a new route with added functionality.
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 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.alpha.IRouteV2
IRouteV2.Jsii$Default, IRouteV2.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
Route
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Route
(software.amazon.jsii.JsiiObjectRef objRef) Route
(software.constructs.Construct scope, String id, RouteProps props) -
Method Summary
Modifier and TypeMethodDescription(experimental) The IPv4 or IPv6 CIDR block used for the destination match.(experimental) The route CFN resource.(experimental) The route table for the route.(experimental) The gateway or endpoint targeted by the route.(experimental) The type of router the route is targetting.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.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Route
protected Route(software.amazon.jsii.JsiiObjectRef objRef) -
Route
protected Route(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Route
@Stability(Experimental) public Route(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull RouteProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
getDestination
(experimental) The IPv4 or IPv6 CIDR block used for the destination match.Routing decisions are based on the most specific match.
- Specified by:
getDestination
in interfaceIRouteV2
-
getRouteTable
(experimental) The route table for the route.- Specified by:
getRouteTable
in interfaceIRouteV2
-
getTarget
(experimental) The gateway or endpoint targeted by the route. -
getTargetRouterType
(experimental) The type of router the route is targetting. -
getResource
(experimental) The route CFN resource.
-