@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:47.031Z") @Stability(value=Experimental) public interface NatInstanceProps extends software.amazon.jsii.JsiiSerializable
Example:
// Configure the `natGatewayProvider` when defining a Vpc
NatInstanceProvider natGatewayProvider = NatProvider.instance(NatInstanceProps.builder()
.instanceType(new InstanceType("t3.small"))
.build());
Vpc vpc = Vpc.Builder.create(this, "MyVpc")
.natGatewayProvider(natGatewayProvider)
// The 'natGateways' parameter now controls the number of NAT instances
.natGateways(2)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
NatInstanceProps.Builder
A builder for
NatInstanceProps |
static class |
NatInstanceProps.Jsii$Proxy
An implementation for
NatInstanceProps |
| Modifier and Type | Method and Description |
|---|---|
static NatInstanceProps.Builder |
builder() |
default Boolean |
getAllowAllTraffic()
Deprecated.
- Use `defaultAllowedTraffic`.
|
default NatTrafficDirection |
getDefaultAllowedTraffic()
(experimental) Direction to allow all traffic through the NAT instance by default.
|
InstanceType |
getInstanceType()
(experimental) Instance type of the NAT instance.
|
default String |
getKeyName()
(experimental) Name of SSH keypair to grant access to instance.
|
default IMachineImage |
getMachineImage()
(experimental) The machine image (AMI) to use.
|
default ISecurityGroup |
getSecurityGroup()
(experimental) Security Group for NAT instances.
|
@Stability(value=Experimental) @NotNull InstanceType getInstanceType()
@Stability(value=Deprecated) @Deprecated @Nullable default Boolean getAllowAllTraffic()
If you set this to false, you must configure the NAT instance's security
groups in another way, either by passing in a fully configured Security
Group using the securityGroup property, or by configuring it using the
.securityGroup or .connections members after passing the NAT Instance
Provider to a Vpc.
Default: true
@Stability(value=Experimental) @Nullable default NatTrafficDirection getDefaultAllowedTraffic()
By default, inbound and outbound traffic is allowed.
If you set this to another value than INBOUND_AND_OUTBOUND, you must
configure the NAT instance's security groups in another way, either by
passing in a fully configured Security Group using the securityGroup
property, or by configuring it using the .securityGroup or
.connections members after passing the NAT Instance Provider to a Vpc.
Default: NatTrafficDirection.INBOUND_AND_OUTBOUND
@Stability(value=Experimental) @Nullable default String getKeyName()
Default: - No SSH access will be possible.
@Stability(value=Experimental) @Nullable default IMachineImage getMachineImage()
By default, will do an AMI lookup for the latest NAT instance image.
If you have a specific AMI ID you want to use, pass a GenericLinuxImage. For example:
NatProvider.instance(NatInstanceProps.builder()
.instanceType(new InstanceType("t3.micro"))
.machineImage(new GenericLinuxImage(Map.of(
"us-east-2", "ami-0f9c61b5a562a16af")))
.build());
Default: - Latest NAT instance image
@Stability(value=Experimental) @Nullable default ISecurityGroup getSecurityGroup()
Default: - A new security group will be created
@Stability(value=Experimental) static NatInstanceProps.Builder builder()
NatInstanceProps.Builder of NatInstancePropsCopyright © 2022. All rights reserved.