/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace AutoScalingPlans
{
/**
* AWS Auto Scaling Use AWS Auto Scaling to create scaling
* plans for your applications to automatically scale your scalable AWS resources.
*
API Summary
You can use the AWS Auto Scaling service API
* to accomplish the following tasks:
-
Create and manage scaling
* plans
-
Define target tracking scaling policies to dynamically
* scale your resources based on utilization
-
Scale Amazon EC2
* Auto Scaling groups using predictive scaling and dynamic scaling to scale your
* Amazon EC2 capacity faster
-
Set minimum and maximum capacity
* limits
-
Retrieve information on existing scaling plans
* -
Access current forecast data and historical forecast data for up
* to 56 days previous
To learn more about AWS Auto Scaling,
* including information about granting IAM users required permissions for AWS Auto
* Scaling actions, see the AWS
* Auto Scaling User Guide.
*/
class AWS_AUTOSCALINGPLANS_API AutoScalingPlansClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef AutoScalingPlansClientConfiguration ClientConfigurationType;
typedef AutoScalingPlansEndpointProvider EndpointProviderType;
/**
* 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.
*/
AutoScalingPlansClient(const Aws::AutoScalingPlans::AutoScalingPlansClientConfiguration& clientConfiguration = Aws::AutoScalingPlans::AutoScalingPlansClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* 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.
*/
AutoScalingPlansClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::AutoScalingPlans::AutoScalingPlansClientConfiguration& clientConfiguration = Aws::AutoScalingPlans::AutoScalingPlansClientConfiguration());
/**
* 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
*/
AutoScalingPlansClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::AutoScalingPlans::AutoScalingPlansClientConfiguration& clientConfiguration = Aws::AutoScalingPlans::AutoScalingPlansClientConfiguration());
/* Legacy constructors due deprecation */
/**
* 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.
*/
AutoScalingPlansClient(const Aws::Client::ClientConfiguration& 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.
*/
AutoScalingPlansClient(const Aws::Auth::AWSCredentials& credentials,
const Aws::Client::ClientConfiguration& 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
*/
AutoScalingPlansClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~AutoScalingPlansClient();
/**
* Creates a scaling plan.
See Also:
AWS
* API Reference
*/
virtual Model::CreateScalingPlanOutcome CreateScalingPlan(const Model::CreateScalingPlanRequest& request) const;
/**
* A Callable wrapper for CreateScalingPlan that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateScalingPlanOutcomeCallable CreateScalingPlanCallable(const CreateScalingPlanRequestT& request) const
{
return SubmitCallable(&AutoScalingPlansClient::CreateScalingPlan, request);
}
/**
* An Async wrapper for CreateScalingPlan that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateScalingPlanAsync(const CreateScalingPlanRequestT& request, const CreateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AutoScalingPlansClient::CreateScalingPlan, request, handler, context);
}
/**
* Deletes the specified scaling plan.
Deleting a scaling plan deletes
* the underlying ScalingInstruction for all of the scalable resources that
* are covered by the plan.
If the plan has launched resources or has
* scaling activities in progress, you must delete those resources
* separately.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteScalingPlanOutcome DeleteScalingPlan(const Model::DeleteScalingPlanRequest& request) const;
/**
* A Callable wrapper for DeleteScalingPlan that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteScalingPlanOutcomeCallable DeleteScalingPlanCallable(const DeleteScalingPlanRequestT& request) const
{
return SubmitCallable(&AutoScalingPlansClient::DeleteScalingPlan, request);
}
/**
* An Async wrapper for DeleteScalingPlan that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteScalingPlanAsync(const DeleteScalingPlanRequestT& request, const DeleteScalingPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AutoScalingPlansClient::DeleteScalingPlan, request, handler, context);
}
/**
* Describes the scalable resources in the specified scaling plan.
See
* Also:
AWS
* API Reference
*/
virtual Model::DescribeScalingPlanResourcesOutcome DescribeScalingPlanResources(const Model::DescribeScalingPlanResourcesRequest& request) const;
/**
* A Callable wrapper for DescribeScalingPlanResources that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeScalingPlanResourcesOutcomeCallable DescribeScalingPlanResourcesCallable(const DescribeScalingPlanResourcesRequestT& request) const
{
return SubmitCallable(&AutoScalingPlansClient::DescribeScalingPlanResources, request);
}
/**
* An Async wrapper for DescribeScalingPlanResources that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeScalingPlanResourcesAsync(const DescribeScalingPlanResourcesRequestT& request, const DescribeScalingPlanResourcesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AutoScalingPlansClient::DescribeScalingPlanResources, request, handler, context);
}
/**
* Describes one or more of your scaling plans.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeScalingPlansOutcome DescribeScalingPlans(const Model::DescribeScalingPlansRequest& request) const;
/**
* A Callable wrapper for DescribeScalingPlans that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeScalingPlansOutcomeCallable DescribeScalingPlansCallable(const DescribeScalingPlansRequestT& request) const
{
return SubmitCallable(&AutoScalingPlansClient::DescribeScalingPlans, request);
}
/**
* An Async wrapper for DescribeScalingPlans that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeScalingPlansAsync(const DescribeScalingPlansRequestT& request, const DescribeScalingPlansResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AutoScalingPlansClient::DescribeScalingPlans, request, handler, context);
}
/**
* Retrieves the forecast data for a scalable resource.
Capacity
* forecasts are represented as predicted values, or data points, that are
* calculated using historical data points from a specified CloudWatch load metric.
* Data points are available for up to 56 days.
See Also:
AWS
* API Reference
*/
virtual Model::GetScalingPlanResourceForecastDataOutcome GetScalingPlanResourceForecastData(const Model::GetScalingPlanResourceForecastDataRequest& request) const;
/**
* A Callable wrapper for GetScalingPlanResourceForecastData that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetScalingPlanResourceForecastDataOutcomeCallable GetScalingPlanResourceForecastDataCallable(const GetScalingPlanResourceForecastDataRequestT& request) const
{
return SubmitCallable(&AutoScalingPlansClient::GetScalingPlanResourceForecastData, request);
}
/**
* An Async wrapper for GetScalingPlanResourceForecastData that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetScalingPlanResourceForecastDataAsync(const GetScalingPlanResourceForecastDataRequestT& request, const GetScalingPlanResourceForecastDataResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AutoScalingPlansClient::GetScalingPlanResourceForecastData, request, handler, context);
}
/**
* Updates the specified scaling plan.
You cannot update a scaling plan
* if it is in the process of being created, updated, or deleted.
See
* Also:
AWS
* API Reference
*/
virtual Model::UpdateScalingPlanOutcome UpdateScalingPlan(const Model::UpdateScalingPlanRequest& request) const;
/**
* A Callable wrapper for UpdateScalingPlan that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UpdateScalingPlanOutcomeCallable UpdateScalingPlanCallable(const UpdateScalingPlanRequestT& request) const
{
return SubmitCallable(&AutoScalingPlansClient::UpdateScalingPlan, request);
}
/**
* An Async wrapper for UpdateScalingPlan that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UpdateScalingPlanAsync(const UpdateScalingPlanRequestT& request, const UpdateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&AutoScalingPlansClient::UpdateScalingPlan, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const AutoScalingPlansClientConfiguration& clientConfiguration);
AutoScalingPlansClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace AutoScalingPlans
} // namespace Aws