Class InstanceState
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.InstanceState
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<InstanceState.Builder,InstanceState>
@Generated("software.amazon.awssdk:codegen") public final class InstanceState extends Object implements SdkPojo, Serializable, ToCopyableBuilder<InstanceState.Builder,InstanceState>
Describes the current state of an instance.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceInstanceState.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InstanceState.Builderbuilder()Integercode()The state of the instance as a 16-bit unsigned integer.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()InstanceStateNamename()The current state of the instance.StringnameAsString()The current state of the instance.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends InstanceState.Builder>serializableBuilderClass()InstanceState.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
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
-
code
public final Integer code()
The state of the instance as a 16-bit unsigned integer.
The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.
The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.
The valid values for instance-state-code will all be in the range of the low byte and they are:
-
0:pending -
16:running -
32:shutting-down -
48:terminated -
64:stopping -
80:stopped
You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.
- Returns:
- The state of the instance as a 16-bit unsigned integer.
The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.
The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.
The valid values for instance-state-code will all be in the range of the low byte and they are:
-
0:pending -
16:running -
32:shutting-down -
48:terminated -
64:stopping -
80:stopped
You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.
-
-
-
name
public final InstanceStateName name()
The current state of the instance.
If the service returns an enum value that is not available in the current SDK version,
namewill returnInstanceStateName.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromnameAsString().- Returns:
- The current state of the instance.
- See Also:
InstanceStateName
-
nameAsString
public final String nameAsString()
The current state of the instance.
If the service returns an enum value that is not available in the current SDK version,
namewill returnInstanceStateName.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromnameAsString().- Returns:
- The current state of the instance.
- See Also:
InstanceStateName
-
toBuilder
public InstanceState.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<InstanceState.Builder,InstanceState>
-
builder
public static InstanceState.Builder builder()
-
serializableBuilderClass
public static Class<? extends InstanceState.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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-