/**
* 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
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace SavingsPlans
{
namespace Model
{
class CreateSavingsPlanRequest;
class DescribeSavingsPlanRatesRequest;
class DescribeSavingsPlansRequest;
class DescribeSavingsPlansOfferingRatesRequest;
class DescribeSavingsPlansOfferingsRequest;
class ListTagsForResourceRequest;
class TagResourceRequest;
class UntagResourceRequest;
typedef Aws::Utils::Outcome CreateSavingsPlanOutcome;
typedef Aws::Utils::Outcome DescribeSavingsPlanRatesOutcome;
typedef Aws::Utils::Outcome DescribeSavingsPlansOutcome;
typedef Aws::Utils::Outcome DescribeSavingsPlansOfferingRatesOutcome;
typedef Aws::Utils::Outcome DescribeSavingsPlansOfferingsOutcome;
typedef Aws::Utils::Outcome ListTagsForResourceOutcome;
typedef Aws::Utils::Outcome TagResourceOutcome;
typedef Aws::Utils::Outcome UntagResourceOutcome;
typedef std::future CreateSavingsPlanOutcomeCallable;
typedef std::future DescribeSavingsPlanRatesOutcomeCallable;
typedef std::future DescribeSavingsPlansOutcomeCallable;
typedef std::future DescribeSavingsPlansOfferingRatesOutcomeCallable;
typedef std::future DescribeSavingsPlansOfferingsOutcomeCallable;
typedef std::future ListTagsForResourceOutcomeCallable;
typedef std::future TagResourceOutcomeCallable;
typedef std::future UntagResourceOutcomeCallable;
} // namespace Model
class SavingsPlansClient;
typedef std::function&) > CreateSavingsPlanResponseReceivedHandler;
typedef std::function&) > DescribeSavingsPlanRatesResponseReceivedHandler;
typedef std::function&) > DescribeSavingsPlansResponseReceivedHandler;
typedef std::function&) > DescribeSavingsPlansOfferingRatesResponseReceivedHandler;
typedef std::function&) > DescribeSavingsPlansOfferingsResponseReceivedHandler;
typedef std::function&) > ListTagsForResourceResponseReceivedHandler;
typedef std::function&) > TagResourceResponseReceivedHandler;
typedef std::function&) > UntagResourceResponseReceivedHandler;
/**
* Savings Plans are a pricing model that offer significant savings on AWS usage
* (for example, on Amazon EC2 instances). You commit to a consistent amount of
* usage, in USD per hour, for a term of 1 or 3 years, and receive a lower price
* for that usage. For more information, see the AWS Savings
* Plans User Guide.
*/
class AWS_SAVINGSPLANS_API SavingsPlansClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SavingsPlansClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SavingsPlansClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SavingsPlansClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~SavingsPlansClient();
/**
* Creates a Savings Plan.
See Also:
AWS
* API Reference
*/
virtual Model::CreateSavingsPlanOutcome CreateSavingsPlan(const Model::CreateSavingsPlanRequest& request) const;
/**
* Creates a Savings Plan.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateSavingsPlanOutcomeCallable CreateSavingsPlanCallable(const Model::CreateSavingsPlanRequest& request) const;
/**
* Creates a Savings Plan.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateSavingsPlanAsync(const Model::CreateSavingsPlanRequest& request, const CreateSavingsPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Describes the specified Savings Plans rates.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeSavingsPlanRatesOutcome DescribeSavingsPlanRates(const Model::DescribeSavingsPlanRatesRequest& request) const;
/**
* Describes the specified Savings Plans rates.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlanRatesOutcomeCallable DescribeSavingsPlanRatesCallable(const Model::DescribeSavingsPlanRatesRequest& request) const;
/**
* Describes the specified Savings Plans rates.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlanRatesAsync(const Model::DescribeSavingsPlanRatesRequest& request, const DescribeSavingsPlanRatesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Describes the specified Savings Plans.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeSavingsPlansOutcome DescribeSavingsPlans(const Model::DescribeSavingsPlansRequest& request) const;
/**
* Describes the specified Savings Plans.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlansOutcomeCallable DescribeSavingsPlansCallable(const Model::DescribeSavingsPlansRequest& request) const;
/**
* Describes the specified Savings Plans.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlansAsync(const Model::DescribeSavingsPlansRequest& request, const DescribeSavingsPlansResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Describes the specified Savings Plans offering rates.
See
* Also:
AWS
* API Reference
*/
virtual Model::DescribeSavingsPlansOfferingRatesOutcome DescribeSavingsPlansOfferingRates(const Model::DescribeSavingsPlansOfferingRatesRequest& request) const;
/**
* Describes the specified Savings Plans offering rates.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlansOfferingRatesOutcomeCallable DescribeSavingsPlansOfferingRatesCallable(const Model::DescribeSavingsPlansOfferingRatesRequest& request) const;
/**
* Describes the specified Savings Plans offering rates.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlansOfferingRatesAsync(const Model::DescribeSavingsPlansOfferingRatesRequest& request, const DescribeSavingsPlansOfferingRatesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Describes the specified Savings Plans offerings.
See Also:
* AWS
* API Reference
*/
virtual Model::DescribeSavingsPlansOfferingsOutcome DescribeSavingsPlansOfferings(const Model::DescribeSavingsPlansOfferingsRequest& request) const;
/**
* Describes the specified Savings Plans offerings.
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlansOfferingsOutcomeCallable DescribeSavingsPlansOfferingsCallable(const Model::DescribeSavingsPlansOfferingsRequest& request) const;
/**
* Describes the specified Savings Plans offerings.
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlansOfferingsAsync(const Model::DescribeSavingsPlansOfferingsRequest& request, const DescribeSavingsPlansOfferingsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Lists the tags for the specified resource.
See Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* Lists the tags for the specified resource.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const Model::ListTagsForResourceRequest& request) const;
/**
* Lists the tags for the specified resource.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListTagsForResourceAsync(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Adds the specified tags to the specified resource.
See Also:
* AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* Adds the specified tags to the specified resource.
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::TagResourceOutcomeCallable TagResourceCallable(const Model::TagResourceRequest& request) const;
/**
* Adds the specified tags to the specified resource.
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void TagResourceAsync(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Removes the specified tags from the specified resource.
See
* Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* Removes the specified tags from the specified resource.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UntagResourceOutcomeCallable UntagResourceCallable(const Model::UntagResourceRequest& request) const;
/**
* Removes the specified tags from the specified resource.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UntagResourceAsync(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateSavingsPlanAsyncHelper(const Model::CreateSavingsPlanRequest& request, const CreateSavingsPlanResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeSavingsPlanRatesAsyncHelper(const Model::DescribeSavingsPlanRatesRequest& request, const DescribeSavingsPlanRatesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeSavingsPlansAsyncHelper(const Model::DescribeSavingsPlansRequest& request, const DescribeSavingsPlansResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeSavingsPlansOfferingRatesAsyncHelper(const Model::DescribeSavingsPlansOfferingRatesRequest& request, const DescribeSavingsPlansOfferingRatesResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeSavingsPlansOfferingsAsyncHelper(const Model::DescribeSavingsPlansOfferingsRequest& request, const DescribeSavingsPlansOfferingsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListTagsForResourceAsyncHelper(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void TagResourceAsyncHelper(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void UntagResourceAsyncHelper(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace SavingsPlans
} // namespace Aws