Class RegionalNatGatewayProviderProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.RegionalNatGatewayProviderProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RegionalNatGatewayProviderProps>
- Enclosing interface:
RegionalNatGatewayProviderProps
@Stability(Stable)
public static final class RegionalNatGatewayProviderProps.Builder
extends Object
implements software.amazon.jsii.Builder<RegionalNatGatewayProviderProps>
A builder for
RegionalNatGatewayProviderProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocationId(String allocationId) Sets the value ofRegionalNatGatewayProviderProps.getAllocationId()availabilityZoneAddresses(List<? extends AvailabilityZoneAddress> availabilityZoneAddresses) Sets the value ofRegionalNatGatewayProviderProps.getAvailabilityZoneAddresses()build()Builds the configured instance.Sets the value ofRegionalNatGatewayProviderProps.getEip()maxDrainDuration(Duration maxDrainDuration) Sets the value ofRegionalNatGatewayProviderProps.getMaxDrainDuration()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allocationId
Sets the value ofRegionalNatGatewayProviderProps.getAllocationId()- Parameters:
allocationId- The allocation ID of the Elastic IP address to use for this NAT gateway. Cannot be specified together witheip. Ignored whenavailabilityZoneAddressesis specified.- Returns:
this
-
availabilityZoneAddresses
@Stability(Stable) public RegionalNatGatewayProviderProps.Builder availabilityZoneAddresses(List<? extends AvailabilityZoneAddress> availabilityZoneAddresses) Sets the value ofRegionalNatGatewayProviderProps.getAvailabilityZoneAddresses()- Parameters:
availabilityZoneAddresses- Specifies which Availability Zones you want the NAT gateway to support and the Elastic IP addresses to use in each AZ. When specified,allocationIdandeipare 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
availabilityZoneIdor unresolved tokens cannot be checked and are assumed to be correct.- Returns:
this
-
eip
Sets the value ofRegionalNatGatewayProviderProps.getEip()- Parameters:
eip- Reference to an existing EIP to use for this NAT gateway. Cannot be specified together withallocationId. Ignored whenavailabilityZoneAddressesis specified.- Returns:
this
-
maxDrainDuration
@Stability(Stable) public RegionalNatGatewayProviderProps.Builder maxDrainDuration(Duration maxDrainDuration) Sets the value ofRegionalNatGatewayProviderProps.getMaxDrainDuration()- Parameters:
maxDrainDuration- Maximum amount of time to wait before forcibly releasing IP addresses if connections are still in progress.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<RegionalNatGatewayProviderProps>- Returns:
- a new instance of
RegionalNatGatewayProviderProps - Throws:
NullPointerException- if any required attribute was not provided
-