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

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

There is a newer version: 2.167.2-alpha.0
Show newest version
package software.amazon.awscdk.services.ec2.alpha;

/**
 * (experimental) Properties to define a route table.
 * 

* 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.Jsii(module = software.amazon.awscdk.services.ec2.alpha.$Module.class, fqn = "@aws-cdk/aws-ec2-alpha.RouteTableProps") @software.amazon.jsii.Jsii.Proxy(RouteTableProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface RouteTableProps extends software.amazon.jsii.JsiiSerializable { /** * (experimental) The ID of the VPC. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.IVpcV2 getVpc(); /** * (experimental) The resource name of the route table. *

* Default: - provisioned without a route table name */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getRouteTableName() { return null; } /** * @return a {@link Builder} of {@link RouteTableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link RouteTableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.ec2.alpha.IVpcV2 vpc; java.lang.String routeTableName; /** * Sets the value of {@link RouteTableProps#getVpc} * @param vpc The ID of the VPC. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpc(software.amazon.awscdk.services.ec2.alpha.IVpcV2 vpc) { this.vpc = vpc; return this; } /** * Sets the value of {@link RouteTableProps#getRouteTableName} * @param routeTableName The resource name of the route table. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder routeTableName(java.lang.String routeTableName) { this.routeTableName = routeTableName; return this; } /** * Builds the configured instance. * @return a new instance of {@link RouteTableProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public RouteTableProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link RouteTableProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RouteTableProps { private final software.amazon.awscdk.services.ec2.alpha.IVpcV2 vpc; private final java.lang.String routeTableName; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.alpha.IVpcV2.class)); this.routeTableName = software.amazon.jsii.Kernel.get(this, "routeTableName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.vpc = java.util.Objects.requireNonNull(builder.vpc, "vpc is required"); this.routeTableName = builder.routeTableName; } @Override public final software.amazon.awscdk.services.ec2.alpha.IVpcV2 getVpc() { return this.vpc; } @Override public final java.lang.String getRouteTableName() { return this.routeTableName; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("vpc", om.valueToTree(this.getVpc())); if (this.getRouteTableName() != null) { data.set("routeTableName", om.valueToTree(this.getRouteTableName())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-ec2-alpha.RouteTableProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RouteTableProps.Jsii$Proxy that = (RouteTableProps.Jsii$Proxy) o; if (!vpc.equals(that.vpc)) return false; return this.routeTableName != null ? this.routeTableName.equals(that.routeTableName) : that.routeTableName == null; } @Override public final int hashCode() { int result = this.vpc.hashCode(); result = 31 * result + (this.routeTableName != null ? this.routeTableName.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy