/* * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.ec2.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.DescribeSpotPriceHistoryRequestMarshaller; /** * Container for the parameters to the {@link com.amazonaws.services.ec2.AmazonEC2#describeSpotPriceHistory(DescribeSpotPriceHistoryRequest) DescribeSpotPriceHistory operation}. *
* Describes the Spot price history. The prices returned are listed in * chronological order, from the oldest to the most recent, for up to the * past 90 days. For more information, see * Spot Instance Pricing History * in the Amazon Elastic Compute Cloud User Guide . *
** When you specify a start and end time, this operation returns the * prices of the instance types within the time range that you specified * and the time when the price changed. The price is valid within the * time period that you specified; the response merely indicates the last * time that the price changed. *
* * @see com.amazonaws.services.ec2.AmazonEC2#describeSpotPriceHistory(DescribeSpotPriceHistoryRequest) */ public class DescribeSpotPriceHistoryRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequestavailability-zone
- The
* Availability Zone for which prices should be returned.
instance-type
- The type of instance (for example,
* m3.medium
).
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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
NextToken
value.
*/
private Integer maxResults;
/**
* The token for the next set of results.
*/
private String nextToken;
/**
* The date and time, up to the past 90 days, from which to start
* retrieving the price history data, in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ).
*
* @return The date and time, up to the past 90 days, from which to start
* retrieving the price history data, in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ).
*/
public java.util.Date getStartTime() {
return startTime;
}
/**
* The date and time, up to the past 90 days, from which to start
* retrieving the price history data, in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ).
*
* @param startTime The date and time, up to the past 90 days, from which to start
* retrieving the price history data, in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ).
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
* The date and time, up to the past 90 days, from which to start
* retrieving the price history data, in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ).
* * Returns a reference to this object so that method calls can be chained together. * * @param startTime The date and time, up to the past 90 days, from which to start * retrieving the price history data, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). * * @return A reference to this updated object so that method calls can be chained * together. */ public DescribeSpotPriceHistoryRequest withStartTime(java.util.Date startTime) { this.startTime = startTime; return this; } /** * The date and time, up to the current date, from which to stop * retrieving the price history data, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). * * @return The date and time, up to the current date, from which to stop * retrieving the price history data, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). */ public java.util.Date getEndTime() { return endTime; } /** * The date and time, up to the current date, from which to stop * retrieving the price history data, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). * * @param endTime The date and time, up to the current date, from which to stop * retrieving the price history data, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** * The date and time, up to the current date, from which to stop * retrieving the price history data, in UTC format (for example, * YYYY-MM-DDTHH:MM:SSZ). *
* Returns a reference to this object so that method calls can be chained together.
*
* @param endTime The date and time, up to the current date, from which to stop
* retrieving the price history data, in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ).
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withEndTime(java.util.Date endTime) {
this.endTime = endTime;
return this;
}
/**
* Filters the results by the specified instance types.
*
* @return Filters the results by the specified instance types.
*/
public java.util.List
* Returns a reference to this object so that method calls can be chained together.
*
* @param instanceTypes Filters the results by the specified instance types.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withInstanceTypes(String... instanceTypes) {
if (getInstanceTypes() == null) setInstanceTypes(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param instanceTypes Filters the results by the specified instance types.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withInstanceTypes(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param instanceTypes Filters the results by the specified instance types.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withInstanceTypes(InstanceType... instanceTypes) {
java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param productDescriptions Filters the results by the specified basic product descriptions.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withProductDescriptions(String... productDescriptions) {
if (getProductDescriptions() == null) setProductDescriptions(new java.util.ArrayList
* Returns a reference to this object so that method calls can be chained together.
*
* @param productDescriptions Filters the results by the specified basic product descriptions.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withProductDescriptions(java.util.Collection
* Returns a reference to this object so that method calls can be chained together.
*
* @param filters One or more filters.
* Returns a reference to this object so that method calls can be chained together.
*
* @param filters One or more filters.
* Returns a reference to this object so that method calls can be chained together.
*
* @param availabilityZone Filters the results by the specified Availability Zone.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
return this;
}
/**
* The maximum number of results to return in a single call. Specify a
* value between 1 and 1000. The default value is 1000. To retrieve the
* remaining results, make another call with the returned
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param maxResults The maximum number of results to return in a single call. Specify a
* value between 1 and 1000. The default value is 1000. To retrieve the
* remaining results, make another call with the returned
*
* Returns a reference to this object so that method calls can be chained together.
*
* @param nextToken The token for the next set of results.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withNextToken(String nextToken) {
this.nextToken = nextToken;
return this;
}
/**
* This method is intended for internal use only.
* Returns the marshaled request configured with additional parameters to
* enable operation dry-run.
*/
@Override
public Request
*
* @return One or more filters. availability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
*/
public java.util.Listavailability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
*
* @param filters One or more filters. availability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
*/
public void setFilters(java.util.Collectionavailability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
* availability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withFilters(Filter... filters) {
if (getFilters() == null) setFilters(new java.util.ArrayListavailability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
* availability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withFilters(java.util.Collectionavailability-zone
- The
* Availability Zone for which prices should be returned. instance-type
- The type of instance (for example,
* m3.medium
). 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,
* in UTC format (for example,
* YYYY-MM-DDTHH:MM:SSZ). You
* can use wildcards (* and ?). Greater than or less than comparison is
* not supported. NextToken
value.
*
* @return The maximum number of results to return in a single call. Specify a
* value between 1 and 1000. The default value is 1000. To retrieve the
* remaining results, make another call with the returned
* NextToken
value.
*/
public Integer getMaxResults() {
return maxResults;
}
/**
* The maximum number of results to return in a single call. Specify a
* value between 1 and 1000. The default value is 1000. To retrieve the
* remaining results, make another call with the returned
* NextToken
value.
*
* @param maxResults The maximum number of results to return in a single call. Specify a
* value between 1 and 1000. The default value is 1000. To retrieve the
* remaining results, make another call with the returned
* NextToken
value.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
* The maximum number of results to return in a single call. Specify a
* value between 1 and 1000. The default value is 1000. To retrieve the
* remaining results, make another call with the returned
* NextToken
value.
* NextToken
value.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DescribeSpotPriceHistoryRequest withMaxResults(Integer maxResults) {
this.maxResults = maxResults;
return this;
}
/**
* The token for the next set of results.
*
* @return The token for the next set of results.
*/
public String getNextToken() {
return nextToken;
}
/**
* The token for the next set of results.
*
* @param nextToken The token for the next set of results.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
* The token for the next set of results.
*