@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-22T10:27:17.117Z") @Stability(value=Stable) public interface NatInstanceProps extends software.amazon.jsii.JsiiSerializable
Example:
// Example automatically generated from non-compiling source. May contain errors.
InstanceType instanceType;
NatInstanceProvider provider = NatProvider.instance(NatInstanceProps.builder()
.instanceType(instanceType)
.allowAllTraffic(false)
.build());
Vpc.Builder.create(this, "TheVPC")
.natGatewayProvider(provider)
.build();
provider.connections.allowFrom(Peer.ipv4("1.2.3.4/8"), Port.tcp(80));
| 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) @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) @NotNull InstanceType getInstanceType()
@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 © 2021. All rights reserved.