com.amazonaws.services.ec2.model
Class DescribeSpotPriceHistoryRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.DescribeSpotPriceHistoryRequest
All Implemented Interfaces:
DryRunSupportedRequest<DescribeSpotPriceHistoryRequest>, java.io.Serializable

public class DescribeSpotPriceHistoryRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<DescribeSpotPriceHistoryRequest>

Container for the parameters to the DescribeSpotPriceHistory operation.

Describes the Spot Price history. Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current Spot Instance requests. For more information about Spot Instances, see Spot Instances in the Amazon Elastic Compute Cloud User Guide .

When you specify an Availability Zone, this operation describes the price history for the specified Availability Zone with the most recent set of prices listed first. If you don't specify an Availability Zone, you get the prices across all Availability Zones, starting with the most recent set. However, if you're using an API version earlier than 2011-05-15, you get the lowest price across the region for the specified time period. The prices returned are listed in chronological order, from the oldest to the most recent.

See Also:
AmazonEC2.describeSpotPriceHistory(DescribeSpotPriceHistoryRequest), Serialized Form

Constructor Summary
DescribeSpotPriceHistoryRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAvailabilityZone()
          The Availability Zone.
 Request<DescribeSpotPriceHistoryRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.util.Date getEndTime()
          The end date and time of the Spot Price history data.
 java.util.List<Filter> getFilters()
          One or more filters.
 java.util.List<java.lang.String> getInstanceTypes()
          One or more instance types.
 java.lang.Integer getMaxResults()
          The number of rows to return.
 java.lang.String getNextToken()
          The next set of rows to return.
 java.util.List<java.lang.String> getProductDescriptions()
          One or more basic product descriptions.
 java.util.Date getStartTime()
          The start date and time of the Spot Price history data.
 int hashCode()
           
 void setAvailabilityZone(java.lang.String availabilityZone)
          The Availability Zone.
 void setEndTime(java.util.Date endTime)
          The end date and time of the Spot Price history data.
 void setFilters(java.util.Collection<Filter> filters)
          One or more filters.
 void setInstanceTypes(java.util.Collection<java.lang.String> instanceTypes)
          One or more instance types.
 void setMaxResults(java.lang.Integer maxResults)
          The number of rows to return.
 void setNextToken(java.lang.String nextToken)
          The next set of rows to return.
 void setProductDescriptions(java.util.Collection<java.lang.String> productDescriptions)
          One or more basic product descriptions.
 void setStartTime(java.util.Date startTime)
          The start date and time of the Spot Price history data.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 DescribeSpotPriceHistoryRequest withAvailabilityZone(java.lang.String availabilityZone)
          The Availability Zone.
 DescribeSpotPriceHistoryRequest withEndTime(java.util.Date endTime)
          The end date and time of the Spot Price history data.
 DescribeSpotPriceHistoryRequest withFilters(java.util.Collection<Filter> filters)
          One or more filters.
 DescribeSpotPriceHistoryRequest withFilters(Filter... filters)
          One or more filters.
 DescribeSpotPriceHistoryRequest withInstanceTypes(java.util.Collection<java.lang.String> instanceTypes)
          One or more instance types.
 DescribeSpotPriceHistoryRequest withInstanceTypes(InstanceType... instanceTypes)
          One or more instance types.
 DescribeSpotPriceHistoryRequest withInstanceTypes(java.lang.String... instanceTypes)
          One or more instance types.
 DescribeSpotPriceHistoryRequest withMaxResults(java.lang.Integer maxResults)
          The number of rows to return.
 DescribeSpotPriceHistoryRequest withNextToken(java.lang.String nextToken)
          The next set of rows to return.
 DescribeSpotPriceHistoryRequest withProductDescriptions(java.util.Collection<java.lang.String> productDescriptions)
          One or more basic product descriptions.
 DescribeSpotPriceHistoryRequest withProductDescriptions(java.lang.String... productDescriptions)
          One or more basic product descriptions.
 DescribeSpotPriceHistoryRequest withStartTime(java.util.Date startTime)
          The start date and time of the Spot Price history data.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DescribeSpotPriceHistoryRequest

public DescribeSpotPriceHistoryRequest()
Method Detail

getStartTime

public java.util.Date getStartTime()
The start date and time of the Spot Price history data.

Returns:
The start date and time of the Spot Price history data.

setStartTime

public void setStartTime(java.util.Date startTime)
The start date and time of the Spot Price history data.

Parameters:
startTime - The start date and time of the Spot Price history data.

withStartTime

public DescribeSpotPriceHistoryRequest withStartTime(java.util.Date startTime)
The start date and time of the Spot Price history data.

Returns a reference to this object so that method calls can be chained together.

Parameters:
startTime - The start date and time of the Spot Price history data.
Returns:
A reference to this updated object so that method calls can be chained together.

getEndTime

public java.util.Date getEndTime()
The end date and time of the Spot Price history data.

Returns:
The end date and time of the Spot Price history data.

setEndTime

public void setEndTime(java.util.Date endTime)
The end date and time of the Spot Price history data.

Parameters:
endTime - The end date and time of the Spot Price history data.

withEndTime

public DescribeSpotPriceHistoryRequest withEndTime(java.util.Date endTime)
The end date and time of the Spot Price history data.

Returns a reference to this object so that method calls can be chained together.

Parameters:
endTime - The end date and time of the Spot Price history data.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceTypes

public java.util.List<java.lang.String> getInstanceTypes()
One or more instance types.

Returns:
One or more instance types.

setInstanceTypes

