Class VpcV2.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.alpha.VpcV2.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<VpcV2>
Enclosing class:
VpcV2

@Stability(Experimental) public static final class VpcV2.Builder extends Object implements software.amazon.jsii.Builder<VpcV2>
(experimental) A fluent builder for VpcV2.
  • Method Details

    • create

      @Stability(Experimental) public static VpcV2.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of VpcV2.Builder.
    • defaultInstanceTenancy

      @Stability(Experimental) public VpcV2.Builder defaultInstanceTenancy(DefaultInstanceTenancy defaultInstanceTenancy)
      (experimental) 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.

      Default: DefaultInstanceTenancy.Default (shared) tenancy

      Parameters:
      defaultInstanceTenancy - The default tenancy of instances launched into the VPC. This parameter is required.
      Returns:
      this
    • enableDnsHostnames

      @Stability(Experimental) public VpcV2.Builder enableDnsHostnames(Boolean enableDnsHostnames)
      (experimental) Indicates whether the instances launched in the VPC get DNS hostnames.

      Default: true

      Parameters:
      enableDnsHostnames - Indicates whether the instances launched in the VPC get DNS hostnames. This parameter is required.
      Returns:
      this
    • enableDnsSupport

      @Stability(Experimental) public VpcV2.Builder enableDnsSupport(Boolean enableDnsSupport)
      (experimental) Indicates whether the DNS resolution is supported for the VPC.

      Default: true

      Parameters:
      enableDnsSupport - Indicates whether the DNS resolution is supported for the VPC. This parameter is required.
      Returns:
      this
    • primaryAddressBlock

      @Stability(Experimental) public VpcV2.Builder primaryAddressBlock(IIpAddresses primaryAddressBlock)
      (experimental) A must IPv4 CIDR block for the VPC.

      Default: - Ipv4 CIDR Block ('10.0.0.0/16')

      Parameters:
      primaryAddressBlock - A must IPv4 CIDR block for the VPC. This parameter is required.
      Returns:
      this
      See Also:
    • secondaryAddressBlocks

      @Stability(Experimental) public VpcV2.Builder secondaryAddressBlocks(List<? extends IIpAddresses> secondaryAddressBlocks)
      (experimental) The secondary CIDR blocks associated with the VPC.

      Can be IPv4 or IPv6, two IPv4 ranges must follow RFC#1918 convention For more information,

      Default: - No secondary IP address

      Parameters:
      secondaryAddressBlocks - The secondary CIDR blocks associated with the VPC. This parameter is required.
      Returns:
      this
      See Also:
    • vpcName

      @Stability(Experimental) public VpcV2.Builder vpcName(String vpcName)
      (experimental) Physical name for the VPC.

      Default: - autogenerated by CDK

      Parameters:
      vpcName - Physical name for the VPC. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public VpcV2 build()
      Specified by:
      build in interface software.amazon.jsii.Builder<VpcV2>
      Returns:
      a newly built instance of VpcV2.