@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SpotInstanceRequest extends Object implements Serializable, Cloneable
Describes a Spot Instance request.
Constructor and Description |
---|
SpotInstanceRequest() |
Modifier and Type | Method and Description |
---|---|
SpotInstanceRequest |
clone() |
boolean |
equals(Object obj) |
String |
getActualBlockHourlyPrice()
Deprecated.
|
String |
getAvailabilityZoneGroup()
The Availability Zone group.
|
Integer |
getBlockDurationMinutes()
Deprecated.
|
Date |
getCreateTime()
The date and time when the Spot Instance request was created, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
SpotInstanceStateFault |
getFault()
The fault codes for the Spot Instance request, if any.
|
String |
getInstanceId()
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
|
String |
getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted.
|
String |
getLaunchedAvailabilityZone()
The Availability Zone in which the request is launched.
|
String |
getLaunchGroup()
The instance launch group.
|
LaunchSpecification |
getLaunchSpecification()
Additional information for launching instances.
|
String |
getProductDescription()
The product description associated with the Spot Instance.
|
String |
getSpotInstanceRequestId()
The ID of the Spot Instance request.
|
String |
getSpotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
String |
getState()
The state of the Spot Instance request.
|
SpotInstanceStatus |
getStatus()
The status code and status message describing the Spot Instance request.
|
List<Tag> |
getTags()
Any tags assigned to the resource.
|
String |
getType()
The Spot Instance request type.
|
Date |
getValidFrom()
The start date of the request, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
Date |
getValidUntil()
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
|
int |
hashCode() |
void |
setActualBlockHourlyPrice(String actualBlockHourlyPrice)
Deprecated.
|
void |
setAvailabilityZoneGroup(String availabilityZoneGroup)
The Availability Zone group.
|
void |
setBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
|
void |
setCreateTime(Date createTime)
The date and time when the Spot Instance request was created, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
void |
setFault(SpotInstanceStateFault fault)
The fault codes for the Spot Instance request, if any.
|
void |
setInstanceId(String instanceId)
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
|
void |
setInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
void |
setInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
void |
setLaunchedAvailabilityZone(String launchedAvailabilityZone)
The Availability Zone in which the request is launched.
|
void |
setLaunchGroup(String launchGroup)
The instance launch group.
|
void |
setLaunchSpecification(LaunchSpecification launchSpecification)
Additional information for launching instances.
|
void |
setProductDescription(RIProductDescription productDescription)
The product description associated with the Spot Instance.
|
void |
setProductDescription(String productDescription)
The product description associated with the Spot Instance.
|
void |
setSpotInstanceRequestId(String spotInstanceRequestId)
The ID of the Spot Instance request.
|
void |
setSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
void |
setState(SpotInstanceState state)
The state of the Spot Instance request.
|
void |
setState(String state)
The state of the Spot Instance request.
|
void |
setStatus(SpotInstanceStatus status)
The status code and status message describing the Spot Instance request.
|
void |
setTags(Collection<Tag> tags)
Any tags assigned to the resource.
|
void |
setType(SpotInstanceType type)
The Spot Instance request type.
|
void |
setType(String type)
The Spot Instance request type.
|
void |
setValidFrom(Date validFrom)
The start date of the request, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
void |
setValidUntil(Date validUntil)
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
|
String |
toString()
Returns a string representation of this object.
|
SpotInstanceRequest |
withActualBlockHourlyPrice(String actualBlockHourlyPrice)
Deprecated.
|
SpotInstanceRequest |
withAvailabilityZoneGroup(String availabilityZoneGroup)
The Availability Zone group.
|
SpotInstanceRequest |
withBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
|
SpotInstanceRequest |
withCreateTime(Date createTime)
The date and time when the Spot Instance request was created, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
SpotInstanceRequest |
withFault(SpotInstanceStateFault fault)
The fault codes for the Spot Instance request, if any.
|
SpotInstanceRequest |
withInstanceId(String instanceId)
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
|
SpotInstanceRequest |
withInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
SpotInstanceRequest |
withInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
SpotInstanceRequest |
withLaunchedAvailabilityZone(String launchedAvailabilityZone)
The Availability Zone in which the request is launched.
|
SpotInstanceRequest |
withLaunchGroup(String launchGroup)
The instance launch group.
|
SpotInstanceRequest |
withLaunchSpecification(LaunchSpecification launchSpecification)
Additional information for launching instances.
|
SpotInstanceRequest |
withProductDescription(RIProductDescription productDescription)
The product description associated with the Spot Instance.
|
SpotInstanceRequest |
withProductDescription(String productDescription)
The product description associated with the Spot Instance.
|
SpotInstanceRequest |
withSpotInstanceRequestId(String spotInstanceRequestId)
The ID of the Spot Instance request.
|
SpotInstanceRequest |
withSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
SpotInstanceRequest |
withState(SpotInstanceState state)
The state of the Spot Instance request.
|
SpotInstanceRequest |
withState(String state)
The state of the Spot Instance request.
|
SpotInstanceRequest |
withStatus(SpotInstanceStatus status)
The status code and status message describing the Spot Instance request.
|
SpotInstanceRequest |
withTags(Collection<Tag> tags)
Any tags assigned to the resource.
|
SpotInstanceRequest |
withTags(Tag... tags)
Any tags assigned to the resource.
|
SpotInstanceRequest |
withType(SpotInstanceType type)
The Spot Instance request type.
|
SpotInstanceRequest |
withType(String type)
The Spot Instance request type.
|
SpotInstanceRequest |
withValidFrom(Date validFrom)
The start date of the request, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
SpotInstanceRequest |
withValidUntil(Date validUntil)
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
|
public void setActualBlockHourlyPrice(String actualBlockHourlyPrice)
Deprecated.
actualBlockHourlyPrice
- Deprecated.public String getActualBlockHourlyPrice()
Deprecated.
public SpotInstanceRequest withActualBlockHourlyPrice(String actualBlockHourlyPrice)
Deprecated.
actualBlockHourlyPrice
- Deprecated.public void setAvailabilityZoneGroup(String 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.
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.public String getAvailabilityZoneGroup()
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.
public SpotInstanceRequest withAvailabilityZoneGroup(String 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.
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.public void setBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
blockDurationMinutes
- Deprecated.public Integer getBlockDurationMinutes()
Deprecated.
public SpotInstanceRequest withBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
blockDurationMinutes
- Deprecated.public void setCreateTime(Date createTime)
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
createTime
- The date and time when the Spot Instance request was created, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).public Date getCreateTime()
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
public SpotInstanceRequest withCreateTime(Date createTime)
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
createTime
- The date and time when the Spot Instance request was created, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).public void setFault(SpotInstanceStateFault fault)
The fault codes for the Spot Instance request, if any.
fault
- The fault codes for the Spot Instance request, if any.public SpotInstanceStateFault getFault()
The fault codes for the Spot Instance request, if any.
public SpotInstanceRequest withFault(SpotInstanceStateFault fault)
The fault codes for the Spot Instance request, if any.
fault
- The fault codes for the Spot Instance request, if any.public void setInstanceId(String instanceId)
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
instanceId
- The instance ID, if an instance has been launched to fulfill the Spot Instance request.public String getInstanceId()
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
public SpotInstanceRequest withInstanceId(String instanceId)
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
instanceId
- The instance ID, if an instance has been launched to fulfill the Spot Instance request.public void setLaunchGroup(String launchGroup)
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
launchGroup
- The instance launch group. Launch groups are Spot Instances that launch together and terminate together.public String getLaunchGroup()
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
public SpotInstanceRequest withLaunchGroup(String launchGroup)
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
launchGroup
- The instance launch group. Launch groups are Spot Instances that launch together and terminate together.public void setLaunchSpecification(LaunchSpecification launchSpecification)
Additional information for launching instances.
launchSpecification
- Additional information for launching instances.public LaunchSpecification getLaunchSpecification()
Additional information for launching instances.
public SpotInstanceRequest withLaunchSpecification(LaunchSpecification launchSpecification)
Additional information for launching instances.
launchSpecification
- Additional information for launching instances.public void setLaunchedAvailabilityZone(String launchedAvailabilityZone)
The Availability Zone in which the request is launched.
launchedAvailabilityZone
- The Availability Zone in which the request is launched.public String getLaunchedAvailabilityZone()
The Availability Zone in which the request is launched.
public SpotInstanceRequest withLaunchedAvailabilityZone(String launchedAvailabilityZone)
The Availability Zone in which the request is launched.
launchedAvailabilityZone
- The Availability Zone in which the request is launched.public void setProductDescription(String productDescription)
The product description associated with the Spot Instance.
productDescription
- The product description associated with the Spot Instance.RIProductDescription
public String getProductDescription()
The product description associated with the Spot Instance.
RIProductDescription
public SpotInstanceRequest withProductDescription(String productDescription)
The product description associated with the Spot Instance.
productDescription
- The product description associated with the Spot Instance.RIProductDescription
public void setProductDescription(RIProductDescription productDescription)
The product description associated with the Spot Instance.
productDescription
- The product description associated with the Spot Instance.RIProductDescription
public SpotInstanceRequest withProductDescription(RIProductDescription productDescription)
The product description associated with the Spot Instance.
productDescription
- The product description associated with the Spot Instance.RIProductDescription
public void setSpotInstanceRequestId(String spotInstanceRequestId)
The ID of the Spot Instance request.
spotInstanceRequestId
- The ID of the Spot Instance request.public String getSpotInstanceRequestId()
The ID of the Spot Instance request.
public SpotInstanceRequest withSpotInstanceRequestId(String spotInstanceRequestId)
The ID of the Spot Instance request.
spotInstanceRequestId
- The ID of the Spot Instance request.public void setSpotPrice(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.
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.
public String getSpotPrice()
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.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public SpotInstanceRequest withSpotPrice(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.
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.
public void setState(String 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.
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.SpotInstanceState
public String getState()
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.
SpotInstanceState
public SpotInstanceRequest withState(String 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.
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.SpotInstanceState
public void setState(SpotInstanceState 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.
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.SpotInstanceState
public SpotInstanceRequest withState(SpotInstanceState 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.
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.SpotInstanceState
public void setStatus(SpotInstanceStatus status)
The status code and status message describing the Spot Instance request.
status
- The status code and status message describing the Spot Instance request.public SpotInstanceStatus getStatus()
The status code and status message describing the Spot Instance request.
public SpotInstanceRequest withStatus(SpotInstanceStatus status)
The status code and status message describing the Spot Instance request.
status
- The status code and status message describing the Spot Instance request.public List<Tag> getTags()
Any tags assigned to the resource.
public void setTags(Collection<Tag> tags)
Any tags assigned to the resource.
tags
- Any tags assigned to the resource.public SpotInstanceRequest withTags(Tag... tags)
Any tags assigned to the resource.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the
existing values.
tags
- Any tags assigned to the resource.public SpotInstanceRequest withTags(Collection<Tag> tags)
Any tags assigned to the resource.
tags
- Any tags assigned to the resource.public void setType(String type)
The Spot Instance request type.
type
- The Spot Instance request type.SpotInstanceType
public String getType()
The Spot Instance request type.
SpotInstanceType
public SpotInstanceRequest withType(String type)
The Spot Instance request type.
type
- The Spot Instance request type.SpotInstanceType
public void setType(SpotInstanceType type)
The Spot Instance request type.
type
- The Spot Instance request type.SpotInstanceType
public SpotInstanceRequest withType(SpotInstanceType type)
The Spot Instance request type.
type
- The Spot Instance request type.SpotInstanceType
public void setValidFrom(Date 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.
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.public Date getValidFrom()
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.
public SpotInstanceRequest withValidFrom(Date 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.
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.public void setValidUntil(Date 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 validUntil
date 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
validUntil
date and time is reached. By default, the request is valid for 7 days from the date the
request was created.
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 validUntil
date 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 validUntil
date and time is reached. By default, the request is valid for 7 days from the
date the request was created.
public Date getValidUntil()
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
For a persistent request, the request remains active until the validUntil
date 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
validUntil
date and time is reached. By default, the request is valid for 7 days from the date the
request was created.
For a persistent request, the request remains active until the validUntil
date 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 validUntil
date and time is reached. By default, the request is valid for 7 days from
the date the request was created.
public SpotInstanceRequest withValidUntil(Date 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 validUntil
date 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
validUntil
date and time is reached. By default, the request is valid for 7 days from the date the
request was created.
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 validUntil
date 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 validUntil
date and time is reached. By default, the request is valid for 7 days from the
date the request was created.
public void setInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted.InstanceInterruptionBehavior
public String getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted.
InstanceInterruptionBehavior
public SpotInstanceRequest withInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted.InstanceInterruptionBehavior
public void setInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted.InstanceInterruptionBehavior
public SpotInstanceRequest withInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted.InstanceInterruptionBehavior
public String toString()
toString
in class Object
Object.toString()
public SpotInstanceRequest clone()