Class Instance

    • Method Detail

      • 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
      • arn

        public final String arn()

        The instance's Amazon Resource Number (ARN).

        Returns:
        The instance's Amazon Resource Number (ARN).
      • 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.
      • hostname

        public final String hostname()

        The instance host name.

        Returns:
        The instance host name.
      • 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 then update your 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 then update your 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 AWS OpsWorks Stacks agent version.

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

        public final ReportedOs reportedOs()

        For registered instances, the reported operating system.

        Returns:
        For registered instances, the reported operating system.
      • 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.
      • hashCode

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

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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)