@Generated(value="software.amazon.awssdk:codegen") public final class Instance extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Instance.Builder,Instance>
The description of an instance. Currently, Amazon EC2 instances are the only supported instance type.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Instance.Builder |
| Modifier and Type | Method and Description |
|---|---|
Integer |
amiLaunchIndex()
The Amazon Machine Image (AMI) launch index, which you can use to find this instance in the launch group.
|
List<InstanceBlockDeviceMapping> |
blockDeviceMappings()
Any block device mapping entries for the instance.
|
static Instance.Builder |
builder() |
CpuOptions |
cpuOptions()
The CPU options for the instance.
|
Instant |
createdAt()
When the instance was created.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasBlockDeviceMappings()
For responses, this returns true if the service returned a value for the BlockDeviceMappings property.
|
int |
hashCode() |
boolean |
hasSecurityGroups()
For responses, this returns true if the service returned a value for the SecurityGroups property.
|
String |
imageId()
The ID of the AMI used to launch the instance.
|
String |
instanceId()
The ID of the instance.
|
String |
instanceType()
The instance type.
|
String |
privateIpAddress()
The private IPv4 address assigned to the instance.
|
String |
publicIpAddress()
The public IPv4 address assigned to the instance.
|
String |
rootDeviceName()
The device name of the root device volume (for example,
/dev/sda1). |
List<SdkField<?>> |
sdkFields() |
List<SecurityGroupIdentifier> |
securityGroups()
The security groups for the instance.
|
static Class<? extends Instance.Builder> |
serializableBuilderClass() |
InstanceState |
state()
Returns the value of the State property for this object.
|
Instance.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
Instant |
updatedAt()
When the instance was last updated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final Integer amiLaunchIndex()
The Amazon Machine Image (AMI) launch index, which you can use to find this instance in the launch group.
public final boolean hasBlockDeviceMappings()
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.public final List<InstanceBlockDeviceMapping> blockDeviceMappings()
Any block device mapping entries for the instance.
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.
public final CpuOptions cpuOptions()
The CPU options for the instance.
public final Instant createdAt()
When the instance was created.
public final String imageId()
The ID of the AMI used to launch the instance.
public final String instanceId()
The ID of the instance.
public final String instanceType()
The instance type.
public final String privateIpAddress()
The private IPv4 address assigned to the instance.
public final String publicIpAddress()
The public IPv4 address assigned to the instance.
public final String rootDeviceName()
The device name of the root device volume (for example, /dev/sda1).
/dev/sda1).public final boolean hasSecurityGroups()
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.public final List<SecurityGroupIdentifier> securityGroups()
The security groups for the instance.
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 hasSecurityGroups() method.
public final InstanceState state()
public final Instant updatedAt()
When the instance was last updated.
public Instance.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<Instance.Builder,Instance>public static Instance.Builder builder()
public static Class<? extends Instance.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.