Interface NatGatewayOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
NatGatewayProps
All Known Implementing Classes:
NatGatewayOptions.Jsii$Proxy, NatGatewayProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:11.421Z") @Stability(Experimental) public interface NatGatewayOptions extends software.amazon.jsii.JsiiSerializable
(experimental) Options to define a NAT gateway.

Example:

 Stack stack = new Stack();
 VpcV2 myVpc = new VpcV2(this, "Vpc");
 RouteTable routeTable = RouteTable.Builder.create(this, "RouteTable")
         .vpc(myVpc)
         .build();
 SubnetV2 subnet = SubnetV2.Builder.create(this, "Subnet")
         .vpc(myVpc)
         .availabilityZone("eu-west-2a")
         .ipv4CidrBlock(new IpCidr("10.0.0.0/24"))
         .subnetType(SubnetType.PUBLIC)
         .build();
 myVpc.addInternetGateway();
 myVpc.addNatGateway(NatGatewayOptions.builder()
         .subnet(subnet)
         .connectivityType(NatConnectivityType.PUBLIC)
         .build());
 
  • Method Details

    • getSubnet

      @Stability(Experimental) @NotNull ISubnetV2 getSubnet()
      (experimental) The subnet in which the NAT gateway is located.
    • getAllocationId

      @Stability(Experimental) @Nullable default String getAllocationId()
      (experimental) AllocationID of 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.

      Default: - attr.allocationID of a new Elastic IP created by default //TODO: ADD L2 for elastic ip

    • getConnectivityType

      @Stability(Experimental) @Nullable default NatConnectivityType getConnectivityType()
      (experimental) Indicates whether the NAT gateway supports public or private connectivity.

      Default: NatConnectivityType.Public

    • getMaxDrainDuration

      @Stability(Experimental) @Nullable default Duration getMaxDrainDuration()
      (experimental) The maximum amount of time to wait before forcibly releasing the IP addresses if connections are still in progress.

      Default: 350seconds

    • getNatGatewayName

      @Stability(Experimental) @Nullable default String getNatGatewayName()
      (experimental) The resource name of the NAT gateway.

      Default: - NATGW provisioned without any name

    • getPrivateIpAddress

      @Stability(Experimental) @Nullable default String getPrivateIpAddress()
      (experimental) The private IPv4 address to assign to the NAT gateway.

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

    • getSecondaryAllocationIds

      @Stability(Experimental) @Nullable default List<String> getSecondaryAllocationIds()
      (experimental) Secondary EIP allocation IDs.

      Default: - no secondary allocation IDs attached to NATGW

      See Also:
    • getSecondaryPrivateIpAddressCount

      @Stability(Experimental) @Nullable default Number getSecondaryPrivateIpAddressCount()
      (experimental) The number of secondary private IPv4 addresses you want to assign to the NAT gateway.

      SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.

      Default: - no secondary allocation IDs associated with NATGW

      See Also:
    • getSecondaryPrivateIpAddresses

      @Stability(Experimental) @Nullable default List<String> getSecondaryPrivateIpAddresses()
      (experimental) Secondary private IPv4 addresses.

      SecondaryPrivateIpAddressCount and SecondaryPrivateIpAddresses cannot be set at the same time.

      Default: - no secondary private IpAddresses associated with NATGW

      See Also:
    • builder

      @Stability(Experimental) static NatGatewayOptions.Builder builder()
      Returns:
      a NatGatewayOptions.Builder of NatGatewayOptions