/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** *

Contains the parameters for DescribeSpotPriceHistory.

See * Also:

AWS * API Reference

*/ class DescribeSpotPriceHistoryRequest : public EC2Request { public: AWS_EC2_API DescribeSpotPriceHistoryRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "DescribeSpotPriceHistory"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline const Aws::Vector& GetFilters() const{ return m_filters; } /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; } /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline void SetFilters(const Aws::Vector& value) { m_filtersHasBeenSet = true; m_filters = value; } /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline void SetFilters(Aws::Vector&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); } /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline DescribeSpotPriceHistoryRequest& WithFilters(const Aws::Vector& value) { SetFilters(value); return *this;} /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline DescribeSpotPriceHistoryRequest& WithFilters(Aws::Vector&& value) { SetFilters(std::move(value)); return *this;} /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline DescribeSpotPriceHistoryRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; } /** *

The 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 | Red * Hat Enterprise Linux | SUSE Linux | Windows | * Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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.

    *
*/ inline DescribeSpotPriceHistoryRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; } /** *

Filters the results by the specified Availability Zone.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

Filters the results by the specified Availability Zone.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

Filters the results by the specified Availability Zone.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

Filters the results by the specified Availability Zone.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

Filters the results by the specified Availability Zone.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

Filters the results by the specified Availability Zone.

*/ inline DescribeSpotPriceHistoryRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

Filters the results by the specified Availability Zone.

*/ inline DescribeSpotPriceHistoryRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

Filters the results by the specified Availability Zone.

*/ inline DescribeSpotPriceHistoryRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

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 DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_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 DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

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 DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

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 DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline DescribeSpotPriceHistoryRequest& WithDryRun(bool value) { SetDryRun(value); 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).

*/ inline const Aws::Utils::DateTime& GetEndTime() const{ return m_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).

*/ inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } /** *

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

*/ inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; } /** *

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

*/ inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); } /** *

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

*/ inline DescribeSpotPriceHistoryRequest& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); 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).

*/ inline DescribeSpotPriceHistoryRequest& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;} /** *

Filters the results by the specified instance types.

*/ inline const Aws::Vector& GetInstanceTypes() const{ return m_instanceTypes; } /** *

Filters the results by the specified instance types.

*/ inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; } /** *

Filters the results by the specified instance types.

*/ inline void SetInstanceTypes(const Aws::Vector& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = value; } /** *

Filters the results by the specified instance types.

*/ inline void SetInstanceTypes(Aws::Vector&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes = std::move(value); } /** *

Filters the results by the specified instance types.

*/ inline DescribeSpotPriceHistoryRequest& WithInstanceTypes(const Aws::Vector& value) { SetInstanceTypes(value); return *this;} /** *

Filters the results by the specified instance types.

*/ inline DescribeSpotPriceHistoryRequest& WithInstanceTypes(Aws::Vector&& value) { SetInstanceTypes(std::move(value)); return *this;} /** *

Filters the results by the specified instance types.

*/ inline DescribeSpotPriceHistoryRequest& AddInstanceTypes(const InstanceType& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(value); return *this; } /** *

Filters the results by the specified instance types.

*/ inline DescribeSpotPriceHistoryRequest& AddInstanceTypes(InstanceType&& value) { m_instanceTypesHasBeenSet = true; m_instanceTypes.push_back(std::move(value)); return *this; } /** *

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.

*/ inline int GetMaxResults() const{ return m_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.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

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.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

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.

*/ inline DescribeSpotPriceHistoryRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeSpotPriceHistoryRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeSpotPriceHistoryRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeSpotPriceHistoryRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

Filters the results by the specified basic product descriptions.

*/ inline const Aws::Vector& GetProductDescriptions() const{ return m_productDescriptions; } /** *

Filters the results by the specified basic product descriptions.

*/ inline bool ProductDescriptionsHasBeenSet() const { return m_productDescriptionsHasBeenSet; } /** *

Filters the results by the specified basic product descriptions.

*/ inline void SetProductDescriptions(const Aws::Vector& value) { m_productDescriptionsHasBeenSet = true; m_productDescriptions = value; } /** *

Filters the results by the specified basic product descriptions.

*/ inline void SetProductDescriptions(Aws::Vector&& value) { m_productDescriptionsHasBeenSet = true; m_productDescriptions = std::move(value); } /** *

Filters the results by the specified basic product descriptions.

*/ inline DescribeSpotPriceHistoryRequest& WithProductDescriptions(const Aws::Vector& value) { SetProductDescriptions(value); return *this;} /** *

Filters the results by the specified basic product descriptions.

*/ inline DescribeSpotPriceHistoryRequest& WithProductDescriptions(Aws::Vector&& value) { SetProductDescriptions(std::move(value)); return *this;} /** *

Filters the results by the specified basic product descriptions.

*/ inline DescribeSpotPriceHistoryRequest& AddProductDescriptions(const Aws::String& value) { m_productDescriptionsHasBeenSet = true; m_productDescriptions.push_back(value); return *this; } /** *

Filters the results by the specified basic product descriptions.

*/ inline DescribeSpotPriceHistoryRequest& AddProductDescriptions(Aws::String&& value) { m_productDescriptionsHasBeenSet = true; m_productDescriptions.push_back(std::move(value)); return *this; } /** *

Filters the results by the specified basic product descriptions.

*/ inline DescribeSpotPriceHistoryRequest& AddProductDescriptions(const char* value) { m_productDescriptionsHasBeenSet = true; m_productDescriptions.push_back(value); return *this; } /** *

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

*/ inline const Aws::Utils::DateTime& GetStartTime() const{ return m_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).

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

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

*/ inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

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

*/ inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

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

*/ inline DescribeSpotPriceHistoryRequest& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} /** *

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

*/ inline DescribeSpotPriceHistoryRequest& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} private: Aws::Vector m_filters; bool m_filtersHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::Utils::DateTime m_endTime; bool m_endTimeHasBeenSet = false; Aws::Vector m_instanceTypes; bool m_instanceTypesHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; Aws::Vector m_productDescriptions; bool m_productDescriptionsHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws