Class Instance

java.lang.Object
software.amazon.awssdk.services.opsworks.model.Instance
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Instance.Builder,Instance>

@Generated("software.amazon.awssdk:codegen") public final class Instance extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Instance.Builder,Instance>

Describes an instance.

See Also:
  • Method Details

    • agentVersion

      public final String agentVersion()

      The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.

      Returns:
      The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.
    • amiId

      public final String amiId()

      A custom AMI ID to be used to create the instance. For more information, see Instances

      Returns:
      A custom AMI ID to be used to create the instance. For more information, see Instances
    • architecture

      public final Architecture architecture()

      The instance architecture: "i386" or "x86_64".

      If the service returns an enum value that is not available in the current SDK version, architecture will return Architecture.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from architectureAsString().

      Returns:
      The instance architecture: "i386" or "x86_64".
      See Also:
    • architectureAsString

      public final String architectureAsString()

      The instance architecture: "i386" or "x86_64".

      If the service returns an enum value that is not available in the current SDK version, architecture will return Architecture.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from architectureAsString().

      Returns:
      The instance architecture: "i386" or "x86_64".
      See Also:
    • arn

      public final String arn()

      The instance's Amazon Resource Number (ARN).

      Returns:
      The instance's Amazon Resource Number (ARN).
    • autoScalingType

      public final AutoScalingType autoScalingType()

      For load-based or time-based instances, the type.

      If the service returns an enum value that is not available in the current SDK version, autoScalingType will return AutoScalingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from autoScalingTypeAsString().

      Returns:
      For load-based or time-based instances, the type.
      See Also:
    • autoScalingTypeAsString

      public final String autoScalingTypeAsString()

      For load-based or time-based instances, the type.

      If the service returns an enum value that is not available in the current SDK version, autoScalingType will return AutoScalingType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from autoScalingTypeAsString().

      Returns:
      For load-based or time-based instances, the type.
      See Also:
    • availabilityZone

      public final String availabilityZone()

      The instance Availability Zone. For more information, see Regions and Endpoints.

      Returns:
      The instance Availability Zone. For more information, see Regions and Endpoints.
    • hasBlockDeviceMappings

      public final boolean hasBlockDeviceMappings()
      For responses, this returns true if the service returned a value for the BlockDeviceMappings property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • blockDeviceMappings

      public final List<BlockDeviceMapping> blockDeviceMappings()

      An array of BlockDeviceMapping objects that specify the instance's block device mappings.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasBlockDeviceMappings() method.

      Returns:
      An array of BlockDeviceMapping objects that specify the instance's block device mappings.
    • createdAt

      public final String createdAt()

      The time that the instance was created.

      Returns:
      The time that the instance was created.
    • ebsOptimized

      public final Boolean ebsOptimized()

      Whether this is an Amazon EBS-optimized instance.

      Returns:
      Whether this is an Amazon EBS-optimized instance.
    • ec2InstanceId

      public final String ec2InstanceId()

      The ID of the associated Amazon EC2 instance.

      Returns:
      The ID of the associated Amazon EC2 instance.
    • ecsClusterArn

      public final String ecsClusterArn()

      For container instances, the Amazon ECS cluster's ARN.

      Returns:
      For container instances, the Amazon ECS cluster's ARN.
    • ecsContainerInstanceArn

      public final String ecsContainerInstanceArn()

      For container instances, the instance's ARN.

      Returns:
      For container instances, the instance's ARN.
    • elasticIp

      public final String elasticIp()

      The instance Elastic IP address.

      Returns:
      The instance Elastic IP address.
    • hostname

      public final String hostname()

      The instance host name. The following are character limits for instance host names.

      • Linux-based instances: 63 characters

      • Windows-based instances: 15 characters

      Returns:
      The instance host name. The following are character limits for instance host names.

      • Linux-based instances: 63 characters

      • Windows-based instances: 15 characters

    • infrastructureClass

      public final String infrastructureClass()

      For registered instances, the infrastructure class: ec2 or on-premises.

      Returns:
      For registered instances, the infrastructure class: ec2 or on-premises.
    • installUpdatesOnBoot

      public final Boolean installUpdatesOnBoot()

      Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

      We strongly recommend using the default value of true to ensure that your instances have the latest security updates.

      Returns:
      Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

      We strongly recommend using the default value of true to ensure that your instances have the latest security updates.

    • instanceId

      public final String instanceId()

      The instance ID.

      Returns:
      The instance ID.
    • instanceProfileArn

      public final String instanceProfileArn()

      The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

      Returns:
      The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.
    • instanceType

      public final String instanceType()

      The instance type, such as t2.micro.

      Returns:
      The instance type, such as t2.micro.
    • lastServiceErrorId

      public final String lastServiceErrorId()

      The ID of the last service error. For more information, call DescribeServiceErrors.

      Returns:
      The ID of the last service error. For more information, call DescribeServiceErrors.
    • hasLayerIds

      public final boolean hasLayerIds()
      For responses, this returns true if the service returned a value for the LayerIds property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • layerIds

      public final List<String> layerIds()

      An array containing the instance layer IDs.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasLayerIds() method.

      Returns:
      An array containing the instance layer IDs.
    • os

      public final String os()

      The instance's operating system.

      Returns:
      The instance's operating system.
    • platform

      public final String platform()

      The instance's platform.

      Returns:
      The instance's platform.
    • privateDns

      public final String privateDns()

      The instance's private DNS name.

      Returns:
      The instance's private DNS name.
    • privateIp

      public final String privateIp()

      The instance's private IP address.

      Returns:
      The instance's private IP address.
    • publicDns

      public final String publicDns()

      The instance public DNS name.

      Returns:
      The instance public DNS name.
    • publicIp

      public final String publicIp()

      The instance public IP address.

      Returns:
      The instance public IP address.
    • registeredBy

      public final String registeredBy()

      For registered instances, who performed the registration.

      Returns:
      For registered instances, who performed the registration.
    • reportedAgentVersion

      public final String reportedAgentVersion()

      The instance's reported OpsWorks Stacks agent version.

      Returns:
      The instance's reported OpsWorks Stacks agent version.
    • reportedOs

      public final ReportedOs reportedOs()

      For registered instances, the reported operating system.

      Returns:
      For registered instances, the reported operating system.
    • rootDeviceType

      public final RootDeviceType rootDeviceType()

      The instance's root device type. For more information, see Storage for the Root Device.

      If the service returns an enum value that is not available in the current SDK version, rootDeviceType will return RootDeviceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from rootDeviceTypeAsString().

      Returns:
      The instance's root device type. For more information, see Storage for the Root Device.
      See Also:
    • rootDeviceTypeAsString

      public final String rootDeviceTypeAsString()

      The instance's root device type. For more information, see Storage for the Root Device.

      If the service returns an enum value that is not available in the current SDK version, rootDeviceType will return RootDeviceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from rootDeviceTypeAsString().

      Returns:
      The instance's root device type. For more information, see Storage for the Root Device.
      See Also:
    • rootDeviceVolumeId

      public final String rootDeviceVolumeId()

      The root device volume ID.

      Returns:
      The root device volume ID.
    • hasSecurityGroupIds

      public final boolean hasSecurityGroupIds()
      For responses, this returns true if the service returned a value for the SecurityGroupIds property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • securityGroupIds

      public final List<String> securityGroupIds()

      An array containing the instance security group IDs.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasSecurityGroupIds() method.

      Returns:
      An array containing the instance security group IDs.
    • sshHostDsaKeyFingerprint

      public final String sshHostDsaKeyFingerprint()

      The SSH key's Deep Security Agent (DSA) fingerprint.

      Returns:
      The SSH key's Deep Security Agent (DSA) fingerprint.
    • sshHostRsaKeyFingerprint

      public final String sshHostRsaKeyFingerprint()

      The SSH key's RSA fingerprint.

      Returns:
      The SSH key's RSA fingerprint.
    • sshKeyName

      public final String sshKeyName()

      The instance's Amazon EC2 key-pair name.

      Returns:
      The instance's Amazon EC2 key-pair name.
    • stackId

      public final String stackId()

      The stack ID.

      Returns:
      The stack ID.
    • status

      public final String status()

      The instance status:

      • booting

      • connection_lost

      • online

      • pending

      • rebooting

      • requested

      • running_setup

      • setup_failed

      • shutting_down

      • start_failed

      • stop_failed

      • stopped

      • stopping

      • terminated

      • terminating

      Returns:
      The instance status:

      • booting

      • connection_lost

      • online

      • pending

      • rebooting

      • requested

      • running_setup

      • setup_failed

      • shutting_down

      • start_failed

      • stop_failed

      • stopped

      • stopping

      • terminated

      • terminating

    • subnetId

      public final String subnetId()

      The instance's subnet ID; applicable only if the stack is running in a VPC.

      Returns:
      The instance's subnet ID; applicable only if the stack is running in a VPC.
    • tenancy

      public final String tenancy()

      The instance's tenancy option, such as dedicated or host.

      Returns:
      The instance's tenancy option, such as dedicated or host.
    • virtualizationType

      public final VirtualizationType virtualizationType()

      The instance's virtualization type: paravirtual or hvm.

      If the service returns an enum value that is not available in the current SDK version, virtualizationType will return VirtualizationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from virtualizationTypeAsString().

      Returns:
      The instance's virtualization type: paravirtual or hvm.
      See Also:
    • virtualizationTypeAsString

      public final String virtualizationTypeAsString()

      The instance's virtualization type: paravirtual or hvm.

      If the service returns an enum value that is not available in the current SDK version, virtualizationType will return VirtualizationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from virtualizationTypeAsString().

      Returns:
      The instance's virtualization type: paravirtual or hvm.
      See Also:
    • toBuilder

      public Instance.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Instance.Builder,Instance>
      Returns:
      a builder for type T
    • builder

      public static Instance.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Instance.Builder> serializableBuilderClass()
    • hashCode

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.