All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.ec2.alpha.RouteTable Maven / Gradle / Ivy

package software.amazon.awscdk.services.ec2.alpha;

/**
 * (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();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-11T15:56:07.925Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ec2.alpha.$Module.class, fqn = "@aws-cdk/aws-ec2-alpha.RouteTable") public class RouteTable extends software.amazon.awscdk.Resource implements software.amazon.awscdk.services.ec2.IRouteTable { protected RouteTable(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected RouteTable(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public RouteTable(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.RouteTableProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) Adds a new custom route to the route table. *

* @param id This parameter is required. * @param destination The IPv4 or IPv6 CIDR block used for the destination match. This parameter is required. * @param target The gateway or endpoint targeted by the route. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void addRoute(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.String destination, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.RouteTargetType target) { software.amazon.jsii.Kernel.call(this, "addRoute", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(destination, "destination is required"), java.util.Objects.requireNonNull(target, "target is required") }); } /** * (experimental) The route table CFN resource. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.CfnRouteTable getResource() { return software.amazon.jsii.Kernel.get(this, "resource", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.CfnRouteTable.class)); } /** * (experimental) The ID of the route table. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getRouteTableId() { return software.amazon.jsii.Kernel.get(this, "routeTableId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.ec2.alpha.RouteTable}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.awscdk.services.ec2.alpha.RouteTableProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awscdk.services.ec2.alpha.RouteTableProps.Builder(); } /** * (experimental) The ID of the VPC. *

* @return {@code this} * @param vpc The ID of the VPC. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpc(final software.amazon.awscdk.services.ec2.alpha.IVpcV2 vpc) { this.props.vpc(vpc); return this; } /** * (experimental) The resource name of the route table. *

* Default: - provisioned without a route table name *

* @return {@code this} * @param routeTableName The resource name of the route table. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder routeTableName(final java.lang.String routeTableName) { this.props.routeTableName(routeTableName); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.ec2.alpha.RouteTable}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.ec2.alpha.RouteTable build() { return new software.amazon.awscdk.services.ec2.alpha.RouteTable( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy