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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceInstance.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringagentVersion()The agent version.StringamiId()A custom AMI ID to be used to create the instance.Architecturearchitecture()The instance architecture: "i386" or "x86_64".StringarchitectureAsString()The instance architecture: "i386" or "x86_64".Stringarn()The instance's Amazon Resource Number (ARN).AutoScalingTypeautoScalingType()For load-based or time-based instances, the type.StringautoScalingTypeAsString()For load-based or time-based instances, the type.StringavailabilityZone()The instance Availability Zone.List<BlockDeviceMapping>blockDeviceMappings()An array ofBlockDeviceMappingobjects that specify the instance's block device mappings.static Instance.Builderbuilder()StringcreatedAt()The time that the instance was created.BooleanebsOptimized()Whether this is an Amazon EBS-optimized instance.Stringec2InstanceId()The ID of the associated Amazon EC2 instance.StringecsClusterArn()For container instances, the Amazon ECS cluster's ARN.StringecsContainerInstanceArn()For container instances, the instance's ARN.StringelasticIp()The instance Elastic IP address .booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasBlockDeviceMappings()For responses, this returns true if the service returned a value for the BlockDeviceMappings property.inthashCode()booleanhasLayerIds()For responses, this returns true if the service returned a value for the LayerIds property.booleanhasSecurityGroupIds()For responses, this returns true if the service returned a value for the SecurityGroupIds property.Stringhostname()The instance host name.StringinfrastructureClass()For registered instances, the infrastructure class:ec2oron-premises.BooleaninstallUpdatesOnBoot()Whether to install operating system and package updates when the instance boots.StringinstanceId()The instance ID.StringinstanceProfileArn()The ARN of the instance's IAM profile.StringinstanceType()The instance type, such ast2.micro.StringlastServiceErrorId()The ID of the last service error.List<String>layerIds()An array containing the instance layer IDs.Stringos()The instance's operating system.Stringplatform()The instance's platform.StringprivateDns()The instance's private DNS name.StringprivateIp()The instance's private IP address.StringpublicDns()The instance public DNS name.StringpublicIp()The instance public IP address.StringregisteredBy()For registered instances, who performed the registration.StringreportedAgentVersion()The instance's reported AWS OpsWorks Stacks agent version.ReportedOsreportedOs()For registered instances, the reported operating system.RootDeviceTyperootDeviceType()The instance's root device type.StringrootDeviceTypeAsString()The instance's root device type.StringrootDeviceVolumeId()The root device volume ID.List<SdkField<?>>sdkFields()List<String>securityGroupIds()An array containing the instance security group IDs.static Class<? extends Instance.Builder>serializableBuilderClass()StringsshHostDsaKeyFingerprint()The SSH key's Deep Security Agent (DSA) fingerprint.StringsshHostRsaKeyFingerprint()The SSH key's RSA fingerprint.StringsshKeyName()The instance's Amazon EC2 key-pair name.StringstackId()The stack ID.Stringstatus()The instance status:StringsubnetId()The instance's subnet ID; applicable only if the stack is running in a VPC.Stringtenancy()The instance's tenancy option, such asdedicatedorhost.Instance.BuildertoBuilder()StringtoString()Returns a string representation of this object.VirtualizationTypevirtualizationType()The instance's virtualization type:paravirtualorhvm.StringvirtualizationTypeAsString()The instance's virtualization type:paravirtualorhvm.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
agentVersion
public final String 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
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,
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:
Architecture
-
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,
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:
Architecture
-
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,
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:
AutoScalingType
-
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,
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:
AutoScalingType
-
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 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
public final List<BlockDeviceMapping> 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
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.
- Returns:
- The instance host name.
-
infrastructureClass
public final String infrastructureClass()
For registered instances, the infrastructure class:
ec2oron-premises.- Returns:
- For registered instances, the infrastructure class:
ec2oron-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 tofalse, you must then update your 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
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_dependenciesstack 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
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 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
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.
-
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,
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:
RootDeviceType
-
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,
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:
RootDeviceType
-
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 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
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
dedicatedorhost.- Returns:
- The instance's tenancy option, such as
dedicatedorhost.
-
virtualizationType
public final VirtualizationType 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:
VirtualizationType
-
virtualizationTypeAsString
public final String 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:
VirtualizationType
-
toBuilder
public Instance.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Instance.Builder,Instance>
-
builder
public static Instance.Builder builder()
-
serializableBuilderClass
public static Class<? extends Instance.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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.
-
-