Class SpotInstanceRequest

java.lang.Object
com.amazonaws.services.ec2.model.SpotInstanceRequest
All Implemented Interfaces:
Serializable, Cloneable

public class SpotInstanceRequest extends Object implements Serializable, Cloneable

Describes a Spot instance request.

See Also:
  • Constructor Details

    • SpotInstanceRequest

      public SpotInstanceRequest()
  • Method Details

    • setSpotInstanceRequestId

      public void setSpotInstanceRequestId(String spotInstanceRequestId)

      The ID of the Spot instance request.

      Parameters:
      spotInstanceRequestId - The ID of the Spot instance request.
    • getSpotInstanceRequestId

      public String getSpotInstanceRequestId()

      The ID of the Spot instance request.

      Returns:
      The ID of the Spot instance request.
    • withSpotInstanceRequestId

      public SpotInstanceRequest withSpotInstanceRequestId(String spotInstanceRequestId)

      The ID of the Spot instance request.

      Parameters:
      spotInstanceRequestId - The ID of the Spot instance request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSpotPrice

      public void setSpotPrice(String spotPrice)

      The maximum hourly price (bid) for the Spot instance launched to fulfill the request.

      Parameters:
      spotPrice - The maximum hourly price (bid) for the Spot instance launched to fulfill the request.
    • getSpotPrice

      public String getSpotPrice()

      The maximum hourly price (bid) for the Spot instance launched to fulfill the request.

      Returns:
      The maximum hourly price (bid) for the Spot instance launched to fulfill the request.
    • withSpotPrice

      public SpotInstanceRequest withSpotPrice(String spotPrice)

      The maximum hourly price (bid) for the Spot instance launched to fulfill the request.

      Parameters:
      spotPrice - The maximum hourly price (bid) for the Spot instance launched to fulfill the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setType

      public void setType(String type)

      The Spot instance request type.

      Parameters:
      type - The Spot instance request type.
      See Also:
    • getType

      public String getType()

      The Spot instance request type.

      Returns:
      The Spot instance request type.
      See Also:
    • withType

      public SpotInstanceRequest withType(String type)

      The Spot instance request type.

      Parameters:
      type - The Spot instance request type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setType

      public void setType(SpotInstanceType type)

      The Spot instance request type.

      Parameters:
      type - The Spot instance request type.
      See Also:
    • withType

      public SpotInstanceRequest withType(SpotInstanceType type)

      The Spot instance request type.

      Parameters:
      type - The Spot instance request type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setState

      public void setState(String state)

      The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.

      Parameters:
      state - The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.
      See Also:
    • getState

      public String getState()

      The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.

      Returns:
      The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.
      See Also:
    • withState

      public SpotInstanceRequest withState(String state)

      The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.

      Parameters:
      state - The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setState

      public void setState(SpotInstanceState state)

      The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.

      Parameters:
      state - The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.
      See Also:
    • withState

      public SpotInstanceRequest withState(SpotInstanceState state)

      The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.

      Parameters:
      state - The state of the Spot instance request. Spot bid status information can help you track your Spot instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setFault

      public void setFault(SpotInstanceStateFault fault)

      The fault codes for the Spot instance request, if any.

      Parameters:
      fault - The fault codes for the Spot instance request, if any.
    • getFault

      public SpotInstanceStateFault getFault()

      The fault codes for the Spot instance request, if any.

      Returns:
      The fault codes for the Spot instance request, if any.
    • withFault

      public SpotInstanceRequest withFault(SpotInstanceStateFault fault)

      The fault codes for the Spot instance request, if any.

      Parameters:
      fault - The fault codes for the Spot instance request, if any.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setStatus

      public void setStatus(SpotInstanceStatus status)

      The status code and status message describing the Spot instance request.

      Parameters:
      status - The status code and status message describing the Spot instance request.
    • getStatus

      public SpotInstanceStatus getStatus()

      The status code and status message describing the Spot instance request.

      Returns:
      The status code and status message describing the Spot instance request.
    • withStatus

      public SpotInstanceRequest withStatus(SpotInstanceStatus status)

      The status code and status message describing the Spot instance request.

      Parameters:
      status - The status code and status message describing the Spot instance request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setValidFrom

      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.

      Parameters:
      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.
    • getValidFrom

      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.

      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.
    • withValidFrom

      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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • setValidUntil

      public void setValidUntil(Date validUntil)

      The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

      Parameters:
      validUntil - The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
    • getValidUntil

      public Date getValidUntil()

      The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

      Returns:
      The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
    • withValidUntil

      public SpotInstanceRequest withValidUntil(Date validUntil)

      The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

      Parameters:
      validUntil - The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). If this is a one-time request, it remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setLaunchGroup

      public void setLaunchGroup(String launchGroup)

      The instance launch group. Launch groups are Spot instances that launch together and terminate together.

      Parameters:
      launchGroup - The instance launch group. Launch groups are Spot instances that launch together and terminate together.
    • getLaunchGroup

      public String getLaunchGroup()

      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.
    • withLaunchGroup

      public SpotInstanceRequest withLaunchGroup(String launchGroup)

      The instance launch group. Launch groups are Spot instances that launch together and terminate together.

      Parameters:
      launchGroup - The instance launch group. Launch groups are Spot instances that launch together and terminate together.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setAvailabilityZoneGroup

      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.

      Parameters:
      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.
    • getAvailabilityZoneGroup

      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.

      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.
    • withAvailabilityZoneGroup

      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.

      Parameters:
      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:
      Returns a reference to this object so that method calls can be chained together.
    • setLaunchSpecification

      public void setLaunchSpecification(LaunchSpecification launchSpecification)

      Additional information for launching instances.

      Parameters:
      launchSpecification - Additional information for launching instances.
    • getLaunchSpecification

      public LaunchSpecification getLaunchSpecification()

      Additional information for launching instances.

      Returns:
      Additional information for launching instances.
    • withLaunchSpecification

      public SpotInstanceRequest withLaunchSpecification(LaunchSpecification launchSpecification)

      Additional information for launching instances.

      Parameters:
      launchSpecification - Additional information for launching instances.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setInstanceId

      public void setInstanceId(String instanceId)

      The instance ID, if an instance has been launched to fulfill the Spot instance request.

      Parameters:
      instanceId - The instance ID, if an instance has been launched to fulfill the Spot instance request.
    • getInstanceId

      public String getInstanceId()

      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.
    • withInstanceId

      public SpotInstanceRequest withInstanceId(String instanceId)

      The instance ID, if an instance has been launched to fulfill the Spot instance request.

      Parameters:
      instanceId - The instance ID, if an instance has been launched to fulfill the Spot instance request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setCreateTime

      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).

      Parameters:
      createTime - The date and time when the Spot instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
    • getCreateTime

      public Date getCreateTime()

      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).
    • withCreateTime

      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).

      Parameters:
      createTime - The date and time when the Spot instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setProductDescription

      public void setProductDescription(String productDescription)

      The product description associated with the Spot instance.

      Parameters:
      productDescription - The product description associated with the Spot instance.
      See Also:
    • getProductDescription

      public String getProductDescription()

      The product description associated with the Spot instance.

      Returns:
      The product description associated with the Spot instance.
      See Also:
    • withProductDescription

      public SpotInstanceRequest withProductDescription(String productDescription)

      The product description associated with the Spot instance.

      Parameters:
      productDescription - The product description associated with the Spot instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setProductDescription

      public void setProductDescription(RIProductDescription productDescription)

      The product description associated with the Spot instance.

      Parameters:
      productDescription - The product description associated with the Spot instance.
      See Also:
    • withProductDescription

      public SpotInstanceRequest withProductDescription(RIProductDescription productDescription)

      The product description associated with the Spot instance.

      Parameters:
      productDescription - The product description associated with the Spot instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setBlockDurationMinutes

      public void setBlockDurationMinutes(Integer blockDurationMinutes)

      The duration for the Spot instance, in minutes.

      Parameters:
      blockDurationMinutes - The duration for the Spot instance, in minutes.
    • getBlockDurationMinutes

      public Integer getBlockDurationMinutes()

      The duration for the Spot instance, in minutes.

      Returns:
      The duration for the Spot instance, in minutes.
    • withBlockDurationMinutes

      public SpotInstanceRequest withBlockDurationMinutes(Integer blockDurationMinutes)

      The duration for the Spot instance, in minutes.

      Parameters:
      blockDurationMinutes - The duration for the Spot instance, in minutes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setActualBlockHourlyPrice

      public void setActualBlockHourlyPrice(String actualBlockHourlyPrice)

      If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.

      Parameters:
      actualBlockHourlyPrice - If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.
    • getActualBlockHourlyPrice

      public String getActualBlockHourlyPrice()

      If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.

      Returns:
      If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.
    • withActualBlockHourlyPrice

      public SpotInstanceRequest withActualBlockHourlyPrice(String actualBlockHourlyPrice)

      If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.

      Parameters:
      actualBlockHourlyPrice - If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getTags

      public List<Tag> getTags()

      Any tags assigned to the resource.

      Returns:
      Any tags assigned to the resource.
    • setTags

      public void setTags(Collection<Tag> tags)

      Any tags assigned to the resource.

      Parameters:
      tags - Any tags assigned to the resource.
    • withTags

      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.

      Parameters:
      tags - Any tags assigned to the resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withTags

      public SpotInstanceRequest withTags(Collection<Tag> tags)

      Any tags assigned to the resource.

      Parameters:
      tags - Any tags assigned to the resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setLaunchedAvailabilityZone

      public void setLaunchedAvailabilityZone(String launchedAvailabilityZone)

      The Availability Zone in which the bid is launched.

      Parameters:
      launchedAvailabilityZone - The Availability Zone in which the bid is launched.
    • getLaunchedAvailabilityZone

      public String getLaunchedAvailabilityZone()

      The Availability Zone in which the bid is launched.

      Returns:
      The Availability Zone in which the bid is launched.
    • withLaunchedAvailabilityZone

      public SpotInstanceRequest withLaunchedAvailabilityZone(String launchedAvailabilityZone)

      The Availability Zone in which the bid is launched.

      Parameters:
      launchedAvailabilityZone - The Availability Zone in which the bid is launched.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public SpotInstanceRequest clone()
      Overrides:
      clone in class Object