> **Experimental**
>
> `@aws-cdk/aws-ec2-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# IVpcV2

Placeholder to see what extra props we might need, will be added to original IVPC.

Extends: IVpcV2
Extends: IVpc
Implemented by: VpcV2, VpcV2Base

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/vpc-v2-base.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts#L149)

## Properties

- `availabilityZones`: string[] — AZs for this VPC.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `internetConnectivityEstablished`: [IDependable](/cdk/api/v2/docs/constructs.IDependable.html) — Dependable that can be depended upon to force internet connectivity established on the VPC.

- `ipv4CidrBlock`: string — 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 [https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-sizing-ipv4](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-sizing-ipv4).

- `ipv4IpamProvisionedCidrs`: string[] — IPv4 CIDR provisioned under pool Required to check for overlapping CIDRs after provisioning is complete under IPAM pool.

- `isolatedSubnets`: [ISubnet](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISubnet.html)[] — List of isolated subnets in this VPC.

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `ownerAccountId`: string — The ID of the AWS account that owns the VPC.

  **Default:** the account id of the parent stack

- `privateSubnets`: [ISubnet](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISubnet.html)[] — List of private subnets in this VPC.

- `publicSubnets`: [ISubnet](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISubnet.html)[] — List of public subnets in this VPC.

- `region`: string — Optional to override inferred region.

  **Default:** current stack's environment region

- `secondaryCidrBlock`: [IVPCCidrBlock](/cdk/api/v2/docs/@aws-cdk_aws-ec2-alpha.IVPCCidrBlock.html)[] — The secondary CIDR blocks associated with the VPC.

  For more information, see the [https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-resize](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-resize).

- `stack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

- `vpcArn`: string — ARN for this VPC.

- `vpcCidrBlock`: string — CIDR range for this VPC.

- `vpcId`: string — Identifier for this VPC.

- `vpcName`: string — VpcName to be used for tagging its components.

- `vpcRef`: [VPCReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.VPCReference.html) — A reference to a VPC resource.

- `vpnGatewayId`: string — Identifier for the VPN gateway.

## Methods

- `addClientVpnEndpoint(id: string, options: ClientVpnEndpointOptions): ClientVpnEndpoint` — Adds a new client VPN endpoint to this VPC.

- `addEgressOnlyInternetGateway(options?: EgressOnlyInternetGatewayOptions): EgressOnlyInternetGateway` — Add an Egress only Internet Gateway to current VPC.

  Can only be used for ipv6 enabled VPCs.
  For more information, see the [https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway-basics.html](https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway-basics.html).

- `addFlowLog(id: string, options?: FlowLogOptions): FlowLog` — Adds a new Flow Log to this VPC.

- `addGatewayEndpoint(id: string, options: GatewayVpcEndpointOptions): GatewayVpcEndpoint` — Adds a new gateway endpoint to this VPC.

- `addInterfaceEndpoint(id: string, options: InterfaceVpcEndpointOptions): InterfaceVpcEndpoint` — Adds a new interface endpoint to this VPC.

- `addInternetGateway(options?: InternetGatewayOptions): InternetGateway` — Adds an Internet Gateway to current VPC.

  For more information, see the [https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html).

- `addNatGateway(options: NatGatewayOptions): NatGateway` — Adds a new NAT Gateway to VPC A NAT gateway is a Network Address Translation (NAT) service.

  NAT Gateway Connectivity can be of type `Public` or `Private`.
  For more information, see the [https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html).

- `addVpnConnection(id: string, options: VpnConnectionOptions): VpnConnection` — Adds a new VPN connection to this VPC.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `createAcceptorVpcRole(requestorAccountId: string): Role` — Adds a new role to acceptor VPC account A cross account role is required for the VPC to peer with another account.

  For more information, see the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/peer-with-vpc-in-another-account.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/peer-with-vpc-in-another-account.html).

- `createPeeringConnection(id: string, options: VPCPeeringConnectionOptions): VPCPeeringConnection` — Creates a new peering connection A peering connection is a private virtual network established between two VPCs.

  For more information, see the [https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html).

- `enableVpnGateway(options: EnableVpnGatewayOptions): void` — Adds a VPN Gateway to this VPC.

- `enableVpnGatewayV2(options: VPNGatewayV2Options): VPNGatewayV2` — Adds VPN Gateway to VPC and set route propagation.

  For more information, see the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpngateway.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpngateway.html).

- `selectSubnets(selection?: SubnetSelection): SelectedSubnets` — 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.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
