Class CfnNatGatewayPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
You can create either a public NAT gateway or a private NAT gateway. The default is a public NAT gateway. If you create a public NAT gateway, you must specify an elastic IP address.
With a NAT gateway, instances in a private subnet can connect to the internet, other AWS services, or an on-premises network using the IP address of the NAT gateway. For more information, see NAT gateways in the Amazon VPC User Guide .
If you add a default route ( AWS::EC2::Route resource) that points to a NAT gateway, specify the NAT gateway ID for the route's NatGatewayId property.
When you associate an Elastic IP address or secondary Elastic IP address with a public NAT gateway, the network border group of the Elastic IP address must match the network border group of the Availability Zone (AZ) that the public NAT gateway is in. Otherwise, the NAT gateway fails to launch. You can see the network border group for the AZ by viewing the details of the subnet. Similarly, you can view the network border group for the Elastic IP address by viewing its details. For more information, see Allocate an Elastic IP address in the Amazon VPC User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.ec2.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnNatGatewayPropsMixin cfnNatGatewayPropsMixin = CfnNatGatewayPropsMixin.Builder.create(CfnNatGatewayMixinProps.builder()
.allocationId("allocationId")
.availabilityMode("availabilityMode")
.availabilityZoneAddresses(List.of(AvailabilityZoneAddressProperty.builder()
.allocationIds(List.of("allocationIds"))
.availabilityZone("availabilityZone")
.availabilityZoneId("availabilityZoneId")
.build()))
.connectivityType("connectivityType")
.maxDrainDurationSeconds(123)
.privateIpAddress("privateIpAddress")
.secondaryAllocationIds(List.of("secondaryAllocationIds"))
.secondaryPrivateIpAddressCount(123)
.secondaryPrivateIpAddresses(List.of("secondaryPrivateIpAddresses"))
.subnetId("subnetId")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcId("vpcId")
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFor regional NAT gateways only: The configuration specifying which Elastic IP address (EIP) to use for handling outbound NAT traffic from a specific Availability Zone.static final classA fluent builder forCfnNatGatewayPropsMixin.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::EC2::NatGateway.CfnNatGatewayPropsMixin(CfnNatGatewayMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::EC2::NatGateway.protectedCfnNatGatewayPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnNatGatewayPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnNatGatewayMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods 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
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnNatGatewayPropsMixin
protected CfnNatGatewayPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnNatGatewayPropsMixin
protected CfnNatGatewayPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnNatGatewayPropsMixin
@Stability(Stable) public CfnNatGatewayPropsMixin(@NotNull CfnNatGatewayMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::EC2::NatGateway.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnNatGatewayPropsMixin
Create a mixin to apply properties toAWS::EC2::NatGateway.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-