Class VpcV2
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.ec2.alpha.VpcV2Base
software.amazon.awscdk.services.ec2.alpha.VpcV2
- All Implemented Interfaces:
IResource
,IVpcV2
,IVpc
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-13T21:17:43.058Z")
@Stability(Experimental)
public class VpcV2
extends VpcV2Base
(experimental) This class provides a foundation for creating and configuring a VPC with advanced features such as IPAM (IP Address Management) and IPv6 support.
For more information, see the
AWS CDK Documentation on VPCs}.
invalid @link
{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html
Example:
Stack stack = new Stack(); 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.PUBLIC) .build(); myVpc.addInternetGateway(); myVpc.addNatGateway(NatGatewayOptions.builder() .subnet(subnet) .connectivityType(NatConnectivityType.PUBLIC) .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.IVpcV2
IVpcV2.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
VpcV2
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
VpcV2
(software.amazon.jsii.JsiiObjectRef objRef) VpcV2
(software.constructs.Construct scope, String id, VpcV2Props props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IVpcV2
fromVpcV2Attributes
(software.constructs.Construct scope, String id, VpcV2Attributes attrs) (experimental) Create a VPC from existing attributes.(experimental) Indicates if instances launched in this VPC will have public DNS hostnames.(experimental) Indicates if DNS support is enabled for this VPC.software.constructs.IDependable
(experimental) To define dependency on internet connectivity.(experimental) The provider of ipv4 addresses.(experimental) The primary IPv4 CIDR block associated with the VPC.(experimental) IPv4 CIDR provisioned using IPAM pool Required to check for overlapping CIDRs after provisioning is complete under IPAM.(experimental) The IPv6 CIDR blocks for the VPC.(experimental) Isolated Subnets that are part of this VPC.(experimental) Identifier of the owner for this VPC.(experimental) Pbulic Subnets that are part of this VPC.(experimental) Public Subnets that are part of this VPC.(experimental) Region for this VPC.(experimental) The AWS CloudFormation resource representing the VPC.(experimental) reference to all secondary blocks attached.(experimental) For validation to define IPv6 subnets, set to true in case of Amazon Provided IPv6 cidr range if true, IPv6 addresses can be attached to the subnets.(experimental) Arn of this VPC.(experimental) CIDR range for this VPC.getVpcId()
(experimental) Identifier for this VPC.Methods inherited from class software.amazon.awscdk.services.ec2.alpha.VpcV2Base
addClientVpnEndpoint, addEgressOnlyInternetGateway, addEgressOnlyInternetGateway, addFlowLog, addFlowLog, addGatewayEndpoint, addInterfaceEndpoint, addInternetGateway, addInternetGateway, addNatGateway, addVpnConnection, enableVpnGateway, enableVpnGatewayV2, getAvailabilityZones, getIncompleteSubnetDefinition, getInternetGatewayId, getVpnGatewayId, selectSubnetObjects, selectSubnetObjects, selectSubnets, selectSubnets, setIncompleteSubnetDefinition
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
-
VpcV2
protected VpcV2(software.amazon.jsii.JsiiObjectRef objRef) -
VpcV2
protected VpcV2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
VpcV2
@Stability(Experimental) public VpcV2(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable VpcV2Props props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
VpcV2
@Stability(Experimental) public VpcV2(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
fromVpcV2Attributes
@Stability(Experimental) @NotNull public static IVpcV2 fromVpcV2Attributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VpcV2Attributes attrs) (experimental) Create a VPC from existing attributes.- Parameters:
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.
-
getDnsHostnamesEnabled
(experimental) Indicates if instances launched in this VPC will have public DNS hostnames. -
getDnsSupportEnabled
(experimental) Indicates if DNS support is enabled for this VPC. -
getInternetConnectivityEstablished
@Stability(Experimental) @NotNull public software.constructs.IDependable getInternetConnectivityEstablished()(experimental) To define dependency on internet connectivity.- Specified by:
getInternetConnectivityEstablished
in interfaceIVpc
- Specified by:
getInternetConnectivityEstablished
in classVpcV2Base
-
getIpAddresses
(experimental) The provider of ipv4 addresses. -
getIpv4CidrBlock
(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
invalid @link
{@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-sizing-ipv4
- Specified by:
getIpv4CidrBlock
in interfaceIVpcV2
- Specified by:
getIpv4CidrBlock
in classVpcV2Base
-
getIpv6CidrBlocks
(experimental) The IPv6 CIDR blocks for the VPC.See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html#aws-resource-ec2-vpc-return-values
-
getIsolatedSubnets
(experimental) Isolated Subnets that are part of this VPC.- Specified by:
getIsolatedSubnets
in interfaceIVpc
- Specified by:
getIsolatedSubnets
in classVpcV2Base
-
getOwnerAccountId
(experimental) Identifier of the owner for this VPC.- Specified by:
getOwnerAccountId
in interfaceIVpcV2
- Specified by:
getOwnerAccountId
in classVpcV2Base
-
getPrivateSubnets
(experimental) Pbulic Subnets that are part of this VPC.- Specified by:
getPrivateSubnets
in interfaceIVpc
- Overrides:
getPrivateSubnets
in classVpcV2Base
-
getPublicSubnets
(experimental) Public Subnets that are part of this VPC.- Specified by:
getPublicSubnets
in interfaceIVpc
- Overrides:
getPublicSubnets
in classVpcV2Base
-
getRegion
(experimental) Region for this VPC. -
getResource
(experimental) The AWS CloudFormation resource representing the VPC. -
getUseIpv6
(experimental) For validation to define IPv6 subnets, set to true in case of Amazon Provided IPv6 cidr range if true, IPv6 addresses can be attached to the subnets.Default: false
-
getVpcArn
(experimental) Arn of this VPC. -
getVpcCidrBlock
(experimental) CIDR range for this VPC.- Specified by:
getVpcCidrBlock
in interfaceIVpc
- Specified by:
getVpcCidrBlock
in classVpcV2Base
-
getVpcId
(experimental) Identifier for this VPC. -
getIpv4IpamProvisionedCidrs
(experimental) IPv4 CIDR provisioned using IPAM pool Required to check for overlapping CIDRs after provisioning is complete under IPAM.- Specified by:
getIpv4IpamProvisionedCidrs
in interfaceIVpcV2
- Specified by:
getIpv4IpamProvisionedCidrs
in classVpcV2Base
-
getSecondaryCidrBlock
(experimental) reference to all secondary blocks attached.- Specified by:
getSecondaryCidrBlock
in interfaceIVpcV2
- Specified by:
getSecondaryCidrBlock
in classVpcV2Base
-