interface IVpcV2
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.ec2.Alpha.IVpcV2 | 
  Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#IVpcV2 | 
  Java | software.amazon.awscdk.services.ec2.alpha.IVpcV2 | 
  Python | aws_cdk.aws_ec2_alpha.IVpcV2 | 
  TypeScript (source) | @aws-cdk/aws-ec2-alpha ยป IVpcV2 | 
Implemented by
Vpc
Obtainable from
Vpc.fromVpcV2Attributes()
Placeholder to see what extra props we might need, will be added to original IVPC.
Properties
| Name | Type | Description | 
|---|---|---|
| availability | string[] | AZs for this VPC. | 
| env | Resource | The environment this resource belongs to. | 
| internet | IDependable | Dependable that can be depended upon to force internet connectivity established on the VPC. | 
| ipv4 | string | The primary IPv4 CIDR block associated with the VPC. | 
| isolated | ISubnet[] | List of isolated subnets in this VPC. | 
| node | Node | The tree node. | 
| owner | string | The ID of the AWS account that owns the VPC. | 
| private | ISubnet[] | List of private subnets in this VPC. | 
| public | ISubnet[] | List of public subnets in this VPC. | 
| region | string | Optional to override inferred region. | 
| stack | Stack | The stack in which this resource is defined. | 
| vpc | string | ARN for this VPC. | 
| vpc | string | CIDR range for this VPC. | 
| vpc | string | Identifier for this VPC. | 
| vpc | VPCReference | A reference to a VPC resource. | 
| ipv4 | string[] | IPv4 CIDR provisioned under pool Required to check for overlapping CIDRs after provisioning is complete under IPAM pool. | 
| secondary | IVPCCidr[] | The secondary CIDR blocks associated with the VPC. | 
| vpc | string | VpcName to be used for tagging its components. | 
| vpn | string | Identifier for the VPN gateway. | 
availabilityZones
Type:
string[]
AZs for this VPC.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
internetConnectivityEstablished
Type:
IDependable
Dependable that can be depended upon to force internet connectivity established on the VPC.
ipv4CidrBlock
Type:
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 {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-sizing-ipv4}.
isolatedSubnets
Type:
ISubnet[]
List of isolated subnets in this VPC.
node
Type:
Node
The tree node.
ownerAccountId
Type:
string
The ID of the AWS account that owns the VPC.
privateSubnets
Type:
ISubnet[]
List of private subnets in this VPC.
publicSubnets
Type:
ISubnet[]
List of public subnets in this VPC.
region
Type:
string
Optional to override inferred region.
stack
Type:
Stack
The stack in which this resource is defined.
vpcArn
Type:
string
ARN for this VPC.
vpcCidrBlock
Type:
string
CIDR range for this VPC.
vpcId
Type:
string
Identifier for this VPC.
vpcRef
Type:
VPCReference
A reference to a VPC resource.
ipv4IpamProvisionedCidrs?
Type:
string[]
(optional)
IPv4 CIDR provisioned under pool Required to check for overlapping CIDRs after provisioning is complete under IPAM pool.
secondaryCidrBlock?
Type:
IVPCCidr[]
(optional)
The secondary CIDR blocks associated with the VPC.
For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-resize}.
vpcName?
Type:
string
(optional)
VpcName to be used for tagging its components.
vpnGatewayId?
Type:
string
(optional)
Identifier for the VPN gateway.
Methods
| Name | Description | 
|---|---|
| add | Adds a new client VPN endpoint to this VPC. | 
| add | Add an Egress only Internet Gateway to current VPC. | 
| add | Adds a new Flow Log to this VPC. | 
| add | Adds a new gateway endpoint to this VPC. | 
| add | Adds a new interface endpoint to this VPC. | 
| add | Adds an Internet Gateway to current VPC. | 
| add | Adds a new NAT Gateway to VPC A NAT gateway is a Network Address Translation (NAT) service. | 
| add | Adds a new VPN connection to this VPC. | 
| apply | Apply the given removal policy to this resource. | 
| create | Adds a new role to acceptor VPC account A cross account role is required for the VPC to peer with another account. | 
| create | Creates a new peering connection A peering connection is a private virtual network established between two VPCs. | 
| enable | Adds a VPN Gateway to this VPC. | 
| enable | Adds VPN Gateway to VPC and set route propogation. | 
| select | Return information on the subnets appropriate for the given selection strategy. | 
addClientVpnEndpoint(id, options)   
public addClientVpnEndpoint(id: string, options: ClientVpnEndpointOptions): ClientVpnEndpoint
Parameters
- id 
string - options 
ClientVpn Endpoint Options  
Returns
Adds a new client VPN endpoint to this VPC.
addEgressOnlyInternetGateway(options?)    
public addEgressOnlyInternetGateway(options?: EgressOnlyInternetGatewayOptions): EgressOnlyInternetGateway
Parameters
- options 
EgressOnly Internet Gateway Options  
Returns
Add an Egress only Internet Gateway to current VPC.
Can only be used for ipv6 enabled VPCs. For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway-basics.html}.
addFlowLog(id, options?)  
public addFlowLog(id: string, options?: FlowLogOptions): FlowLog
Parameters
- id 
string - options 
FlowLog Options  
Returns
Adds a new Flow Log to this VPC.
addGatewayEndpoint(id, options)  
public addGatewayEndpoint(id: string, options: GatewayVpcEndpointOptions): GatewayVpcEndpoint
Parameters
- id 
string - options 
GatewayVpc Endpoint Options  
Returns
Adds a new gateway endpoint to this VPC.
addInterfaceEndpoint(id, options)  
public addInterfaceEndpoint(id: string, options: InterfaceVpcEndpointOptions): InterfaceVpcEndpoint
Parameters
- id 
string - options 
InterfaceVpc Endpoint Options  
Returns
Adds a new interface endpoint to this VPC.
addInternetGateway(options?)  
public addInternetGateway(options?: InternetGatewayOptions): InternetGateway
Parameters
- options 
InternetGateway Options  
Returns
Adds an Internet Gateway to current VPC.
For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html}.
addNatGateway(options)  
public addNatGateway(options: NatGatewayOptions): NatGateway
Parameters
- options 
NatGateway Options  
Returns
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 {@link https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html}.
addVpnConnection(id, options)  
public addVpnConnection(id: string, options: VpnConnectionOptions): VpnConnection
Parameters
- id 
string - options 
VpnConnection Options  
Returns
Adds a new VPN connection to this VPC.
applyRemovalPolicy(policy)  
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy 
RemovalPolicy  
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)   
public createAcceptorVpcRole(requestorAccountId: string): Role
Parameters
- requestorAccountId 
string 
Returns
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 {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/peer-with-vpc-in-another-account.html}.
createPeeringConnection(id, options)  
public createPeeringConnection(id: string, options: VPCPeeringConnectionOptions): VPCPeeringConnection
Parameters
- id 
string - options 
VPCPeeringConnection Options  
Returns
Creates a new peering connection A peering connection is a private virtual network established between two VPCs.
For more information, see the {@link https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html}.
enableVpnGateway(options)  
public enableVpnGateway(options: EnableVpnGatewayOptions): void
Parameters
- options 
EnableVpn Gateway Options  
Adds a VPN Gateway to this VPC.
enableVpnGatewayV2(options)   
public enableVpnGatewayV2(options: VPNGatewayV2Options): VPNGatewayV2
Parameters
- options 
VPNGatewayV2 Options  
Returns
Adds VPN Gateway to VPC and set route propogation.
For more information, see the {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpngateway.html}.
selectSubnets(selection?) 
public selectSubnets(selection?: SubnetSelection): SelectedSubnets
Parameters
- selection 
SubnetSelection  
Returns
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.

 .NET
 Go
 Java
 Python
 TypeScript (