Class RegionalNatGatewayProvider.Builder

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

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

    • create

      @Stability(Stable) public static RegionalNatGatewayProvider.Builder create()
      Returns:
      a new instance of RegionalNatGatewayProvider.Builder.
    • allocationId

      @Stability(Stable) public RegionalNatGatewayProvider.Builder allocationId(String allocationId)
      The allocation ID of the Elastic IP address to use for this NAT gateway.

      Cannot be specified together with eip. Ignored when availabilityZoneAddresses is specified.

      Default: - A new EIP is automatically allocated

      Parameters:
      allocationId - The allocation ID of the Elastic IP address to use for this NAT gateway. This parameter is required.
      Returns:
      this
    • availabilityZoneAddresses

      @Stability(Stable) public RegionalNatGatewayProvider.Builder availabilityZoneAddresses(List<? extends AvailabilityZoneAddress> availabilityZoneAddresses)
      Specifies which Availability Zones you want the NAT gateway to support and the Elastic IP addresses to use in each AZ.

      When specified, allocationId and eip are ignored. This enables manual mode for Regional NAT Gateway where you control EIP allocation per AZ.

      In manual mode the gateway only serves the listed Availability Zones and does not expand to other zones automatically, so every Availability Zone that contains a private subnet routed through this gateway must be listed. When the zone names are known at synthesis time, a private subnet in an unlisted zone is rejected with an error. Entries that use availabilityZoneId or unresolved tokens cannot be checked and are assumed to be correct.

      Default: - Automatic mode: AWS manages AZ coverage and EIP allocation

      Parameters:
      availabilityZoneAddresses - Specifies which Availability Zones you want the NAT gateway to support and the Elastic IP addresses to use in each AZ. This parameter is required.
      Returns:
      this
    • eip

      @Stability(Stable) public RegionalNatGatewayProvider.Builder eip(IEIPRef eip)
      Reference to an existing EIP to use for this NAT gateway.

      Cannot be specified together with allocationId. Ignored when availabilityZoneAddresses is specified.

      Default: - A new EIP is automatically allocated

      Parameters:
      eip - Reference to an existing EIP to use for this NAT gateway. This parameter is required.
      Returns:
      this
    • maxDrainDuration

      @Stability(Stable) public RegionalNatGatewayProvider.Builder maxDrainDuration(Duration maxDrainDuration)
      Maximum amount of time to wait before forcibly releasing IP addresses if connections are still in progress.

      Default: Duration.seconds(350)

      Parameters:
      maxDrainDuration - Maximum amount of time to wait before forcibly releasing IP addresses if connections are still in progress. This parameter is required.
      Returns:
      this
    • build

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