interface VpcV2Props
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ec2.Alpha.VpcV2Props |
Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#VpcV2Props |
Java | software.amazon.awscdk.services.ec2.alpha.VpcV2Props |
Python | aws_cdk.aws_ec2_alpha.VpcV2Props |
TypeScript (source) | @aws-cdk/aws-ec2-alpha ยป VpcV2Props |
Properties to define VPC [disable-awslint:from-method].
Example
const stack = new Stack();
const myVpc = new VpcV2(this, 'Vpc',{
primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),
secondaryAddressBlocks: [IpAddresses.amazonProvidedIpv6({
cidrBlockName: 'AmazonProvided',
})]
});
const eigw = new EgressOnlyInternetGateway(this, 'EIGW', {
vpc: myVpc,
});
const routeTable = new RouteTable(this, 'RouteTable', {
vpc: myVpc,
});
routeTable.addRoute('EIGW', '::/0', { gateway: eigw });
Properties
Name | Type | Description |
---|---|---|
default | Default | The default tenancy of instances launched into the VPC. |
enable | boolean | Indicates whether the instances launched in the VPC get DNS hostnames. |
enable | boolean | Indicates whether the DNS resolution is supported for the VPC. |
primary | IIp | A must IPv4 CIDR block for the VPC. |
secondary | IIp [] | The secondary CIDR blocks associated with the VPC. |
vpc | string | Physical name for the VPC. |
defaultInstanceTenancy?
Type:
Default
(optional, default: DefaultInstanceTenancy.Default (shared) tenancy)
The default tenancy of instances launched into the VPC.
By setting this to dedicated tenancy, instances will be launched on hardware dedicated to a single AWS customer, unless specifically specified at instance launch time. Please note, not all instance types are usable with Dedicated tenancy.
enableDnsHostnames?
Type:
boolean
(optional, default: true)
Indicates whether the instances launched in the VPC get DNS hostnames.
enableDnsSupport?
Type:
boolean
(optional, default: true)
Indicates whether the DNS resolution is supported for the VPC.
primaryAddressBlock?
Type:
IIp
(optional, default: Ipv4 CIDR Block ('10.0.0.0/16'))
A must IPv4 CIDR block for the VPC.
See also: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html
secondaryAddressBlocks?
Type:
IIp
[]
(optional, default: No secondary IP address)
The secondary CIDR blocks associated with the VPC.
Can be IPv4 or IPv6, two IPv4 ranges must follow RFC#1918 convention For more information,
See also: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html#vpc-resize}.
vpcName?
Type:
string
(optional, default: autogenerated by CDK)
Physical name for the VPC.