AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the DescribeSpotPriceHistory operation. Describes the Spot price history. For more information, see Spot Instance pricing history in the Amazon EC2 User Guide.
When you specify a start and end time, the operation returns the prices of the instance types within that time range. It also returns the last price change before the start time, which is the effective price as of the start time.
Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z
public class DescribeSpotPriceHistoryRequest : AmazonEC2Request IAmazonWebServiceRequest
The DescribeSpotPriceHistoryRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
DescribeSpotPriceHistoryRequest() |
Name | Type | Description | |
---|---|---|---|
![]() |
AvailabilityZone | System.String |
Gets and sets the property AvailabilityZone. Filters the results by the specified Availability Zone. |
![]() |
DryRun | System.Nullable<System.Boolean> |
Gets and sets the property DryRun.
Checks whether you have the required permissions for the action, without actually
making the request, and provides an error response. If you have the required permissions,
the error response is |
![]() |
EndTime | System.Nullable<System.DateTime> |
Gets and sets the property 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). |
![]() |
Filters | System.Collections.Generic.List<Amazon.EC2.Model.Filter> |
Gets and sets the property Filters. The filters.
|
![]() |
InstanceTypes | System.Collections.Generic.List<System.String> |
Gets and sets the property InstanceTypes. Filters the results by the specified instance types. |
![]() |
MaxResults | System.Nullable<System.Int32> |
Gets and sets the property MaxResults. The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination. |
![]() |
NextToken | System.String |
Gets and sets the property NextToken. The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
![]() |
ProductDescriptions | System.Collections.Generic.List<System.String> |
Gets and sets the property ProductDescriptions. Filters the results by the specified basic product descriptions. |
![]() |
StartTime | System.Nullable<System.DateTime> |
Gets and sets the property 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). |
This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.
var client = new AmazonEC2Client(); var response = client.DescribeSpotPriceHistory(new DescribeSpotPriceHistoryRequest { EndTime = new DateTime(2014, 1, 6, 8, 9, 10, DateTimeKind.Utc), InstanceTypes = new List<string> { "m1.xlarge" }, ProductDescriptions = new List<string> { "Linux/UNIX (Amazon VPC)" }, StartTime = new DateTime(2014, 1, 6, 7, 8, 9, DateTimeKind.Utc) }); List<SpotPrice> spotPriceHistory = response.SpotPriceHistory;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer