Class InstanceProps.Jsii$Proxy

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

@Stability(Stable) @Internal public static final class InstanceProps.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements InstanceProps
An implementation for InstanceProps
  • 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(InstanceProps.Builder builder)
      Constructor that initializes the object based on literal property values passed by the InstanceProps.Builder.
  • Method Details

    • getInstanceType

      public final InstanceType getInstanceType()
      Description copied from interface: InstanceProps
      Type of instance to launch.
      Specified by:
      getInstanceType in interface InstanceProps
    • getMachineImage

      public final IMachineImage getMachineImage()
      Description copied from interface: InstanceProps
      AMI to launch.
      Specified by:
      getMachineImage in interface InstanceProps
    • getVpc

      public final IVpc getVpc()
      Description copied from interface: InstanceProps
      VPC to launch the instance in.
      Specified by:
      getVpc in interface InstanceProps
    • getAllowAllOutbound

      public final Boolean getAllowAllOutbound()
      Description copied from interface: InstanceProps
      Whether the instance could initiate connections to anywhere by default.

      This property is only used when you do not provide a security group.

      Default: true

      Specified by:
      getAllowAllOutbound in interface InstanceProps
    • getAvailabilityZone

      public final String getAvailabilityZone()
      Description copied from interface: InstanceProps
      In which AZ to place the instance within the VPC.

      Default: - Random zone.

      Specified by:
      getAvailabilityZone in interface InstanceProps
    • getBlockDevices

      public final List<BlockDevice> getBlockDevices()
      Description copied from interface: InstanceProps
      Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.

      Each instance that is launched has an associated root device volume, either an Amazon EBS volume or an instance store volume. You can use block device mappings to specify additional EBS volumes or instance store volumes to attach to an instance when it is launched.

      Default: - Uses the block device mapping of the AMI

      Specified by:
      getBlockDevices in interface InstanceProps
      See Also:
    • getDetailedMonitoring

      public final Boolean getDetailedMonitoring()
      Description copied from interface: InstanceProps
      Whether "Detailed Monitoring" is enabled for this instance Keep in mind that Detailed Monitoring results in extra charges.

      Default: - false

      Specified by:
      getDetailedMonitoring in interface InstanceProps
      See Also:
    • getInit

      public final CloudFormationInit getInit()
      Description copied from interface: InstanceProps
      Apply the given CloudFormation Init configuration to the instance at startup.

      Default: - no CloudFormation init

      Specified by:
      getInit in interface InstanceProps
    • getInitOptions

      public final ApplyCloudFormationInitOptions getInitOptions()
      Description copied from interface: InstanceProps
      Use the given options for applying CloudFormation Init.

      Describes the configsets to use and the timeout to wait

      Default: - default options

      Specified by:
      getInitOptions in interface InstanceProps
    • getInstanceName

      public final String getInstanceName()
      Description copied from interface: InstanceProps
      The name of the instance.

      Default: - CDK generated name

      Specified by:
      getInstanceName in interface InstanceProps
    • getKeyName

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

      Default: - No SSH access will be possible.

      Specified by:
      getKeyName in interface InstanceProps
    • getPrivateIpAddress

      public final String getPrivateIpAddress()
      Description copied from interface: InstanceProps
      Defines a private IP address to associate with an instance.

      Private IP should be available within the VPC that the instance is build within.

      Default: - no association

      Specified by:
      getPrivateIpAddress in interface InstanceProps
    • getPropagateTagsToVolumeOnCreation

      public final Boolean getPropagateTagsToVolumeOnCreation()
      Description copied from interface: InstanceProps
      Propagate the EC2 instance tags to the EBS volumes.

      Default: - false

      Specified by:
      getPropagateTagsToVolumeOnCreation in interface InstanceProps
    • getRequireImdsv2

      public final Boolean getRequireImdsv2()
      Description copied from interface: InstanceProps
      Whether IMDSv2 should be required on this instance.

      Default: - false

      Specified by:
      getRequireImdsv2 in interface InstanceProps
    • getResourceSignalTimeout

      public final Duration getResourceSignalTimeout()
      Description copied from interface: InstanceProps
      The length of time to wait for the resourceSignalCount.

      The maximum value is 43200 (12 hours).

      Default: Duration.minutes(5)

      Specified by:
      getResourceSignalTimeout in interface InstanceProps
    • getRole

      public final IRole getRole()
      Description copied from interface: InstanceProps
      An IAM role to associate with the instance profile assigned to this Auto Scaling Group.

      The role must be assumable by the service principal ec2.amazonaws.com:

      Default: - A role will automatically be created, it can be accessed via the `role` property

      Example:

       Role role = Role.Builder.create(this, "MyRole")
               .assumedBy(new ServicePrincipal("ec2.amazonaws.com"))
               .build();
       
      Specified by:
      getRole in interface InstanceProps
    • getSecurityGroup

      public final ISecurityGroup getSecurityGroup()
      Description copied from interface: InstanceProps
      Security Group to assign to this instance.

      Default: - create new security group

      Specified by:
      getSecurityGroup in interface InstanceProps
    • getSourceDestCheck

      public final Boolean getSourceDestCheck()
      Description copied from interface: InstanceProps
      Specifies whether to enable an instance launched in a VPC to perform NAT.

      This controls whether source/destination checking is enabled on the instance. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the instance to perform NAT.

      Default: true

      Specified by:
      getSourceDestCheck in interface InstanceProps
    • getUserData

      public final UserData getUserData()
      Description copied from interface: InstanceProps
      Specific UserData to use.

      The UserData may still be mutated after creation.

      Default: - A UserData object appropriate for the MachineImage's Operating System is created.

      Specified by:
      getUserData in interface InstanceProps
    • getUserDataCausesReplacement

      public final Boolean getUserDataCausesReplacement()
      Description copied from interface: InstanceProps
      Changes to the UserData force replacement.

      Depending the EC2 instance type, changing UserData either restarts the instance or replaces the instance.

      • Instance store-backed instances are replaced.
      • EBS-backed instances are restarted.

      By default, restarting does not execute the new UserData so you will need a different mechanism to ensure the instance is restarted.

      Setting this to true will make the instance's Logical ID depend on the UserData, which will cause CloudFormation to replace it if the UserData changes.

      Default: - true iff `initOptions` is specified, false otherwise.

      Specified by:
      getUserDataCausesReplacement in interface InstanceProps
    • getVpcSubnets

      public final SubnetSelection getVpcSubnets()
      Description copied from interface: InstanceProps
      Where to place the instance within the VPC.

      Default: - Private subnets.

      Specified by:
      getVpcSubnets in interface InstanceProps
    • $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