@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.486Z") @Stability(value=Stable) 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 NatTrafficDirection |
getDefaultAllowedTraffic()
Direction to allow all traffic through the NAT instance by default.
|
InstanceType |
getInstanceType()
Instance type of the NAT instance.
|
default String |
getKeyName()
Name of SSH keypair to grant access to instance.
|
default IMachineImage |
getMachineImage()
The machine image (AMI) to use.
|
default ISecurityGroup |
getSecurityGroup()
Security Group for NAT instances.
|
@Stability(value=Stable) @NotNull InstanceType getInstanceType()
@Stability(value=Stable) @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=Stable) @Nullable default String getKeyName()
Default: - No SSH access will be possible.
@Stability(value=Stable) @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:
// Example automatically generated from non-compiling source. May contain errors.
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=Stable) @Nullable default ISecurityGroup getSecurityGroup()
Default: - A new security group will be created
@Stability(value=Stable) static NatInstanceProps.Builder builder()
NatInstanceProps.Builder of NatInstancePropsCopyright © 2022. All rights reserved.