Class NatInstanceProps.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.NatInstanceProps.Jsii$Proxy
All Implemented Interfaces:
NatInstanceProps, software.amazon.jsii.JsiiSerializable
Enclosing interface:
NatInstanceProps

@Stability(Stable) @Internal public static final class NatInstanceProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NatInstanceProps
An implementation for NatInstanceProps
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
      Constructor that initializes the object based on values retrieved from the JsiiObject.
      Parameters:
      objRef - Reference to the JSII managed object.
    • Jsii$Proxy

      protected Jsii$Proxy(NatInstanceProps.Builder builder)
      Constructor that initializes the object based on literal property values passed by the NatInstanceProps.Builder.
  • Method Details

    • getInstanceType

      public final InstanceType getInstanceType()
      Description copied from interface: NatInstanceProps
      Instance type of the NAT instance.
      Specified by:
      getInstanceType in interface NatInstanceProps
    • getDefaultAllowedTraffic

      public final NatTrafficDirection getDefaultAllowedTraffic()
      Description copied from interface: NatInstanceProps
      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.

      Default: NatTrafficDirection.INBOUND_AND_OUTBOUND

      Specified by:
      getDefaultAllowedTraffic in interface NatInstanceProps
    • getKeyName

      public final String getKeyName()
      Description copied from interface: NatInstanceProps
      Name of SSH keypair to grant access to instance.

      Default: - No SSH access will be possible.

      Specified by:
      getKeyName in interface NatInstanceProps
    • getMachineImage

      public final IMachineImage getMachineImage()
      Description copied from interface: NatInstanceProps
      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:

       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

      Specified by:
      getMachineImage in interface NatInstanceProps
    • getSecurityGroup

      public final ISecurityGroup getSecurityGroup()
      Description copied from interface: NatInstanceProps
      Security Group for NAT instances.

      Default: - A new security group will be created

      Specified by:
      getSecurityGroup in interface NatInstanceProps
    • $jsii$toJson

      @Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
      Specified by:
      $jsii$toJson in interface software.amazon.jsii.JsiiSerializable
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object