software.amazon.awscdk.services.ec2.alpha.VpcV2Base Maven / Gradle / Ivy
Show all versions of ec2-alpha Show documentation
package software.amazon.awscdk.services.ec2.alpha;
/**
* (experimental) Base class for creating a VPC (Virtual Private Cloud) in AWS.
*
* For more information, see the {@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html AWS CDK Documentation on VPCs}.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-11T15:56:07.944Z")
@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.VpcV2Base")
public abstract class VpcV2Base extends software.amazon.awscdk.Resource implements software.amazon.awscdk.services.ec2.alpha.IVpcV2 {
protected VpcV2Base(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected VpcV2Base(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected VpcV2Base(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.ResourceProps 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"), props });
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected VpcV2Base(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
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") });
}
/**
* (experimental) Adds a new client VPN endpoint to this VPC.
*
* @param id This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.ClientVpnEndpoint addClientVpnEndpoint(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.ClientVpnEndpointOptions options) {
return software.amazon.jsii.Kernel.call(this, "addClientVpnEndpoint", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ClientVpnEndpoint.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (experimental) Adds a new Egress Only Internet Gateway to this VPC and defines a new route to the route table of given subnets.
*
* Default: - in case of no input subnets, no route is created
*
* @param options
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void addEgressOnlyInternetGateway(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.alpha.EgressOnlyInternetGatewayOptions options) {
software.amazon.jsii.Kernel.call(this, "addEgressOnlyInternetGateway", software.amazon.jsii.NativeType.VOID, new Object[] { options });
}
/**
* (experimental) Adds a new Egress Only Internet Gateway to this VPC and defines a new route to the route table of given subnets.
*
* Default: - in case of no input subnets, no route is created
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void addEgressOnlyInternetGateway() {
software.amazon.jsii.Kernel.call(this, "addEgressOnlyInternetGateway", software.amazon.jsii.NativeType.VOID);
}
/**
* (experimental) Adds a new flow log to this VPC.
*
* @param id This parameter is required.
* @param options
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.FlowLog addFlowLog(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.FlowLogOptions options) {
return software.amazon.jsii.Kernel.call(this, "addFlowLog", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.FlowLog.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), options });
}
/**
* (experimental) Adds a new flow log to this VPC.
*
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.FlowLog addFlowLog(final @org.jetbrains.annotations.NotNull java.lang.String id) {
return software.amazon.jsii.Kernel.call(this, "addFlowLog", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.FlowLog.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required") });
}
/**
* (experimental) Adds a new gateway endpoint to this VPC.
*
* @param id This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.GatewayVpcEndpoint addGatewayEndpoint(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.GatewayVpcEndpointOptions options) {
return software.amazon.jsii.Kernel.call(this, "addGatewayEndpoint", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.GatewayVpcEndpoint.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (experimental) Adds a new interface endpoint to this VPC.
*
* @param id This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.InterfaceVpcEndpoint addInterfaceEndpoint(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.InterfaceVpcEndpointOptions options) {
return software.amazon.jsii.Kernel.call(this, "addInterfaceEndpoint", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InterfaceVpcEndpoint.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (experimental) Adds a new Internet Gateway to this VPC.
*
* Default: - creates a new route for public subnets(with all outbound access) to the Internet Gateway.
*
* @param options
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void addInternetGateway(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.alpha.InternetGatewayOptions options) {
software.amazon.jsii.Kernel.call(this, "addInternetGateway", software.amazon.jsii.NativeType.VOID, new Object[] { options });
}
/**
* (experimental) Adds a new Internet Gateway to this VPC.
*
* Default: - creates a new route for public subnets(with all outbound access) to the Internet Gateway.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void addInternetGateway() {
software.amazon.jsii.Kernel.call(this, "addInternetGateway", software.amazon.jsii.NativeType.VOID);
}
/**
* (experimental) Adds a new NAT Gateway to the given subnet of this VPC of given subnets.
*
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.NatGateway addNatGateway(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.NatGatewayOptions options) {
return software.amazon.jsii.Kernel.call(this, "addNatGateway", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.alpha.NatGateway.class), new Object[] { java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (experimental) Adds a new VPN connection to this VPC.
*
* @param id This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.VpnConnection addVpnConnection(final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.VpnConnectionOptions options) {
return software.amazon.jsii.Kernel.call(this, "addVpnConnection", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.VpnConnection.class), new Object[] { java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (deprecated) Adds a VPN Gateway to this VPC.
*
* @deprecated use enableVpnGatewayV2 for compatibility with VPCV2.Route
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
@Override
public void enableVpnGateway(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.EnableVpnGatewayOptions options) {
software.amazon.jsii.Kernel.call(this, "enableVpnGateway", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (experimental) Adds VPNGAtewayV2 to this VPC.
*
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2 enableVpnGatewayV2(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2Options options) {
return software.amazon.jsii.Kernel.call(this, "enableVpnGatewayV2", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2.class), new Object[] { java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* (experimental) Return the subnets appropriate for the placement strategy.
*
* @param selection
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.NotNull java.util.List selectSubnetObjects(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection selection) {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "selectSubnetObjects", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISubnet.class)), new Object[] { selection }));
}
/**
* (experimental) Return the subnets appropriate for the placement strategy.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.NotNull java.util.List selectSubnetObjects() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.call(this, "selectSubnetObjects", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISubnet.class))));
}
/**
* (experimental) Return information on the subnets appropriate for the given selection strategy.
*
* Requires that at least one subnet is matched, throws a descriptive
* error message otherwise.
*
* @param selection
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.SelectedSubnets selectSubnets(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection selection) {
return software.amazon.jsii.Kernel.call(this, "selectSubnets", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SelectedSubnets.class), new Object[] { selection });
}
/**
* (experimental) Return information on the subnets appropriate for the given selection strategy.
*
* Requires that at least one subnet is matched, throws a descriptive
* error message otherwise.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.SelectedSubnets selectSubnets() {
return software.amazon.jsii.Kernel.call(this, "selectSubnets", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SelectedSubnets.class));
}
/**
* (experimental) AZs for this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getAvailabilityZones() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "availabilityZones", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))));
}
/**
* (experimental) Dependable that can be depended upon to force internet connectivity established on the VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public abstract @org.jetbrains.annotations.NotNull software.constructs.IDependable getInternetConnectivityEstablished();
/**
* (experimental) The primary IPv4 CIDR block associated with the VPC.
*
* Needed in order to validate the vpc range of subnet
* current prop vpcCidrBlock refers to the token value
* For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-sizing-ipv4}.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public abstract @org.jetbrains.annotations.NotNull java.lang.String getIpv4CidrBlock();
/**
* (experimental) List of isolated subnets in this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public abstract @org.jetbrains.annotations.NotNull java.util.List getIsolatedSubnets();
/**
* (experimental) List of private subnets in this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getPrivateSubnets() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "privateSubnets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISubnet.class))));
}
/**
* (experimental) List of public subnets in this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.util.List getPublicSubnets() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "publicSubnets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISubnet.class))));
}
/**
* (experimental) Secondary IPs for the VPC, can be multiple Ipv4 or Ipv6 Ipv4 should be within RFC#1918 range.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public abstract @org.jetbrains.annotations.NotNull java.util.List getSecondaryCidrBlock();
/**
* (experimental) Arn of this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public abstract @org.jetbrains.annotations.NotNull java.lang.String getVpcArn();
/**
* (experimental) CIDR range for this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public abstract @org.jetbrains.annotations.NotNull java.lang.String getVpcCidrBlock();
/**
* (experimental) Identifier for this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public abstract @org.jetbrains.annotations.NotNull java.lang.String getVpcId();
/**
* (experimental) Returns the id of the Internet Gateway (if enabled).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getInternetGatewayId() {
return software.amazon.jsii.Kernel.get(this, "internetGatewayId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) Returns the id of the VPN Gateway (if enabled).
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.String getVpnGatewayId() {
return software.amazon.jsii.Kernel.get(this, "vpnGatewayId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) If this is set to true, don't error out on trying to select subnets.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected @org.jetbrains.annotations.NotNull java.lang.Boolean getIncompleteSubnetDefinition() {
return software.amazon.jsii.Kernel.get(this, "incompleteSubnetDefinition", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* (experimental) If this is set to true, don't error out on trying to select subnets.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
protected void setIncompleteSubnetDefinition(final @org.jetbrains.annotations.NotNull java.lang.Boolean value) {
software.amazon.jsii.Kernel.set(this, "incompleteSubnetDefinition", java.util.Objects.requireNonNull(value, "incompleteSubnetDefinition is required"));
}
/**
* A proxy class which represents a concrete javascript instance of this type.
*/
@software.amazon.jsii.Internal
private static final class Jsii$Proxy extends software.amazon.awscdk.services.ec2.alpha.VpcV2Base implements software.amazon.awscdk.services.ec2.alpha.IVpcV2.Jsii$Default, software.amazon.awscdk.IResource.Jsii$Default, software.constructs.IConstruct.Jsii$Default {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
/**
* (experimental) Dependable that can be depended upon to force internet connectivity established on the VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull software.constructs.IDependable getInternetConnectivityEstablished() {
return software.amazon.jsii.Kernel.get(this, "internetConnectivityEstablished", software.amazon.jsii.NativeType.forClass(software.constructs.IDependable.class));
}
/**
* (experimental) The primary IPv4 CIDR block associated with the VPC.
*
* Needed in order to validate the vpc range of subnet
* current prop vpcCidrBlock refers to the token value
* For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-sizing-ipv4}.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull java.lang.String getIpv4CidrBlock() {
return software.amazon.jsii.Kernel.get(this, "ipv4CidrBlock", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) List of isolated subnets in this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull java.util.List getIsolatedSubnets() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "isolatedSubnets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISubnet.class))));
}
/**
* (experimental) Secondary IPs for the VPC, can be multiple Ipv4 or Ipv6 Ipv4 should be within RFC#1918 range.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull java.util.List getSecondaryCidrBlock() {
return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "secondaryCidrBlock", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.CfnVPCCidrBlock.class))));
}
/**
* (experimental) Arn of this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull java.lang.String getVpcArn() {
return software.amazon.jsii.Kernel.get(this, "vpcArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) CIDR range for this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull java.lang.String getVpcCidrBlock() {
return software.amazon.jsii.Kernel.get(this, "vpcCidrBlock", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* (experimental) Identifier for this VPC.
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public final @org.jetbrains.annotations.NotNull java.lang.String getVpcId() {
return software.amazon.jsii.Kernel.get(this, "vpcId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
}
}