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. |
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. |
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.
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}.
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. |
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. |
ClientVpnEndpoint(id, options)
addpublic addClientVpnEndpoint(id: string, options: ClientVpnEndpointOptions): ClientVpnEndpoint
Parameters
- id
string
- options
Client
Vpn Endpoint Options
Returns
Adds a new client VPN endpoint to this VPC.
EgressOnlyInternetGateway(options?)
addpublic addEgressOnlyInternetGateway(options?: EgressOnlyInternetGatewayOptions): void
Parameters
- options
Egress
Only Internet Gateway Options
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}.
FlowLog(id, options?)
addpublic addFlowLog(id: string, options?: FlowLogOptions): FlowLog
Parameters
- id
string
- options
Flow
Log Options
Returns
Adds a new Flow Log to this VPC.
GatewayEndpoint(id, options)
addpublic addGatewayEndpoint(id: string, options: GatewayVpcEndpointOptions): GatewayVpcEndpoint
Parameters
- id
string
- options
Gateway
Vpc Endpoint Options
Returns
Adds a new gateway endpoint to this VPC.
InterfaceEndpoint(id, options)
addpublic addInterfaceEndpoint(id: string, options: InterfaceVpcEndpointOptions): InterfaceVpcEndpoint
Parameters
- id
string
- options
Interface
Vpc Endpoint Options
Returns
Adds a new interface endpoint to this VPC.
InternetGateway(options?)
addpublic addInternetGateway(options?: InternetGatewayOptions): void
Parameters
- options
Internet
Gateway Options
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}.
NatGateway(options)
addpublic addNatGateway(options: NatGatewayOptions): NatGateway
Parameters
- options
Nat
Gateway 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}.
VpnConnection(id, options)
addpublic addVpnConnection(id: string, options: VpnConnectionOptions): VpnConnection
Parameters
- id
string
- options
Vpn
Connection Options
Returns
Adds a new VPN connection to this VPC.
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
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
).
VpnGateway(options)
enablepublic enableVpnGateway(options: EnableVpnGatewayOptions): void
Parameters
- options
Enable
Vpn Gateway Options
Adds a VPN Gateway to this VPC.
VpnGatewayV2(options)
enablepublic enableVpnGatewayV2(options: VPNGatewayV2Options): VPNGatewayV2
Parameters
- options
VPNGateway
V2 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}.
Subnets(selection?)
selectpublic selectSubnets(selection?: SubnetSelection): SelectedSubnets
Parameters
- selection
Subnet
Selection
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.