@Stability(value=Stable) public static final class NatInstanceProvider.Builder extends Object implements software.amazon.jsii.Builder<NatInstanceProvider>
NatInstanceProvider.| Modifier and Type | Method and Description |
|---|---|
NatInstanceProvider |
build() |
static NatInstanceProvider.Builder |
create() |
NatInstanceProvider.Builder |
defaultAllowedTraffic(NatTrafficDirection defaultAllowedTraffic)
Direction to allow all traffic through the NAT instance by default.
|
NatInstanceProvider.Builder |
instanceType(InstanceType instanceType)
Instance type of the NAT instance.
|
NatInstanceProvider.Builder |
keyName(String keyName)
Name of SSH keypair to grant access to instance.
|
NatInstanceProvider.Builder |
machineImage(IMachineImage machineImage)
The machine image (AMI) to use.
|
NatInstanceProvider.Builder |
securityGroup(ISecurityGroup securityGroup)
Security Group for NAT instances.
|
@Stability(value=Stable) public static NatInstanceProvider.Builder create()
NatInstanceProvider.Builder.@Stability(value=Stable) public NatInstanceProvider.Builder instanceType(InstanceType instanceType)
instanceType - Instance type of the NAT instance. This parameter is required.this@Stability(value=Stable) public NatInstanceProvider.Builder defaultAllowedTraffic(NatTrafficDirection defaultAllowedTraffic)
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
defaultAllowedTraffic - Direction to allow all traffic through the NAT instance by default. This parameter is required.this@Stability(value=Stable) public NatInstanceProvider.Builder keyName(String keyName)
Default: - No SSH access will be possible.
keyName - Name of SSH keypair to grant access to instance. This parameter is required.this@Stability(value=Stable) public NatInstanceProvider.Builder machineImage(IMachineImage machineImage)
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
machineImage - The machine image (AMI) to use. This parameter is required.this@Stability(value=Stable) public NatInstanceProvider.Builder securityGroup(ISecurityGroup securityGroup)
Default: - A new security group will be created
securityGroup - Security Group for NAT instances. This parameter is required.this@Stability(value=Stable) public NatInstanceProvider build()
build in interface software.amazon.jsii.Builder<NatInstanceProvider>Copyright © 2022. All rights reserved.