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 StringThe agent version.final StringamiId()A custom AMI ID to be used to create the instance.final ArchitectureThe instance architecture: "i386" or "x86_64".final StringThe instance architecture: "i386" or "x86_64".final Stringarn()The instance's Amazon Resource Number (ARN).final AutoScalingTypeFor load-based or time-based instances, the type.final StringFor load-based or time-based instances, the type.final StringThe instance Availability Zone.final List<BlockDeviceMapping> An array ofBlockDeviceMappingobjects that specify the instance's block device mappings.static Instance.Builderbuilder()final StringThe time that the instance was created.final BooleanWhether this is an Amazon EBS-optimized instance.final StringThe ID of the associated Amazon EC2 instance.final StringFor container instances, the Amazon ECS cluster's ARN.final StringFor container instances, the instance's ARN.final StringThe instance Elastic IP address.final booleanfinal booleanequalsBySdkFields(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 booleanFor responses, this returns true if the service returned a value for the BlockDeviceMappings property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the LayerIds property.final booleanFor responses, this returns true if the service returned a value for the SecurityGroupIds property.final Stringhostname()The instance host name.final StringFor registered instances, the infrastructure class:ec2oron-premises.final BooleanWhether to install operating system and package updates when the instance boots.final StringThe instance ID.final StringThe ARN of the instance's IAM profile.final StringThe instance type, such ast2.micro.final StringThe ID of the last service error.layerIds()An array containing the instance layer IDs.final Stringos()The instance's operating system.final Stringplatform()The instance's platform.final StringThe instance's private DNS name.final StringThe instance's private IP address.final StringThe instance public DNS name.final StringpublicIp()The instance public IP address.final StringFor registered instances, who performed the registration.final StringThe instance's reported OpsWorks Stacks agent version.final ReportedOsFor registered instances, the reported operating system.final RootDeviceTypeThe instance's root device type.final StringThe instance's root device type.final StringThe root device volume ID.An array containing the instance security group IDs.static Class<? extends Instance.Builder> final StringThe SSH key's Deep Security Agent (DSA) fingerprint.final StringThe SSH key's RSA fingerprint.final StringThe instance's Amazon EC2 key-pair name.final StringstackId()The stack ID.final Stringstatus()The instance status:final StringsubnetId()The instance's subnet ID; applicable only if the stack is running in a VPC.final Stringtenancy()The instance's tenancy option, such asdedicatedorhost.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final VirtualizationTypeThe instance's virtualization type:paravirtualorhvm.final StringThe instance's virtualization type:paravirtualorhvm.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
agentVersion
The agent version. This parameter is set to
INHERITif 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
INHERITif the instance inherits the default stack setting or to a a version number for a fixed agent version.
-
amiId
-
architecture
The instance architecture: "i386" or "x86_64".
If the service returns an enum value that is not available in the current SDK version,
architecturewill 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,
architecturewill 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,
autoScalingTypewill 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,
autoScalingTypewill 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
BlockDeviceMappingobjects 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
BlockDeviceMappingobjects 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. 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
For registered instances, the infrastructure class:
ec2oron-premises.- Returns:
- For registered instances, the infrastructure class:
ec2oron-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 update instances manually by using CreateDeployment to run theupdate_dependenciesstack command or by manually runningyum(Amazon Linux) orapt-get(Ubuntu) on the instances.We strongly recommend using the default value of
trueto 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 update instances manually by using CreateDeployment to run theupdate_dependenciesstack command or by manually runningyum(Amazon Linux) orapt-get(Ubuntu) on the instances.We strongly recommend using the default value of
trueto ensure that your instances have the latest security updates.
-
instanceId
-
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
-
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 OpsWorks Stacks agent version.
- Returns:
- The instance's reported 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,
rootDeviceTypewill 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,
rootDeviceTypewill 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
-
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
dedicatedorhost.- Returns:
- The instance's tenancy option, such as
dedicatedorhost.
-
virtualizationType
The instance's virtualization type:
paravirtualorhvm.If the service returns an enum value that is not available in the current SDK version,
virtualizationTypewill returnVirtualizationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromvirtualizationTypeAsString().- Returns:
- The instance's virtualization type:
paravirtualorhvm. - See Also:
-
virtualizationTypeAsString
The instance's virtualization type:
paravirtualorhvm.If the service returns an enum value that is not available in the current SDK version,
virtualizationTypewill returnVirtualizationType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromvirtualizationTypeAsString().- Returns:
- The instance's virtualization type:
paravirtualorhvm. - See Also:
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Instance.Builder,Instance> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin 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
-
getValueForField
-
sdkFields
-