@Stability(value=Experimental) public static final class NatInstanceProps.Builder extends Object implements software.amazon.jsii.Builder<NatInstanceProps>
NatInstanceProps| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
NatInstanceProps |
build()
Builds the configured instance.
|
NatInstanceProps.Builder |
defaultAllowedTraffic(NatTrafficDirection defaultAllowedTraffic)
Sets the value of
NatInstanceProps.getDefaultAllowedTraffic() |
NatInstanceProps.Builder |
instanceType(InstanceType instanceType)
Sets the value of
NatInstanceProps.getInstanceType() |
NatInstanceProps.Builder |
keyName(String keyName)
Sets the value of
NatInstanceProps.getKeyName() |
NatInstanceProps.Builder |
machineImage(IMachineImage machineImage)
Sets the value of
NatInstanceProps.getMachineImage() |
NatInstanceProps.Builder |
securityGroup(ISecurityGroup securityGroup)
Sets the value of
NatInstanceProps.getSecurityGroup() |
@Stability(value=Experimental) public NatInstanceProps.Builder instanceType(InstanceType instanceType)
NatInstanceProps.getInstanceType()instanceType - Instance type of the NAT instance. This parameter is required.this@Stability(value=Experimental) public NatInstanceProps.Builder defaultAllowedTraffic(NatTrafficDirection defaultAllowedTraffic)
NatInstanceProps.getDefaultAllowedTraffic()defaultAllowedTraffic - Direction to allow all traffic through the NAT instance by default.
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.
this@Stability(value=Experimental) public NatInstanceProps.Builder keyName(String keyName)
NatInstanceProps.getKeyName()keyName - Name of SSH keypair to grant access to instance.this@Stability(value=Experimental) public NatInstanceProps.Builder machineImage(IMachineImage machineImage)
NatInstanceProps.getMachineImage()machineImage - The machine image (AMI) to use.
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 without compilation. See https://github.com/aws/jsii/issues/826
ec2.NatProvider.instance(Map.of(
"instanceType", new InstanceType("t3.micro"),
"machineImage", GenericLinuxImage.Builder.create()
.us-east-2("ami-0f9c61b5a562a16af")
.build()));
this@Stability(value=Experimental) public NatInstanceProps.Builder securityGroup(ISecurityGroup securityGroup)
NatInstanceProps.getSecurityGroup()securityGroup - Security Group for NAT instances.this@Stability(value=Experimental) public NatInstanceProps build()
build in interface software.amazon.jsii.Builder<NatInstanceProps>NatInstancePropsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.