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:
  • 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

      @Stability(Stable) public void configureNat(@NotNull ConfigureNatOptions options)
      Called by the VPC to configure NAT.

      Don't call this directly, the VPC will call it automatically.

      Specified by:
      configureNat in class NatProvider
      Parameters:
      options - This parameter is required.
    • configureSubnet

      @Stability(Stable) public void configureSubnet(@NotNull PrivateSubnet subnet)
      Configures subnet with the gateway.

      Don't call this directly, the VPC will call it automatically.

      Specified by:
      configureSubnet in class NatProvider
      Parameters:
      subnet - This parameter is required.
    • getConfiguredGateways

      @Stability(Stable) @NotNull public List<GatewayConfig> getConfiguredGateways()
      Return list of gateways spawned by the provider.

      A regional NAT gateway is not bound to a single Availability Zone, so az is the sentinel string 'regional' rather than a zone name.

      Specified by:
      getConfiguredGateways in class NatProvider