Class SpotPrice
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.SpotPrice
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<SpotPrice.Builder,SpotPrice>
@Generated("software.amazon.awssdk:codegen") public final class SpotPrice extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SpotPrice.Builder,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.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SpotPrice.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
availabilityZone()
The Availability Zone.static SpotPrice.Builder
builder()
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
InstanceType
instanceType()
The instance type.String
instanceTypeAsString()
The instance type.RIProductDescription
productDescription()
A general description of the AMI.String
productDescriptionAsString()
A general description of the AMI.List<SdkField<?>>
sdkFields()
static Class<? extends SpotPrice.Builder>
serializableBuilderClass()
String
spotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance.Instant
timestamp()
The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).SpotPrice.Builder
toBuilder()
String
toString()
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
-
availabilityZone
public final String availabilityZone()
The Availability Zone.
- Returns:
- The Availability Zone.
-
instanceType
public final InstanceType instanceType()
The instance type.
If the service returns an enum value that is not available in the current SDK version,
instanceType
will returnInstanceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available frominstanceTypeAsString()
.- Returns:
- The instance type.
- See Also:
InstanceType
-
instanceTypeAsString
public final String instanceTypeAsString()
The instance type.
If the service returns an enum value that is not available in the current SDK version,
instanceType
will returnInstanceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available frominstanceTypeAsString()
.- Returns:
- The instance type.
- See Also:
InstanceType
-
productDescription
public final RIProductDescription productDescription()
A general description of the AMI.
If the service returns an enum value that is not available in the current SDK version,
productDescription
will returnRIProductDescription.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromproductDescriptionAsString()
.- Returns:
- A general description of the AMI.
- See Also:
RIProductDescription
-
productDescriptionAsString
public final String productDescriptionAsString()
A general description of the AMI.
If the service returns an enum value that is not available in the current SDK version,
productDescription
will returnRIProductDescription.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromproductDescriptionAsString()
.- Returns:
- A general description of the AMI.
- See Also:
RIProductDescription
-
spotPrice
public final String 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.
-
timestamp
public final Instant timestamp()
The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- Returns:
- The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
-
toBuilder
public SpotPrice.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<SpotPrice.Builder,SpotPrice>
-
builder
public static SpotPrice.Builder builder()
-
serializableBuilderClass
public static Class<? extends SpotPrice.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in 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.
-
-