Class SpotInstanceRequest
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SpotInstanceRequest.Builder,SpotInstanceRequest>
Describes a Spot Instance request.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal StringDeprecated.final StringThe Availability Zone group.final IntegerDeprecated.static SpotInstanceRequest.Builderbuilder()final InstantThe date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final SpotInstanceStateFaultfault()The fault codes for the Spot Instance request, if any.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final StringThe instance ID, if an instance has been launched to fulfill the Spot Instance request.The behavior when a Spot Instance is interrupted.final StringThe behavior when a Spot Instance is interrupted.final StringThe Availability Zone in which the request is launched.final StringThe instance launch group.final LaunchSpecificationAdditional information for launching instances.final RIProductDescriptionThe product description associated with the Spot Instance.final StringThe product description associated with the Spot Instance.static Class<? extends SpotInstanceRequest.Builder> final StringThe ID of the Spot Instance request.final StringThe maximum price per unit hour that you are willing to pay for a Spot Instance.final SpotInstanceStatestate()The state of the Spot Instance request.final StringThe state of the Spot Instance request.final SpotInstanceStatusstatus()The status code and status message describing the Spot Instance request.tags()Any tags assigned to the resource.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 SpotInstanceTypetype()The Spot Instance request type.final StringThe Spot Instance request type.final InstantThe start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).final InstantThe end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
actualBlockHourlyPrice
-
availabilityZoneGroup
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
- Returns:
- The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
-
blockDurationMinutes
-
createTime
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- Returns:
- The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
-
fault
The fault codes for the Spot Instance request, if any.
- Returns:
- The fault codes for the Spot Instance request, if any.
-
instanceId
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
- Returns:
- The instance ID, if an instance has been launched to fulfill the Spot Instance request.
-
launchGroup
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
- Returns:
- The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
-
launchSpecification
Additional information for launching instances.
- Returns:
- Additional information for launching instances.
-
launchedAvailabilityZone
The Availability Zone in which the request is launched.
- Returns:
- The Availability Zone in which the request is launched.
-
productDescription
The product description associated with the Spot Instance.
If the service returns an enum value that is not available in the current SDK version,
productDescriptionwill returnRIProductDescription.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromproductDescriptionAsString().- Returns:
- The product description associated with the Spot Instance.
- See Also:
-
productDescriptionAsString
The product description associated with the Spot Instance.
If the service returns an enum value that is not available in the current SDK version,
productDescriptionwill returnRIProductDescription.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromproductDescriptionAsString().- Returns:
- The product description associated with the Spot Instance.
- See Also:
-
spotInstanceRequestId
The ID of the Spot Instance request.
- Returns:
- The ID of the Spot Instance request.
-
spotPrice
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
- Returns:
- The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend
using this parameter because it can lead to increased interruptions. If you do not specify this
parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
-
state
The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
If the service returns an enum value that is not available in the current SDK version,
statewill returnSpotInstanceState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
- See Also:
-
stateAsString
The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
If the service returns an enum value that is not available in the current SDK version,
statewill returnSpotInstanceState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
- See Also:
-
status
The status code and status message describing the Spot Instance request.
- Returns:
- The status code and status message describing the Spot Instance request.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags 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. -
tags
Any tags assigned to the resource.
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
hasTags()method.- Returns:
- Any tags assigned to the resource.
-
type
The Spot Instance request type.
If the service returns an enum value that is not available in the current SDK version,
typewill returnSpotInstanceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- The Spot Instance request type.
- See Also:
-
typeAsString
The Spot Instance request type.
If the service returns an enum value that is not available in the current SDK version,
typewill returnSpotInstanceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- The Spot Instance request type.
- See Also:
-
validFrom
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
- Returns:
- The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
-
validUntil
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
-
For a persistent request, the request remains active until the
validUntildate and time is reached. Otherwise, the request remains active until you cancel it. -
For a one-time request, the request remains active until all instances launch, the request is canceled, or the
validUntildate and time is reached. By default, the request is valid for 7 days from the date the request was created.
- Returns:
- The end date of the request, in UTC format
(YYYY-MM-DDTHH:MM:SSZ).
-
For a persistent request, the request remains active until the
validUntildate and time is reached. Otherwise, the request remains active until you cancel it. -
For a one-time request, the request remains active until all instances launch, the request is canceled, or the
validUntildate and time is reached. By default, the request is valid for 7 days from the date the request was created.
-
-
-
instanceInterruptionBehavior
The behavior when a Spot Instance is interrupted.
If the service returns an enum value that is not available in the current SDK version,
instanceInterruptionBehaviorwill returnInstanceInterruptionBehavior.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceInterruptionBehaviorAsString().- Returns:
- The behavior when a Spot Instance is interrupted.
- See Also:
-
instanceInterruptionBehaviorAsString
The behavior when a Spot Instance is interrupted.
If the service returns an enum value that is not available in the current SDK version,
instanceInterruptionBehaviorwill returnInstanceInterruptionBehavior.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceInterruptionBehaviorAsString().- Returns:
- The behavior when a Spot Instance is interrupted.
- 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<SpotInstanceRequest.Builder,SpotInstanceRequest> - 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
-