Class CfnNatGateway.Builder

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

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

    • create

      @Stability(Stable) public static CfnNatGateway.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnNatGateway.Builder.
    • subnetId

      @Stability(Stable) public CfnNatGateway.Builder subnetId(String subnetId)
      The ID of the subnet in which the NAT gateway is located.

      Parameters:
      subnetId - The ID of the subnet in which the NAT gateway is located. This parameter is required.
      Returns:
      this
    • allocationId

      @Stability(Stable) public CfnNatGateway.Builder allocationId(String allocationId)
      [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

      This property is required for a public NAT gateway and cannot be specified with a private NAT gateway.

      Parameters:
      allocationId - [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway. This parameter is required.
      Returns:
      this
    • connectivityType

      @Stability(Stable) public CfnNatGateway.Builder connectivityType(String connectivityType)
      Indicates whether the NAT gateway supports public or private connectivity.

      The default is public connectivity.

      Parameters:
      connectivityType - Indicates whether the NAT gateway supports public or private connectivity. This parameter is required.
      Returns:
      this
    • maxDrainDurationSeconds

      @Stability(Stable) public CfnNatGateway.Builder maxDrainDurationSeconds(Number maxDrainDurationSeconds)
      The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress.

      Default value is 350 seconds.

      Parameters:
      maxDrainDurationSeconds - The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress. This parameter is required.
      Returns:
      this
    • privateIpAddress

      @Stability(Stable) public CfnNatGateway.Builder privateIpAddress(String privateIpAddress)
      The private IPv4 address to assign to the NAT gateway.

      If you don't provide an address, a private IPv4 address will be automatically assigned.

      Parameters:
      privateIpAddress - The private IPv4 address to assign to the NAT gateway. This parameter is required.
      Returns:
      this
    • secondaryAllocationIds

      @Stability(Stable) public CfnNatGateway.Builder secondaryAllocationIds(List<String> secondaryAllocationIds)
      Secondary EIP allocation IDs.

      For more information, see Create a NAT gateway in the Amazon VPC User Guide .

      Parameters:
      secondaryAllocationIds - Secondary EIP allocation IDs. This parameter is required.
      Returns:
      this
    • secondaryPrivateIpAddressCount

      @Stability(Stable) public CfnNatGateway.Builder secondaryPrivateIpAddressCount(Number secondaryPrivateIpAddressCount)
      [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.

      For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .

      SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.

      Parameters:
      secondaryPrivateIpAddressCount - [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. This parameter is required.
      Returns:
      this
    • secondaryPrivateIpAddresses

      @Stability(Stable) public CfnNatGateway.Builder secondaryPrivateIpAddresses(List<String> secondaryPrivateIpAddresses)
      Secondary private IPv4 addresses.

      For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide .

      SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.

      Parameters:
      secondaryPrivateIpAddresses - Secondary private IPv4 addresses. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnNatGateway.Builder tags(List<? extends CfnTag> tags)
      The tags for the NAT gateway.

      Parameters:
      tags - The tags for the NAT gateway. This parameter is required.
      Returns:
      this
    • build

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