Interface NatGatewayProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,NatGatewayOptions
- All Known Implementing Classes:
NatGatewayProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-13T21:17:43.031Z")
@Stability(Experimental)
public interface NatGatewayProps
extends software.amazon.jsii.JsiiSerializable, NatGatewayOptions
(experimental) Properties to define a NAT gateway.
Example:
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.PRIVATE_ISOLATED) .build(); NatGateway natgw = NatGateway.Builder.create(this, "NatGW") .subnet(subnet) .vpc(myVpc) .connectivityType(NatConnectivityType.PRIVATE) .privateIpAddress("10.0.0.42") .build(); Route.Builder.create(this, "NatGwRoute") .routeTable(routeTable) .destination("0.0.0.0/0") .target(Map.of("gateway", natgw)) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forNatGatewayProps
static final class
An implementation forNatGatewayProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic NatGatewayProps.Builder
builder()
default IVpcV2
getVpc()
(experimental) The ID of the VPC in which the NAT gateway is located.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.ec2.alpha.NatGatewayOptions
getAllocationId, getConnectivityType, getMaxDrainDuration, getNatGatewayName, getPrivateIpAddress, getSecondaryAllocationIds, getSecondaryPrivateIpAddressCount, getSecondaryPrivateIpAddresses, getSubnet
-
Method Details
-
getVpc
(experimental) The ID of the VPC in which the NAT gateway is located.Default: - no elastic ip associated, required in case of public connectivity if `AllocationId` is not defined
-
builder
- Returns:
- a
NatGatewayProps.Builder
ofNatGatewayProps
-