Class Instance
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Instance.Builder,
Instance>
Describes an instance.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal String
The agent version.final String
amiId()
A custom AMI ID to be used to create the instance.final Architecture
The instance architecture: "i386" or "x86_64".final String
The instance architecture: "i386" or "x86_64".final String
arn()
The instance's Amazon Resource Number (ARN).final AutoScalingType
For load-based or time-based instances, the type.final String
For load-based or time-based instances, the type.final String
The instance Availability Zone.final List
<BlockDeviceMapping> An array ofBlockDeviceMapping
objects that specify the instance's block device mappings.static Instance.Builder
builder()
final String
The time that the instance was created.final Boolean
Whether this is an Amazon EBS-optimized instance.final String
The ID of the associated Amazon EC2 instance.final String
For container instances, the Amazon ECS cluster's ARN.final String
For container instances, the instance's ARN.final String
The instance Elastic IP address .final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the BlockDeviceMappings property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the LayerIds property.final boolean
For responses, this returns true if the service returned a value for the SecurityGroupIds property.final String
hostname()
The instance host name.final String
For registered instances, the infrastructure class:ec2
oron-premises
.final Boolean
Whether to install operating system and package updates when the instance boots.final String
The instance ID.final String
The ARN of the instance's IAM profile.final String
The instance type, such ast2.micro
.final String
The ID of the last service error.layerIds()
An array containing the instance layer IDs.final String
os()
The instance's operating system.final String
platform()
The instance's platform.final String
The instance's private DNS name.final String
The instance's private IP address.final String
The instance public DNS name.final String
publicIp()
The instance public IP address.final String
For registered instances, who performed the registration.final String
The instance's reported AWS OpsWorks Stacks agent version.final ReportedOs
For registered instances, the reported operating system.final RootDeviceType
The instance's root device type.final String
The instance's root device type.final String
The root device volume ID.An array containing the instance security group IDs.static Class
<? extends Instance.Builder> final String
The SSH key's Deep Security Agent (DSA) fingerprint.final String
The SSH key's RSA fingerprint.final String
The instance's Amazon EC2 key-pair name.final String
stackId()
The stack ID.final String
status()
The instance status:final String
subnetId()
The instance's subnet ID; applicable only if the stack is running in a VPC.final String
tenancy()
The instance's tenancy option, such asdedicated
orhost
.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final VirtualizationType
The instance's virtualization type:paravirtual
orhvm
.final String
The instance's virtualization type:paravirtual
orhvm
.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
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
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 returnArchitecture.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromarchitectureAsString()
.- Returns:
- The instance architecture: "i386" or "x86_64".
- See Also:
-
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 returnArchitecture.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromarchitectureAsString()
.- Returns:
- The instance architecture: "i386" or "x86_64".
- See Also:
-
arn
The instance's Amazon Resource Number (ARN).
- Returns:
- The instance's Amazon Resource Number (ARN).
-
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 returnAutoScalingType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromautoScalingTypeAsString()
.- Returns:
- For load-based or time-based instances, the type.
- See Also:
-
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 returnAutoScalingType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromautoScalingTypeAsString()
.- Returns:
- For load-based or time-based instances, the type.
- See Also:
-
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 theisEmpty()
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
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
The time that the instance was created.
- Returns:
- The time that the instance was created.
-
ebsOptimized
Whether this is an Amazon EBS-optimized instance.
- Returns:
- Whether this is an Amazon EBS-optimized instance.
-
ec2InstanceId
The ID of the associated Amazon EC2 instance.
- Returns:
- The ID of the associated Amazon EC2 instance.
-
ecsClusterArn
For container instances, the Amazon ECS cluster's ARN.
- Returns:
- For container instances, the Amazon ECS cluster's ARN.
-
ecsContainerInstanceArn
For container instances, the instance's ARN.
- Returns:
- For container instances, the instance's ARN.
-
elasticIp
The instance Elastic IP address .
- Returns:
- The instance Elastic IP address .
-
hostname
The instance host name.
- Returns:
- The instance host name.
-
infrastructureClass
For registered instances, the infrastructure class:
ec2
oron-premises
.- Returns:
- For registered instances, the infrastructure class:
ec2
oron-premises
.
-
installUpdatesOnBoot
Whether to install operating system and package updates when the instance boots. The default value is
true
. If this value is set tofalse
, you must then update your instances manually by using CreateDeployment to run theupdate_dependencies
stack command or by manually runningyum
(Amazon Linux) orapt-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 tofalse
, you must then update your instances manually by using CreateDeployment to run theupdate_dependencies
stack command or by manually runningyum
(Amazon Linux) orapt-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
The instance ID.
- Returns:
- The instance ID.
-
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
The instance type, such as
t2.micro
.- Returns:
- The instance type, such as
t2.micro
.
-
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 theisEmpty()
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
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
The instance's operating system.
- Returns:
- The instance's operating system.
-
platform
The instance's platform.
- Returns:
- The instance's platform.
-
privateDns
The instance's private DNS name.
- Returns:
- The instance's private DNS name.
-
privateIp
The instance's private IP address.
- Returns:
- The instance's private IP address.
-
publicDns
The instance public DNS name.
- Returns:
- The instance public DNS name.
-
publicIp
The instance public IP address.
- Returns:
- The instance public IP address.
-
registeredBy
For registered instances, who performed the registration.
- Returns:
- For registered instances, who performed the registration.
-
reportedAgentVersion
The instance's reported AWS OpsWorks Stacks agent version.
- Returns:
- The instance's reported AWS OpsWorks Stacks agent version.
-
reportedOs
For registered instances, the reported operating system.
- Returns:
- For registered instances, the reported operating system.
-
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 returnRootDeviceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromrootDeviceTypeAsString()
.- Returns:
- The instance's root device type. For more information, see Storage for the Root Device.
- See Also:
-
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 returnRootDeviceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromrootDeviceTypeAsString()
.- Returns:
- The instance's root device type. For more information, see Storage for the Root Device.
- See Also:
-
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 theisEmpty()
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
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
The SSH key's Deep Security Agent (DSA) fingerprint.
- Returns:
- The SSH key's Deep Security Agent (DSA) fingerprint.
-
sshHostRsaKeyFingerprint
The SSH key's RSA fingerprint.
- Returns:
- The SSH key's RSA fingerprint.
-
sshKeyName
The instance's Amazon EC2 key-pair name.
- Returns:
- The instance's Amazon EC2 key-pair name.
-
stackId
The stack ID.
- Returns:
- The stack ID.
-
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
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
The instance's tenancy option, such as
dedicated
orhost
.- Returns:
- The instance's tenancy option, such as
dedicated
orhost
.
-
virtualizationType
The instance's virtualization type:
paravirtual
orhvm
.If the service returns an enum value that is not available in the current SDK version,
virtualizationType
will returnVirtualizationType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromvirtualizationTypeAsString()
.- Returns:
- The instance's virtualization type:
paravirtual
orhvm
. - See Also:
-
virtualizationTypeAsString
The instance's virtualization type:
paravirtual
orhvm
.If the service returns an enum value that is not available in the current SDK version,
virtualizationType
will returnVirtualizationType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromvirtualizationTypeAsString()
.- Returns:
- The instance's virtualization type:
paravirtual
orhvm
. - See Also:
-
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 interfaceToCopyableBuilder<Instance.Builder,
Instance> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
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 anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
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. -
getValueForField
-
sdkFields
-