Class RegionalNatGatewayProvider
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.NatProvider
software.amazon.awscdk.services.ec2.RegionalNatGatewayProvider
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)",
date="2026-09-30T11:04:50.584Z")
@Stability(Stable)
public class RegionalNatGatewayProvider
extends NatProvider
Provider for Regional NAT Gateways.
Regional NAT Gateways provide automatic multi-AZ redundancy with a single gateway that scales across availability zones. Unlike zonal NAT gateways, a regional NAT gateway does not require a public subnet and is created at the VPC level.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.interfaces.ec2.*;
IEIPRef eIPRef;
RegionalNatGatewayProvider regionalNatGatewayProvider = RegionalNatGatewayProvider.Builder.create()
.allocationId("allocationId")
.availabilityZoneAddresses(List.of(AvailabilityZoneAddress.builder()
.allocationIds(List.of("allocationIds"))
// the properties below are optional
.availabilityZone("availabilityZone")
.availabilityZoneId("availabilityZoneId")
.build()))
.eip(eIPRef)
.maxDrainDuration(Duration.minutes(30))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forRegionalNatGatewayProvider.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRegionalNatGatewayProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedRegionalNatGatewayProvider(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureNat(ConfigureNatOptions options) Called by the VPC to configure NAT.voidconfigureSubnet(PrivateSubnet subnet) Configures subnet with the gateway.Return list of gateways spawned by the provider.Methods inherited from class software.amazon.awscdk.services.ec2.NatProvider
gateway, gateway, instance, instanceV2, regionalGateway, regionalGatewayMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
RegionalNatGatewayProvider
protected RegionalNatGatewayProvider(software.amazon.jsii.JsiiObjectRef objRef) -
RegionalNatGatewayProvider
protected RegionalNatGatewayProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
RegionalNatGatewayProvider
@Stability(Stable) public RegionalNatGatewayProvider(@Nullable RegionalNatGatewayProviderProps props) - Parameters:
props-
-
RegionalNatGatewayProvider
@Stability(Stable) public RegionalNatGatewayProvider()
-
-
Method Details
-
configureNat
Called by the VPC to configure NAT.Don't call this directly, the VPC will call it automatically.
- Specified by:
configureNatin classNatProvider- Parameters:
options- This parameter is required.
-
configureSubnet
Configures subnet with the gateway.Don't call this directly, the VPC will call it automatically.
- Specified by:
configureSubnetin classNatProvider- Parameters:
subnet- This parameter is required.
-
getConfiguredGateways
Return list of gateways spawned by the provider.A regional NAT gateway is not bound to a single Availability Zone, so
azis the sentinel string'regional'rather than a zone name.- Specified by:
getConfiguredGatewaysin classNatProvider
-