public void setInstanceTypes(java.util.Collection<java.lang.String> instanceTypes)
One or more instance types.

Parameters:
instanceTypes - One or more instance types.

withInstanceTypes

public DescribeSpotPriceHistoryRequest withInstanceTypes(java.lang.String... instanceTypes)
One or more instance types.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceTypes - One or more instance types.
Returns:
A reference to this updated object so that method calls can be chained together.

withInstanceTypes

public DescribeSpotPriceHistoryRequest withInstanceTypes(java.util.Collection<java.lang.String> instanceTypes)
One or more instance types.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceTypes - One or more instance types.
Returns:
A reference to this updated object so that method calls can be chained together.

withInstanceTypes

public DescribeSpotPriceHistoryRequest withInstanceTypes(InstanceType... instanceTypes)
One or more instance types.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceTypes - One or more instance types.
Returns:
A reference to this updated object so that method calls can be chained together.

getProductDescriptions

public java.util.List<java.lang.String> getProductDescriptions()
One or more basic product descriptions.

Returns:
One or more basic product descriptions.

setProductDescriptions

public void setProductDescriptions(java.util.Collection<java.lang.String> productDescriptions)
One or more basic product descriptions.

Parameters:
productDescriptions - One or more basic product descriptions.

withProductDescriptions

public DescribeSpotPriceHistoryRequest withProductDescriptions(java.lang.String... productDescriptions)
One or more basic product descriptions.

Returns a reference to this object so that method calls can be chained together.

Parameters:
productDescriptions - One or more basic product descriptions.
Returns:
A reference to this updated object so that method calls can be chained together.

withProductDescriptions

public DescribeSpotPriceHistoryRequest withProductDescriptions(java.util.Collection<java.lang.String> productDescriptions)
One or more basic product descriptions.

Returns a reference to this object so that method calls can be chained together.

Parameters:
productDescriptions - One or more basic product descriptions.
Returns:
A reference to this updated object so that method calls can be chained together.

getFilters

public java.util.List<Filter> getFilters()
One or more filters.

Returns:
One or more filters.
  • availability-zone - The Availability Zone for which prices should be returned.

  • instance-type - The type of instance (for example, m1.small).

  • product-description - The product description for the Spot Price (Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

  • spot-price - The Spot Price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

  • timestamp - The timestamp of the Spot Price history (for example, 2010-08-16T05:06:11.000Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.


setFilters

public void setFilters(java.util.Collection<Filter> filters)
One or more filters.

Parameters:
filters - One or more filters.
  • availability-zone - The Availability Zone for which prices should be returned.

  • instance-type - The type of instance (for example, m1.small).

  • product-description - The product description for the Spot Price (Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

  • spot-price - The Spot Price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

  • timestamp - The timestamp of the Spot Price history (for example, 2010-08-16T05:06:11.000Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.


withFilters

public DescribeSpotPriceHistoryRequest withFilters(Filter... filters)
One or more filters.

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters - One or more filters.
  • availability-zone - The Availability Zone for which prices should be returned.

  • instance-type - The type of instance (for example, m1.small).

  • product-description - The product description for the Spot Price (Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

  • spot-price - The Spot Price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

  • timestamp - The timestamp of the Spot Price history (for example, 2010-08-16T05:06:11.000Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.

Returns:
A reference to this updated object so that method calls can be chained together.

withFilters

public DescribeSpotPriceHistoryRequest withFilters(java.util.Collection<Filter> filters)
One or more filters.

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters - One or more filters.
  • availability-zone - The Availability Zone for which prices should be returned.

  • instance-type - The type of instance (for example, m1.small).

  • product-description - The product description for the Spot Price (Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)).

  • spot-price - The Spot Price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

  • timestamp - The timestamp of the Spot Price history (for example, 2010-08-16T05:06:11.000Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.

Returns:
A reference to this updated object so that method calls can be chained together.

getAvailabilityZone

public java.lang.String getAvailabilityZone()
The Availability Zone.

Returns:
The Availability Zone.

setAvailabilityZone

public void setAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone.

Parameters:
availabilityZone - The Availability Zone.

withAvailabilityZone

public DescribeSpotPriceHistoryRequest withAvailabilityZone(java.lang.String availabilityZone)
The Availability Zone.

Returns a reference to this object so that method calls can be chained together.

Parameters:
availabilityZone - The Availability Zone.
Returns:
A reference to this updated object so that method calls can be chained together.

getMaxResults

public java.lang.Integer getMaxResults()
The number of rows to return.

Returns:
The number of rows to return.

setMaxResults

public void setMaxResults(java.lang.Integer maxResults)
The number of rows to return.

Parameters:
maxResults - The number of rows to return.

withMaxResults

public DescribeSpotPriceHistoryRequest withMaxResults(java.lang.Integer maxResults)
The number of rows to return.

Returns a reference to this object so that method calls can be chained together.

Parameters:
maxResults - The number of rows to return.
Returns:
A reference to this updated object so that method calls can be chained together.

getNextToken

public java.lang.String getNextToken()
The next set of rows to return.

Returns:
The next set of rows to return.

setNextToken

public void setNextToken(java.lang.String nextToken)
The next set of rows to return.

Parameters:
nextToken - The next set of rows to return.

withNextToken

public DescribeSpotPriceHistoryRequest withNextToken(java.lang.String nextToken)
The next set of rows to return.

Returns a reference to this object so that method calls can be chained together.

Parameters:
nextToken - The next set of rows to return.
Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<DescribeSpotPriceHistoryRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<DescribeSpotPriceHistoryRequest>

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.