feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,76 @@
add_project(aws-cpp-sdk-autoscaling-plans "C++ SDK for the AWS autoscaling-plans service" aws-cpp-sdk-core)
file(GLOB AWS_AUTOSCALING-PLANS_HEADERS
"include/aws/autoscaling-plans/*.h"
)
file(GLOB AWS_AUTOSCALING-PLANS_MODEL_HEADERS
"include/aws/autoscaling-plans/model/*.h"
)
file(GLOB AWS_AUTOSCALING-PLANS_SOURCE
"source/*.cpp"
)
file(GLOB AWS_AUTOSCALING-PLANS_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB AUTOSCALING-PLANS_UNIFIED_HEADERS
${AWS_AUTOSCALING-PLANS_HEADERS}
${AWS_AUTOSCALING-PLANS_MODEL_HEADERS}
)
file(GLOB AUTOSCALING-PLANS_UNITY_SRC
${AWS_AUTOSCALING-PLANS_SOURCE}
${AWS_AUTOSCALING-PLANS_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("AUTOSCALING-PLANS" AUTOSCALING-PLANS_UNITY_SRC)
endif()
file(GLOB AUTOSCALING-PLANS_SRC
${AUTOSCALING-PLANS_UNIFIED_HEADERS}
${AUTOSCALING-PLANS_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\autoscaling-plans" FILES ${AWS_AUTOSCALING-PLANS_HEADERS})
source_group("Header Files\\aws\\autoscaling-plans\\model" FILES ${AWS_AUTOSCALING-PLANS_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_AUTOSCALING-PLANS_SOURCE})
source_group("Source Files\\model" FILES ${AWS_AUTOSCALING-PLANS_MODEL_SOURCE})
endif(MSVC)
endif()
set(AUTOSCALING-PLANS_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${AUTOSCALING-PLANS_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_AUTOSCALINGPLANS_EXPORTS")
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS})
setup_install()
install (FILES ${AWS_AUTOSCALING-PLANS_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/autoscaling-plans)
install (FILES ${AWS_AUTOSCALING-PLANS_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/autoscaling-plans/model)
do_packaging()

View File

@@ -0,0 +1,327 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/AutoScalingPlansErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/autoscaling-plans/model/CreateScalingPlanResult.h>
#include <aws/autoscaling-plans/model/DeleteScalingPlanResult.h>
#include <aws/autoscaling-plans/model/DescribeScalingPlanResourcesResult.h>
#include <aws/autoscaling-plans/model/DescribeScalingPlansResult.h>
#include <aws/autoscaling-plans/model/GetScalingPlanResourceForecastDataResult.h>
#include <aws/autoscaling-plans/model/UpdateScalingPlanResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
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 AutoScalingPlans
{
namespace Model
{
class CreateScalingPlanRequest;
class DeleteScalingPlanRequest;
class DescribeScalingPlanResourcesRequest;
class DescribeScalingPlansRequest;
class GetScalingPlanResourceForecastDataRequest;
class UpdateScalingPlanRequest;
typedef Aws::Utils::Outcome<CreateScalingPlanResult, AutoScalingPlansError> CreateScalingPlanOutcome;
typedef Aws::Utils::Outcome<DeleteScalingPlanResult, AutoScalingPlansError> DeleteScalingPlanOutcome;
typedef Aws::Utils::Outcome<DescribeScalingPlanResourcesResult, AutoScalingPlansError> DescribeScalingPlanResourcesOutcome;
typedef Aws::Utils::Outcome<DescribeScalingPlansResult, AutoScalingPlansError> DescribeScalingPlansOutcome;
typedef Aws::Utils::Outcome<GetScalingPlanResourceForecastDataResult, AutoScalingPlansError> GetScalingPlanResourceForecastDataOutcome;
typedef Aws::Utils::Outcome<UpdateScalingPlanResult, AutoScalingPlansError> UpdateScalingPlanOutcome;
typedef std::future<CreateScalingPlanOutcome> CreateScalingPlanOutcomeCallable;
typedef std::future<DeleteScalingPlanOutcome> DeleteScalingPlanOutcomeCallable;
typedef std::future<DescribeScalingPlanResourcesOutcome> DescribeScalingPlanResourcesOutcomeCallable;
typedef std::future<DescribeScalingPlansOutcome> DescribeScalingPlansOutcomeCallable;
typedef std::future<GetScalingPlanResourceForecastDataOutcome> GetScalingPlanResourceForecastDataOutcomeCallable;
typedef std::future<UpdateScalingPlanOutcome> UpdateScalingPlanOutcomeCallable;
} // namespace Model
class AutoScalingPlansClient;
typedef std::function<void(const AutoScalingPlansClient*, const Model::CreateScalingPlanRequest&, const Model::CreateScalingPlanOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateScalingPlanResponseReceivedHandler;
typedef std::function<void(const AutoScalingPlansClient*, const Model::DeleteScalingPlanRequest&, const Model::DeleteScalingPlanOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteScalingPlanResponseReceivedHandler;
typedef std::function<void(const AutoScalingPlansClient*, const Model::DescribeScalingPlanResourcesRequest&, const Model::DescribeScalingPlanResourcesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeScalingPlanResourcesResponseReceivedHandler;
typedef std::function<void(const AutoScalingPlansClient*, const Model::DescribeScalingPlansRequest&, const Model::DescribeScalingPlansOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeScalingPlansResponseReceivedHandler;
typedef std::function<void(const AutoScalingPlansClient*, const Model::GetScalingPlanResourceForecastDataRequest&, const Model::GetScalingPlanResourceForecastDataOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetScalingPlanResourceForecastDataResponseReceivedHandler;
typedef std::function<void(const AutoScalingPlansClient*, const Model::UpdateScalingPlanRequest&, const Model::UpdateScalingPlanOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateScalingPlanResponseReceivedHandler;
/**
* <fullname>AWS Auto Scaling</fullname> <p>Use AWS Auto Scaling to quickly
* discover all the scalable AWS resources for your application and configure
* dynamic scaling and predictive scaling for your resources using scaling plans.
* Use this service in conjunction with the Amazon EC2 Auto Scaling, Application
* Auto Scaling, Amazon CloudWatch, and AWS CloudFormation services. </p>
* <p>Currently, predictive scaling is only available for Amazon EC2 Auto Scaling
* groups.</p> <p>For more information about AWS Auto Scaling, including
* information about granting IAM users required permissions for AWS Auto Scaling
* actions, see the <a
* href="https://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html">AWS
* Auto Scaling User Guide</a>.</p>
*/
class AWS_AUTOSCALINGPLANS_API AutoScalingPlansClient : 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.
*/
AutoScalingPlansClient(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.
*/
AutoScalingPlansClient(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
*/
AutoScalingPlansClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~AutoScalingPlansClient();
/**
* <p>Creates a scaling plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/CreateScalingPlan">AWS
* API Reference</a></p>
*/
virtual Model::CreateScalingPlanOutcome CreateScalingPlan(const Model::CreateScalingPlanRequest& request) const;
/**
* <p>Creates a scaling plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/CreateScalingPlan">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateScalingPlanOutcomeCallable CreateScalingPlanCallable(const Model::CreateScalingPlanRequest& request) const;
/**
* <p>Creates a scaling plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/CreateScalingPlan">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateScalingPlanAsync(const Model::CreateScalingPlanRequest& request, const CreateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Deletes the specified scaling plan.</p> <p>Deleting a scaling plan deletes
* the underlying <a>ScalingInstruction</a> for all of the scalable resources that
* are covered by the plan.</p> <p>If the plan has launched resources or has
* scaling activities in progress, you must delete those resources
* separately.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DeleteScalingPlan">AWS
* API Reference</a></p>
*/
virtual Model::DeleteScalingPlanOutcome DeleteScalingPlan(const Model::DeleteScalingPlanRequest& request) const;
/**
* <p>Deletes the specified scaling plan.</p> <p>Deleting a scaling plan deletes
* the underlying <a>ScalingInstruction</a> for all of the scalable resources that
* are covered by the plan.</p> <p>If the plan has launched resources or has
* scaling activities in progress, you must delete those resources
* separately.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DeleteScalingPlan">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteScalingPlanOutcomeCallable DeleteScalingPlanCallable(const Model::DeleteScalingPlanRequest& request) const;
/**
* <p>Deletes the specified scaling plan.</p> <p>Deleting a scaling plan deletes
* the underlying <a>ScalingInstruction</a> for all of the scalable resources that
* are covered by the plan.</p> <p>If the plan has launched resources or has
* scaling activities in progress, you must delete those resources
* separately.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DeleteScalingPlan">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteScalingPlanAsync(const Model::DeleteScalingPlanRequest& request, const DeleteScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes the scalable resources in the specified scaling plan.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlanResources">AWS
* API Reference</a></p>
*/
virtual Model::DescribeScalingPlanResourcesOutcome DescribeScalingPlanResources(const Model::DescribeScalingPlanResourcesRequest& request) const;
/**
* <p>Describes the scalable resources in the specified scaling plan.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlanResources">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeScalingPlanResourcesOutcomeCallable DescribeScalingPlanResourcesCallable(const Model::DescribeScalingPlanResourcesRequest& request) const;
/**
* <p>Describes the scalable resources in the specified scaling plan.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlanResources">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeScalingPlanResourcesAsync(const Model::DescribeScalingPlanResourcesRequest& request, const DescribeScalingPlanResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes one or more of your scaling plans.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlans">AWS
* API Reference</a></p>
*/
virtual Model::DescribeScalingPlansOutcome DescribeScalingPlans(const Model::DescribeScalingPlansRequest& request) const;
/**
* <p>Describes one or more of your scaling plans.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlans">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeScalingPlansOutcomeCallable DescribeScalingPlansCallable(const Model::DescribeScalingPlansRequest& request) const;
/**
* <p>Describes one or more of your scaling plans.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/DescribeScalingPlans">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeScalingPlansAsync(const Model::DescribeScalingPlansRequest& request, const DescribeScalingPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Retrieves the forecast data for a scalable resource.</p> <p>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. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/GetScalingPlanResourceForecastData">AWS
* API Reference</a></p>
*/
virtual Model::GetScalingPlanResourceForecastDataOutcome GetScalingPlanResourceForecastData(const Model::GetScalingPlanResourceForecastDataRequest& request) const;
/**
* <p>Retrieves the forecast data for a scalable resource.</p> <p>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. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/GetScalingPlanResourceForecastData">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetScalingPlanResourceForecastDataOutcomeCallable GetScalingPlanResourceForecastDataCallable(const Model::GetScalingPlanResourceForecastDataRequest& request) const;
/**
* <p>Retrieves the forecast data for a scalable resource.</p> <p>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. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/GetScalingPlanResourceForecastData">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetScalingPlanResourceForecastDataAsync(const Model::GetScalingPlanResourceForecastDataRequest& request, const GetScalingPlanResourceForecastDataResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Updates the specified scaling plan.</p> <p>You cannot update a scaling plan
* if it is in the process of being created, updated, or deleted.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/UpdateScalingPlan">AWS
* API Reference</a></p>
*/
virtual Model::UpdateScalingPlanOutcome UpdateScalingPlan(const Model::UpdateScalingPlanRequest& request) const;
/**
* <p>Updates the specified scaling plan.</p> <p>You cannot update a scaling plan
* if it is in the process of being created, updated, or deleted.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/UpdateScalingPlan">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateScalingPlanOutcomeCallable UpdateScalingPlanCallable(const Model::UpdateScalingPlanRequest& request) const;
/**
* <p>Updates the specified scaling plan.</p> <p>You cannot update a scaling plan
* if it is in the process of being created, updated, or deleted.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/UpdateScalingPlan">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateScalingPlanAsync(const Model::UpdateScalingPlanRequest& request, const UpdateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateScalingPlanAsyncHelper(const Model::CreateScalingPlanRequest& request, const CreateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DeleteScalingPlanAsyncHelper(const Model::DeleteScalingPlanRequest& request, const DeleteScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeScalingPlanResourcesAsyncHelper(const Model::DescribeScalingPlanResourcesRequest& request, const DescribeScalingPlanResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeScalingPlansAsyncHelper(const Model::DescribeScalingPlansRequest& request, const DescribeScalingPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetScalingPlanResourceForecastDataAsyncHelper(const Model::GetScalingPlanResourceForecastDataRequest& request, const GetScalingPlanResourceForecastDataResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UpdateScalingPlanAsyncHelper(const Model::UpdateScalingPlanRequest& request, const UpdateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace AutoScalingPlansEndpoint
{
AWS_AUTOSCALINGPLANS_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace AutoScalingPlansEndpoint
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_AUTOSCALINGPLANS_API AutoScalingPlansErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
namespace Aws
{
namespace AutoScalingPlans
{
enum class AutoScalingPlansErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
CONCURRENT_UPDATE= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
INTERNAL_SERVICE,
INVALID_NEXT_TOKEN,
LIMIT_EXCEEDED,
OBJECT_NOT_FOUND
};
class AWS_AUTOSCALINGPLANS_API AutoScalingPlansError : public Aws::Client::AWSError<AutoScalingPlansErrors>
{
public:
AutoScalingPlansError() {}
AutoScalingPlansError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<AutoScalingPlansErrors>(rhs) {}
AutoScalingPlansError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<AutoScalingPlansErrors>(rhs) {}
AutoScalingPlansError(const Aws::Client::AWSError<AutoScalingPlansErrors>& rhs) : Aws::Client::AWSError<AutoScalingPlansErrors>(rhs) {}
AutoScalingPlansError(Aws::Client::AWSError<AutoScalingPlansErrors>&& rhs) : Aws::Client::AWSError<AutoScalingPlansErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace AutoScalingPlansErrorMapper
{
AWS_AUTOSCALINGPLANS_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace AutoScalingPlans
{
class AWS_AUTOSCALINGPLANS_API AutoScalingPlansRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~AutoScalingPlansRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2018-01-06"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_AUTOSCALINGPLANS_EXPORTS
#define AWS_AUTOSCALINGPLANS_API __declspec(dllexport)
#else
#define AWS_AUTOSCALINGPLANS_API __declspec(dllimport)
#endif /* AWS_AUTOSCALINGPLANS_EXPORTS */
#else
#define AWS_AUTOSCALINGPLANS_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_AUTOSCALINGPLANS_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,134 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/TagFilter.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents an application source.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/ApplicationSource">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API ApplicationSource
{
public:
ApplicationSource();
ApplicationSource(Aws::Utils::Json::JsonView jsonValue);
ApplicationSource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline const Aws::String& GetCloudFormationStackARN() const{ return m_cloudFormationStackARN; }
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline bool CloudFormationStackARNHasBeenSet() const { return m_cloudFormationStackARNHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline void SetCloudFormationStackARN(const Aws::String& value) { m_cloudFormationStackARNHasBeenSet = true; m_cloudFormationStackARN = value; }
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline void SetCloudFormationStackARN(Aws::String&& value) { m_cloudFormationStackARNHasBeenSet = true; m_cloudFormationStackARN = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline void SetCloudFormationStackARN(const char* value) { m_cloudFormationStackARNHasBeenSet = true; m_cloudFormationStackARN.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline ApplicationSource& WithCloudFormationStackARN(const Aws::String& value) { SetCloudFormationStackARN(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline ApplicationSource& WithCloudFormationStackARN(Aws::String&& value) { SetCloudFormationStackARN(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of a AWS CloudFormation stack.</p>
*/
inline ApplicationSource& WithCloudFormationStackARN(const char* value) { SetCloudFormationStackARN(value); return *this;}
/**
* <p>A set of tags (up to 50).</p>
*/
inline const Aws::Vector<TagFilter>& GetTagFilters() const{ return m_tagFilters; }
/**
* <p>A set of tags (up to 50).</p>
*/
inline bool TagFiltersHasBeenSet() const { return m_tagFiltersHasBeenSet; }
/**
* <p>A set of tags (up to 50).</p>
*/
inline void SetTagFilters(const Aws::Vector<TagFilter>& value) { m_tagFiltersHasBeenSet = true; m_tagFilters = value; }
/**
* <p>A set of tags (up to 50).</p>
*/
inline void SetTagFilters(Aws::Vector<TagFilter>&& value) { m_tagFiltersHasBeenSet = true; m_tagFilters = std::move(value); }
/**
* <p>A set of tags (up to 50).</p>
*/
inline ApplicationSource& WithTagFilters(const Aws::Vector<TagFilter>& value) { SetTagFilters(value); return *this;}
/**
* <p>A set of tags (up to 50).</p>
*/
inline ApplicationSource& WithTagFilters(Aws::Vector<TagFilter>&& value) { SetTagFilters(std::move(value)); return *this;}
/**
* <p>A set of tags (up to 50).</p>
*/
inline ApplicationSource& AddTagFilters(const TagFilter& value) { m_tagFiltersHasBeenSet = true; m_tagFilters.push_back(value); return *this; }
/**
* <p>A set of tags (up to 50).</p>
*/
inline ApplicationSource& AddTagFilters(TagFilter&& value) { m_tagFiltersHasBeenSet = true; m_tagFilters.push_back(std::move(value)); return *this; }
private:
Aws::String m_cloudFormationStackARN;
bool m_cloudFormationStackARNHasBeenSet;
Aws::Vector<TagFilter> m_tagFilters;
bool m_tagFiltersHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,180 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/AutoScalingPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ApplicationSource.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/ScalingInstruction.h>
#include <utility>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
/**
*/
class AWS_AUTOSCALINGPLANS_API CreateScalingPlanRequest : public AutoScalingPlansRequest
{
public:
CreateScalingPlanRequest();
// 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 "CreateScalingPlan"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; }
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; }
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; }
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); }
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); }
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline CreateScalingPlanRequest& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;}
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline CreateScalingPlanRequest& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;}
/**
* <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or
* forward slashes.</p>
*/
inline CreateScalingPlanRequest& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;}
/**
* <p>A CloudFormation stack or set of tags. You can create one scaling plan per
* application source.</p>
*/
inline const ApplicationSource& GetApplicationSource() const{ return m_applicationSource; }
/**
* <p>A CloudFormation stack or set of tags. You can create one scaling plan per
* application source.</p>
*/
inline bool ApplicationSourceHasBeenSet() const { return m_applicationSourceHasBeenSet; }
/**
* <p>A CloudFormation stack or set of tags. You can create one scaling plan per
* application source.</p>
*/
inline void SetApplicationSource(const ApplicationSource& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = value; }
/**
* <p>A CloudFormation stack or set of tags. You can create one scaling plan per
* application source.</p>
*/
inline void SetApplicationSource(ApplicationSource&& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = std::move(value); }
/**
* <p>A CloudFormation stack or set of tags. You can create one scaling plan per
* application source.</p>
*/
inline CreateScalingPlanRequest& WithApplicationSource(const ApplicationSource& value) { SetApplicationSource(value); return *this;}
/**
* <p>A CloudFormation stack or set of tags. You can create one scaling plan per
* application source.</p>
*/
inline CreateScalingPlanRequest& WithApplicationSource(ApplicationSource&& value) { SetApplicationSource(std::move(value)); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline const Aws::Vector<ScalingInstruction>& GetScalingInstructions() const{ return m_scalingInstructions; }
/**
* <p>The scaling instructions.</p>
*/
inline bool ScalingInstructionsHasBeenSet() const { return m_scalingInstructionsHasBeenSet; }
/**
* <p>The scaling instructions.</p>
*/
inline void SetScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = value; }
/**
* <p>The scaling instructions.</p>
*/
inline void SetScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = std::move(value); }
/**
* <p>The scaling instructions.</p>
*/
inline CreateScalingPlanRequest& WithScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { SetScalingInstructions(value); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline CreateScalingPlanRequest& WithScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { SetScalingInstructions(std::move(value)); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline CreateScalingPlanRequest& AddScalingInstructions(const ScalingInstruction& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(value); return *this; }
/**
* <p>The scaling instructions.</p>
*/
inline CreateScalingPlanRequest& AddScalingInstructions(ScalingInstruction&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(std::move(value)); return *this; }
private:
Aws::String m_scalingPlanName;
bool m_scalingPlanNameHasBeenSet;
ApplicationSource m_applicationSource;
bool m_applicationSourceHasBeenSet;
Aws::Vector<ScalingInstruction> m_scalingInstructions;
bool m_scalingInstructionsHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
class AWS_AUTOSCALINGPLANS_API CreateScalingPlanResult
{
public:
CreateScalingPlanResult();
CreateScalingPlanResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
CreateScalingPlanResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The version number of the scaling plan. This value is always 1.</p>
* <p>Currently, you cannot specify multiple scaling plan versions.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan. This value is always 1.</p>
* <p>Currently, you cannot specify multiple scaling plan versions.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan. This value is always 1.</p>
* <p>Currently, you cannot specify multiple scaling plan versions.</p>
*/
inline CreateScalingPlanResult& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
private:
long long m_scalingPlanVersion;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,298 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/MetricStatistic.h>
#include <aws/autoscaling-plans/model/MetricDimension.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a CloudWatch metric of your choosing that can be used for
* predictive scaling. </p> <p>For predictive scaling to work with a customized
* load metric specification, AWS Auto Scaling needs access to the <code>Sum</code>
* and <code>Average</code> statistics that CloudWatch computes from metric data.
* Statistics are calculations used to aggregate data over specified time
* periods.</p> <p>When you choose a load metric, make sure that the required
* <code>Sum</code> and <code>Average</code> statistics for your metric are
* available in CloudWatch and that they provide relevant data for predictive
* scaling. The <code>Sum</code> statistic must represent the total load on the
* resource, and the <code>Average</code> statistic must represent the average load
* per capacity unit of the resource. For example, there is a metric that counts
* the number of requests processed by your Auto Scaling group. If the
* <code>Sum</code> statistic represents the total request count processed by the
* group, then the <code>Average</code> statistic for the specified metric must
* represent the average request count processed by each instance of the group.</p>
* <p>For information about terminology, available metrics, or how to publish new
* metrics, see <a
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html">Amazon
* CloudWatch Concepts</a> in the <i>Amazon CloudWatch User Guide</i>.
* </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/CustomizedLoadMetricSpecification">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API CustomizedLoadMetricSpecification
{
public:
CustomizedLoadMetricSpecification();
CustomizedLoadMetricSpecification(Aws::Utils::Json::JsonView jsonValue);
CustomizedLoadMetricSpecification& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the metric.</p>
*/
inline const Aws::String& GetMetricName() const{ return m_metricName; }
/**
* <p>The name of the metric.</p>
*/
inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
/**
* <p>The name of the metric.</p>
*/
inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
/**
* <p>The name of the metric.</p>
*/
inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
/**
* <p>The name of the metric.</p>
*/
inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
/**
* <p>The name of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
/**
* <p>The name of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
/**
* <p>The name of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithMetricName(const char* value) { SetMetricName(value); return *this;}
/**
* <p>The namespace of the metric.</p>
*/
inline const Aws::String& GetNamespace() const{ return m_namespace; }
/**
* <p>The namespace of the metric.</p>
*/
inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
/**
* <p>The namespace of the metric.</p>
*/
inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
/**
* <p>The namespace of the metric.</p>
*/
inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); }
/**
* <p>The namespace of the metric.</p>
*/
inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }
/**
* <p>The namespace of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}
/**
* <p>The namespace of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;}
/**
* <p>The namespace of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithNamespace(const char* value) { SetNamespace(value); return *this;}
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline const Aws::Vector<MetricDimension>& GetDimensions() const{ return m_dimensions; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline void SetDimensions(const Aws::Vector<MetricDimension>& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline void SetDimensions(Aws::Vector<MetricDimension>&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline CustomizedLoadMetricSpecification& WithDimensions(const Aws::Vector<MetricDimension>& value) { SetDimensions(value); return *this;}
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline CustomizedLoadMetricSpecification& WithDimensions(Aws::Vector<MetricDimension>&& value) { SetDimensions(std::move(value)); return *this;}
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline CustomizedLoadMetricSpecification& AddDimensions(const MetricDimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* load metric specification.</p>
*/
inline CustomizedLoadMetricSpecification& AddDimensions(MetricDimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; }
/**
* <p>The statistic of the metric. Currently, the value must always be
* <code>Sum</code>. </p>
*/
inline const MetricStatistic& GetStatistic() const{ return m_statistic; }
/**
* <p>The statistic of the metric. Currently, the value must always be
* <code>Sum</code>. </p>
*/
inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; }
/**
* <p>The statistic of the metric. Currently, the value must always be
* <code>Sum</code>. </p>
*/
inline void SetStatistic(const MetricStatistic& value) { m_statisticHasBeenSet = true; m_statistic = value; }
/**
* <p>The statistic of the metric. Currently, the value must always be
* <code>Sum</code>. </p>
*/
inline void SetStatistic(MetricStatistic&& value) { m_statisticHasBeenSet = true; m_statistic = std::move(value); }
/**
* <p>The statistic of the metric. Currently, the value must always be
* <code>Sum</code>. </p>
*/
inline CustomizedLoadMetricSpecification& WithStatistic(const MetricStatistic& value) { SetStatistic(value); return *this;}
/**
* <p>The statistic of the metric. Currently, the value must always be
* <code>Sum</code>. </p>
*/
inline CustomizedLoadMetricSpecification& WithStatistic(MetricStatistic&& value) { SetStatistic(std::move(value)); return *this;}
/**
* <p>The unit of the metric.</p>
*/
inline const Aws::String& GetUnit() const{ return m_unit; }
/**
* <p>The unit of the metric.</p>
*/
inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
/**
* <p>The unit of the metric.</p>
*/
inline void SetUnit(const Aws::String& value) { m_unitHasBeenSet = true; m_unit = value; }
/**
* <p>The unit of the metric.</p>
*/
inline void SetUnit(Aws::String&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); }
/**
* <p>The unit of the metric.</p>
*/
inline void SetUnit(const char* value) { m_unitHasBeenSet = true; m_unit.assign(value); }
/**
* <p>The unit of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithUnit(const Aws::String& value) { SetUnit(value); return *this;}
/**
* <p>The unit of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithUnit(Aws::String&& value) { SetUnit(std::move(value)); return *this;}
/**
* <p>The unit of the metric.</p>
*/
inline CustomizedLoadMetricSpecification& WithUnit(const char* value) { SetUnit(value); return *this;}
private:
Aws::String m_metricName;
bool m_metricNameHasBeenSet;
Aws::String m_namespace;
bool m_namespaceHasBeenSet;
Aws::Vector<MetricDimension> m_dimensions;
bool m_dimensionsHasBeenSet;
MetricStatistic m_statistic;
bool m_statisticHasBeenSet;
Aws::String m_unit;
bool m_unitHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,286 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/MetricStatistic.h>
#include <aws/autoscaling-plans/model/MetricDimension.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a CloudWatch metric of your choosing that can be used for dynamic
* scaling as part of a target tracking scaling policy. </p> <p>To create your
* customized scaling metric specification:</p> <ul> <li> <p>Add values for each
* required parameter from CloudWatch. You can use an existing metric, or a new
* metric that you create. To use your own metric, you must first publish the
* metric to CloudWatch. For more information, see <a
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html">Publish
* Custom Metrics</a> in the <i>Amazon CloudWatch User Guide</i>.</p> </li> <li>
* <p>Choose a metric that changes proportionally with capacity. The value of the
* metric should increase or decrease in inverse proportion to the number of
* capacity units. That is, the value of the metric should decrease when capacity
* increases. </p> </li> </ul> <p>For more information about CloudWatch, see <a
* href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html">Amazon
* CloudWatch Concepts</a>. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/CustomizedScalingMetricSpecification">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API CustomizedScalingMetricSpecification
{
public:
CustomizedScalingMetricSpecification();
CustomizedScalingMetricSpecification(Aws::Utils::Json::JsonView jsonValue);
CustomizedScalingMetricSpecification& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the metric.</p>
*/
inline const Aws::String& GetMetricName() const{ return m_metricName; }
/**
* <p>The name of the metric.</p>
*/
inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
/**
* <p>The name of the metric.</p>
*/
inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
/**
* <p>The name of the metric.</p>
*/
inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
/**
* <p>The name of the metric.</p>
*/
inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
/**
* <p>The name of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
/**
* <p>The name of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
/**
* <p>The name of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithMetricName(const char* value) { SetMetricName(value); return *this;}
/**
* <p>The namespace of the metric.</p>
*/
inline const Aws::String& GetNamespace() const{ return m_namespace; }
/**
* <p>The namespace of the metric.</p>
*/
inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
/**
* <p>The namespace of the metric.</p>
*/
inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
/**
* <p>The namespace of the metric.</p>
*/
inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); }
/**
* <p>The namespace of the metric.</p>
*/
inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }
/**
* <p>The namespace of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}
/**
* <p>The namespace of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;}
/**
* <p>The namespace of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithNamespace(const char* value) { SetNamespace(value); return *this;}
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline const Aws::Vector<MetricDimension>& GetDimensions() const{ return m_dimensions; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline void SetDimensions(const Aws::Vector<MetricDimension>& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline void SetDimensions(Aws::Vector<MetricDimension>&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline CustomizedScalingMetricSpecification& WithDimensions(const Aws::Vector<MetricDimension>& value) { SetDimensions(value); return *this;}
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline CustomizedScalingMetricSpecification& WithDimensions(Aws::Vector<MetricDimension>&& value) { SetDimensions(std::move(value)); return *this;}
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline CustomizedScalingMetricSpecification& AddDimensions(const MetricDimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; }
/**
* <p>The dimensions of the metric.</p> <p>Conditional: If you published your
* metric with dimensions, you must specify the same dimensions in your customized
* scaling metric specification.</p>
*/
inline CustomizedScalingMetricSpecification& AddDimensions(MetricDimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; }
/**
* <p>The statistic of the metric.</p>
*/
inline const MetricStatistic& GetStatistic() const{ return m_statistic; }
/**
* <p>The statistic of the metric.</p>
*/
inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; }
/**
* <p>The statistic of the metric.</p>
*/
inline void SetStatistic(const MetricStatistic& value) { m_statisticHasBeenSet = true; m_statistic = value; }
/**
* <p>The statistic of the metric.</p>
*/
inline void SetStatistic(MetricStatistic&& value) { m_statisticHasBeenSet = true; m_statistic = std::move(value); }
/**
* <p>The statistic of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithStatistic(const MetricStatistic& value) { SetStatistic(value); return *this;}
/**
* <p>The statistic of the metric.</p>
*/
inline CustomizedScalingMetricSpecification& WithStatistic(MetricStatistic&& value) { SetStatistic(std::move(value)); return *this;}
/**
* <p>The unit of the metric. </p>
*/
inline const Aws::String& GetUnit() const{ return m_unit; }
/**
* <p>The unit of the metric. </p>
*/
inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
/**
* <p>The unit of the metric. </p>
*/
inline void SetUnit(const Aws::String& value) { m_unitHasBeenSet = true; m_unit = value; }
/**
* <p>The unit of the metric. </p>
*/
inline void SetUnit(Aws::String&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); }
/**
* <p>The unit of the metric. </p>
*/
inline void SetUnit(const char* value) { m_unitHasBeenSet = true; m_unit.assign(value); }
/**
* <p>The unit of the metric. </p>
*/
inline CustomizedScalingMetricSpecification& WithUnit(const Aws::String& value) { SetUnit(value); return *this;}
/**
* <p>The unit of the metric. </p>
*/
inline CustomizedScalingMetricSpecification& WithUnit(Aws::String&& value) { SetUnit(std::move(value)); return *this;}
/**
* <p>The unit of the metric. </p>
*/
inline CustomizedScalingMetricSpecification& WithUnit(const char* value) { SetUnit(value); return *this;}
private:
Aws::String m_metricName;
bool m_metricNameHasBeenSet;
Aws::String m_namespace;
bool m_namespaceHasBeenSet;
Aws::Vector<MetricDimension> m_dimensions;
bool m_dimensionsHasBeenSet;
MetricStatistic m_statistic;
bool m_statisticHasBeenSet;
Aws::String m_unit;
bool m_unitHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,103 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a single value in the forecast data used for predictive
* scaling.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/Datapoint">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API Datapoint
{
public:
Datapoint();
Datapoint(Aws::Utils::Json::JsonView jsonValue);
Datapoint& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The time stamp for the data point in UTC format.</p>
*/
inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; }
/**
* <p>The time stamp for the data point in UTC format.</p>
*/
inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
/**
* <p>The time stamp for the data point in UTC format.</p>
*/
inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
/**
* <p>The time stamp for the data point in UTC format.</p>
*/
inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); }
/**
* <p>The time stamp for the data point in UTC format.</p>
*/
inline Datapoint& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;}
/**
* <p>The time stamp for the data point in UTC format.</p>
*/
inline Datapoint& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;}
/**
* <p>The value of the data point.</p>
*/
inline double GetValue() const{ return m_value; }
/**
* <p>The value of the data point.</p>
*/
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
/**
* <p>The value of the data point.</p>
*/
inline void SetValue(double value) { m_valueHasBeenSet = true; m_value = value; }
/**
* <p>The value of the data point.</p>
*/
inline Datapoint& WithValue(double value) { SetValue(value); return *this;}
private:
Aws::Utils::DateTime m_timestamp;
bool m_timestampHasBeenSet;
double m_value;
bool m_valueHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,109 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/AutoScalingPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
/**
*/
class AWS_AUTOSCALINGPLANS_API DeleteScalingPlanRequest : public AutoScalingPlansRequest
{
public:
DeleteScalingPlanRequest();
// 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 "DeleteScalingPlan"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The name of the scaling plan.</p>
*/
inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; }
/**
* <p>The name of the scaling plan.</p>
*/
inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline DeleteScalingPlanRequest& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline DeleteScalingPlanRequest& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline DeleteScalingPlanRequest& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;}
/**
* <p>The version number of the scaling plan.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline bool ScalingPlanVersionHasBeenSet() const { return m_scalingPlanVersionHasBeenSet; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersionHasBeenSet = true; m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline DeleteScalingPlanRequest& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
private:
Aws::String m_scalingPlanName;
bool m_scalingPlanNameHasBeenSet;
long long m_scalingPlanVersion;
bool m_scalingPlanVersionHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
class AWS_AUTOSCALINGPLANS_API DeleteScalingPlanResult
{
public:
DeleteScalingPlanResult();
DeleteScalingPlanResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DeleteScalingPlanResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,181 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/AutoScalingPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
/**
*/
class AWS_AUTOSCALINGPLANS_API DescribeScalingPlanResourcesRequest : public AutoScalingPlansRequest
{
public:
DescribeScalingPlanResourcesRequest();
// 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 "DescribeScalingPlanResources"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The name of the scaling plan.</p>
*/
inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; }
/**
* <p>The name of the scaling plan.</p>
*/
inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;}
/**
* <p>The version number of the scaling plan.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline bool ScalingPlanVersionHasBeenSet() const { return m_scalingPlanVersionHasBeenSet; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersionHasBeenSet = true; m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
/**
* <p>The maximum number of scalable resources to return. The value must be between
* 1 and 50. The default value is 50.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of scalable resources to return. The value must be between
* 1 and 50. The default value is 50.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of scalable resources to return. The value must be between
* 1 and 50. The default value is 50.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of scalable resources to return. The value must be between
* 1 and 50. The default value is 50.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>The token for the next set of results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token for the next set of results.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The token for the next set of results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The token for the next set of results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The token for the next set of results.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The token for the next set of results.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token for the next set of results.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token for the next set of results.</p>
*/
inline DescribeScalingPlanResourcesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::String m_scalingPlanName;
bool m_scalingPlanNameHasBeenSet;
long long m_scalingPlanVersion;
bool m_scalingPlanVersionHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ScalingPlanResource.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
class AWS_AUTOSCALINGPLANS_API DescribeScalingPlanResourcesResult
{
public:
DescribeScalingPlanResourcesResult();
DescribeScalingPlanResourcesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeScalingPlanResourcesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Information about the scalable resources.</p>
*/
inline const Aws::Vector<ScalingPlanResource>& GetScalingPlanResources() const{ return m_scalingPlanResources; }
/**
* <p>Information about the scalable resources.</p>
*/
inline void SetScalingPlanResources(const Aws::Vector<ScalingPlanResource>& value) { m_scalingPlanResources = value; }
/**
* <p>Information about the scalable resources.</p>
*/
inline void SetScalingPlanResources(Aws::Vector<ScalingPlanResource>&& value) { m_scalingPlanResources = std::move(value); }
/**
* <p>Information about the scalable resources.</p>
*/
inline DescribeScalingPlanResourcesResult& WithScalingPlanResources(const Aws::Vector<ScalingPlanResource>& value) { SetScalingPlanResources(value); return *this;}
/**
* <p>Information about the scalable resources.</p>
*/
inline DescribeScalingPlanResourcesResult& WithScalingPlanResources(Aws::Vector<ScalingPlanResource>&& value) { SetScalingPlanResources(std::move(value)); return *this;}
/**
* <p>Information about the scalable resources.</p>
*/
inline DescribeScalingPlanResourcesResult& AddScalingPlanResources(const ScalingPlanResource& value) { m_scalingPlanResources.push_back(value); return *this; }
/**
* <p>Information about the scalable resources.</p>
*/
inline DescribeScalingPlanResourcesResult& AddScalingPlanResources(ScalingPlanResource&& value) { m_scalingPlanResources.push_back(std::move(value)); return *this; }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline DescribeScalingPlanResourcesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline DescribeScalingPlanResourcesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline DescribeScalingPlanResourcesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<ScalingPlanResource> m_scalingPlanResources;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,253 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/AutoScalingPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ApplicationSource.h>
#include <utility>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
/**
*/
class AWS_AUTOSCALINGPLANS_API DescribeScalingPlansRequest : public AutoScalingPlansRequest
{
public:
DescribeScalingPlansRequest();
// 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 "DescribeScalingPlans"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline const Aws::Vector<Aws::String>& GetScalingPlanNames() const{ return m_scalingPlanNames; }
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline bool ScalingPlanNamesHasBeenSet() const { return m_scalingPlanNamesHasBeenSet; }
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline void SetScalingPlanNames(const Aws::Vector<Aws::String>& value) { m_scalingPlanNamesHasBeenSet = true; m_scalingPlanNames = value; }
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline void SetScalingPlanNames(Aws::Vector<Aws::String>&& value) { m_scalingPlanNamesHasBeenSet = true; m_scalingPlanNames = std::move(value); }
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline DescribeScalingPlansRequest& WithScalingPlanNames(const Aws::Vector<Aws::String>& value) { SetScalingPlanNames(value); return *this;}
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline DescribeScalingPlansRequest& WithScalingPlanNames(Aws::Vector<Aws::String>&& value) { SetScalingPlanNames(std::move(value)); return *this;}
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline DescribeScalingPlansRequest& AddScalingPlanNames(const Aws::String& value) { m_scalingPlanNamesHasBeenSet = true; m_scalingPlanNames.push_back(value); return *this; }
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline DescribeScalingPlansRequest& AddScalingPlanNames(Aws::String&& value) { m_scalingPlanNamesHasBeenSet = true; m_scalingPlanNames.push_back(std::move(value)); return *this; }
/**
* <p>The names of the scaling plans (up to 10). If you specify application
* sources, you cannot specify scaling plan names.</p>
*/
inline DescribeScalingPlansRequest& AddScalingPlanNames(const char* value) { m_scalingPlanNamesHasBeenSet = true; m_scalingPlanNames.push_back(value); return *this; }
/**
* <p>The version number of the scaling plan. If you specify a scaling plan
* version, you must also specify a scaling plan name.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan. If you specify a scaling plan
* version, you must also specify a scaling plan name.</p>
*/
inline bool ScalingPlanVersionHasBeenSet() const { return m_scalingPlanVersionHasBeenSet; }
/**
* <p>The version number of the scaling plan. If you specify a scaling plan
* version, you must also specify a scaling plan name.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersionHasBeenSet = true; m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan. If you specify a scaling plan
* version, you must also specify a scaling plan name.</p>
*/
inline DescribeScalingPlansRequest& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline const Aws::Vector<ApplicationSource>& GetApplicationSources() const{ return m_applicationSources; }
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline bool ApplicationSourcesHasBeenSet() const { return m_applicationSourcesHasBeenSet; }
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline void SetApplicationSources(const Aws::Vector<ApplicationSource>& value) { m_applicationSourcesHasBeenSet = true; m_applicationSources = value; }
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline void SetApplicationSources(Aws::Vector<ApplicationSource>&& value) { m_applicationSourcesHasBeenSet = true; m_applicationSources = std::move(value); }
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline DescribeScalingPlansRequest& WithApplicationSources(const Aws::Vector<ApplicationSource>& value) { SetApplicationSources(value); return *this;}
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline DescribeScalingPlansRequest& WithApplicationSources(Aws::Vector<ApplicationSource>&& value) { SetApplicationSources(std::move(value)); return *this;}
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline DescribeScalingPlansRequest& AddApplicationSources(const ApplicationSource& value) { m_applicationSourcesHasBeenSet = true; m_applicationSources.push_back(value); return *this; }
/**
* <p>The sources for the applications (up to 10). If you specify scaling plan
* names, you cannot specify application sources.</p>
*/
inline DescribeScalingPlansRequest& AddApplicationSources(ApplicationSource&& value) { m_applicationSourcesHasBeenSet = true; m_applicationSources.push_back(std::move(value)); return *this; }
/**
* <p>The maximum number of scalable resources to return. This value can be between
* 1 and 50. The default value is 50.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of scalable resources to return. This value can be between
* 1 and 50. The default value is 50.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of scalable resources to return. This value can be between
* 1 and 50. The default value is 50.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of scalable resources to return. This value can be between
* 1 and 50. The default value is 50.</p>
*/
inline DescribeScalingPlansRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>The token for the next set of results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token for the next set of results.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The token for the next set of results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The token for the next set of results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The token for the next set of results.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The token for the next set of results.</p>
*/
inline DescribeScalingPlansRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token for the next set of results.</p>
*/
inline DescribeScalingPlansRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token for the next set of results.</p>
*/
inline DescribeScalingPlansRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<Aws::String> m_scalingPlanNames;
bool m_scalingPlanNamesHasBeenSet;
long long m_scalingPlanVersion;
bool m_scalingPlanVersionHasBeenSet;
Aws::Vector<ApplicationSource> m_applicationSources;
bool m_applicationSourcesHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ScalingPlan.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
class AWS_AUTOSCALINGPLANS_API DescribeScalingPlansResult
{
public:
DescribeScalingPlansResult();
DescribeScalingPlansResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeScalingPlansResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Information about the scaling plans.</p>
*/
inline const Aws::Vector<ScalingPlan>& GetScalingPlans() const{ return m_scalingPlans; }
/**
* <p>Information about the scaling plans.</p>
*/
inline void SetScalingPlans(const Aws::Vector<ScalingPlan>& value) { m_scalingPlans = value; }
/**
* <p>Information about the scaling plans.</p>
*/
inline void SetScalingPlans(Aws::Vector<ScalingPlan>&& value) { m_scalingPlans = std::move(value); }
/**
* <p>Information about the scaling plans.</p>
*/
inline DescribeScalingPlansResult& WithScalingPlans(const Aws::Vector<ScalingPlan>& value) { SetScalingPlans(value); return *this;}
/**
* <p>Information about the scaling plans.</p>
*/
inline DescribeScalingPlansResult& WithScalingPlans(Aws::Vector<ScalingPlan>&& value) { SetScalingPlans(std::move(value)); return *this;}
/**
* <p>Information about the scaling plans.</p>
*/
inline DescribeScalingPlansResult& AddScalingPlans(const ScalingPlan& value) { m_scalingPlans.push_back(value); return *this; }
/**
* <p>Information about the scaling plans.</p>
*/
inline DescribeScalingPlansResult& AddScalingPlans(ScalingPlan&& value) { m_scalingPlans.push_back(std::move(value)); return *this; }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline DescribeScalingPlansResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline DescribeScalingPlansResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token required to get the next set of results. This value is
* <code>null</code> if there are no more results to return.</p>
*/
inline DescribeScalingPlansResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<ScalingPlan> m_scalingPlans;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class ForecastDataType
{
NOT_SET,
CapacityForecast,
LoadForecast,
ScheduledActionMinCapacity,
ScheduledActionMaxCapacity
};
namespace ForecastDataTypeMapper
{
AWS_AUTOSCALINGPLANS_API ForecastDataType GetForecastDataTypeForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForForecastDataType(ForecastDataType value);
} // namespace ForecastDataTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,539 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/AutoScalingPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ServiceNamespace.h>
#include <aws/autoscaling-plans/model/ScalableDimension.h>
#include <aws/autoscaling-plans/model/ForecastDataType.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
/**
*/
class AWS_AUTOSCALINGPLANS_API GetScalingPlanResourceForecastDataRequest : public AutoScalingPlansRequest
{
public:
GetScalingPlanResourceForecastDataRequest();
// 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 "GetScalingPlanResourceForecastData"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The name of the scaling plan.</p>
*/
inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; }
/**
* <p>The name of the scaling plan.</p>
*/
inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;}
/**
* <p>The version number of the scaling plan.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline bool ScalingPlanVersionHasBeenSet() const { return m_scalingPlanVersionHasBeenSet; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersionHasBeenSet = true; m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
/**
* <p>The namespace of the AWS service.</p>
*/
inline const ServiceNamespace& GetServiceNamespace() const{ return m_serviceNamespace; }
/**
* <p>The namespace of the AWS service.</p>
*/
inline bool ServiceNamespaceHasBeenSet() const { return m_serviceNamespaceHasBeenSet; }
/**
* <p>The namespace of the AWS service.</p>
*/
inline void SetServiceNamespace(const ServiceNamespace& value) { m_serviceNamespaceHasBeenSet = true; m_serviceNamespace = value; }
/**
* <p>The namespace of the AWS service.</p>
*/
inline void SetServiceNamespace(ServiceNamespace&& value) { m_serviceNamespaceHasBeenSet = true; m_serviceNamespace = std::move(value); }
/**
* <p>The namespace of the AWS service.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithServiceNamespace(const ServiceNamespace& value) { SetServiceNamespace(value); return *this;}
/**
* <p>The namespace of the AWS service.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithServiceNamespace(ServiceNamespace&& value) { SetServiceNamespace(std::move(value)); return *this;}
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline const Aws::String& GetResourceId() const{ return m_resourceId; }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline GetScalingPlanResourceForecastDataRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline GetScalingPlanResourceForecastDataRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;}
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier. </p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline GetScalingPlanResourceForecastDataRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;}
/**
* <p>The scalable dimension for the resource.</p>
*/
inline const ScalableDimension& GetScalableDimension() const{ return m_scalableDimension; }
/**
* <p>The scalable dimension for the resource.</p>
*/
inline bool ScalableDimensionHasBeenSet() const { return m_scalableDimensionHasBeenSet; }
/**
* <p>The scalable dimension for the resource.</p>
*/
inline void SetScalableDimension(const ScalableDimension& value) { m_scalableDimensionHasBeenSet = true; m_scalableDimension = value; }
/**
* <p>The scalable dimension for the resource.</p>
*/
inline void SetScalableDimension(ScalableDimension&& value) { m_scalableDimensionHasBeenSet = true; m_scalableDimension = std::move(value); }
/**
* <p>The scalable dimension for the resource.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithScalableDimension(const ScalableDimension& value) { SetScalableDimension(value); return *this;}
/**
* <p>The scalable dimension for the resource.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithScalableDimension(ScalableDimension&& value) { SetScalableDimension(std::move(value)); return *this;}
/**
* <p>The type of forecast data to get.</p> <ul> <li> <p>
* <code>LoadForecast</code>: The load metric forecast. </p> </li> <li> <p>
* <code>CapacityForecast</code>: The capacity forecast. </p> </li> <li> <p>
* <code>ScheduledActionMinCapacity</code>: The minimum capacity for each scheduled
* scaling action. This data is calculated as the larger of two values: the
* capacity forecast or the minimum capacity in the scaling instruction.</p> </li>
* <li> <p> <code>ScheduledActionMaxCapacity</code>: The maximum capacity for each
* scheduled scaling action. The calculation used is determined by the predictive
* scaling maximum capacity behavior setting in the scaling instruction.</p> </li>
* </ul>
*/
inline const ForecastDataType& GetForecastDataType() const{ return m_forecastDataType; }
/**
* <p>The type of forecast data to get.</p> <ul> <li> <p>
* <code>LoadForecast</code>: The load metric forecast. </p> </li> <li> <p>
* <code>CapacityForecast</code>: The capacity forecast. </p> </li> <li> <p>
* <code>ScheduledActionMinCapacity</code>: The minimum capacity for each scheduled
* scaling action. This data is calculated as the larger of two values: the
* capacity forecast or the minimum capacity in the scaling instruction.</p> </li>
* <li> <p> <code>ScheduledActionMaxCapacity</code>: The maximum capacity for each
* scheduled scaling action. The calculation used is determined by the predictive
* scaling maximum capacity behavior setting in the scaling instruction.</p> </li>
* </ul>
*/
inline bool ForecastDataTypeHasBeenSet() const { return m_forecastDataTypeHasBeenSet; }
/**
* <p>The type of forecast data to get.</p> <ul> <li> <p>
* <code>LoadForecast</code>: The load metric forecast. </p> </li> <li> <p>
* <code>CapacityForecast</code>: The capacity forecast. </p> </li> <li> <p>
* <code>ScheduledActionMinCapacity</code>: The minimum capacity for each scheduled
* scaling action. This data is calculated as the larger of two values: the
* capacity forecast or the minimum capacity in the scaling instruction.</p> </li>
* <li> <p> <code>ScheduledActionMaxCapacity</code>: The maximum capacity for each
* scheduled scaling action. The calculation used is determined by the predictive
* scaling maximum capacity behavior setting in the scaling instruction.</p> </li>
* </ul>
*/
inline void SetForecastDataType(const ForecastDataType& value) { m_forecastDataTypeHasBeenSet = true; m_forecastDataType = value; }
/**
* <p>The type of forecast data to get.</p> <ul> <li> <p>
* <code>LoadForecast</code>: The load metric forecast. </p> </li> <li> <p>
* <code>CapacityForecast</code>: The capacity forecast. </p> </li> <li> <p>
* <code>ScheduledActionMinCapacity</code>: The minimum capacity for each scheduled
* scaling action. This data is calculated as the larger of two values: the
* capacity forecast or the minimum capacity in the scaling instruction.</p> </li>
* <li> <p> <code>ScheduledActionMaxCapacity</code>: The maximum capacity for each
* scheduled scaling action. The calculation used is determined by the predictive
* scaling maximum capacity behavior setting in the scaling instruction.</p> </li>
* </ul>
*/
inline void SetForecastDataType(ForecastDataType&& value) { m_forecastDataTypeHasBeenSet = true; m_forecastDataType = std::move(value); }
/**
* <p>The type of forecast data to get.</p> <ul> <li> <p>
* <code>LoadForecast</code>: The load metric forecast. </p> </li> <li> <p>
* <code>CapacityForecast</code>: The capacity forecast. </p> </li> <li> <p>
* <code>ScheduledActionMinCapacity</code>: The minimum capacity for each scheduled
* scaling action. This data is calculated as the larger of two values: the
* capacity forecast or the minimum capacity in the scaling instruction.</p> </li>
* <li> <p> <code>ScheduledActionMaxCapacity</code>: The maximum capacity for each
* scheduled scaling action. The calculation used is determined by the predictive
* scaling maximum capacity behavior setting in the scaling instruction.</p> </li>
* </ul>
*/
inline GetScalingPlanResourceForecastDataRequest& WithForecastDataType(const ForecastDataType& value) { SetForecastDataType(value); return *this;}
/**
* <p>The type of forecast data to get.</p> <ul> <li> <p>
* <code>LoadForecast</code>: The load metric forecast. </p> </li> <li> <p>
* <code>CapacityForecast</code>: The capacity forecast. </p> </li> <li> <p>
* <code>ScheduledActionMinCapacity</code>: The minimum capacity for each scheduled
* scaling action. This data is calculated as the larger of two values: the
* capacity forecast or the minimum capacity in the scaling instruction.</p> </li>
* <li> <p> <code>ScheduledActionMaxCapacity</code>: The maximum capacity for each
* scheduled scaling action. The calculation used is determined by the predictive
* scaling maximum capacity behavior setting in the scaling instruction.</p> </li>
* </ul>
*/
inline GetScalingPlanResourceForecastDataRequest& WithForecastDataType(ForecastDataType&& value) { SetForecastDataType(std::move(value)); return *this;}
/**
* <p>The inclusive start time of the time range for the forecast data to get. The
* date and time can be at most 56 days before the current date and time. </p>
*/
inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; }
/**
* <p>The inclusive start time of the time range for the forecast data to get. The
* date and time can be at most 56 days before the current date and time. </p>
*/
inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
/**
* <p>The inclusive start time of the time range for the forecast data to get. The
* date and time can be at most 56 days before the current date and time. </p>
*/
inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; }
/**
* <p>The inclusive start time of the time range for the forecast data to get. The
* date and time can be at most 56 days before the current date and time. </p>
*/
inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); }
/**
* <p>The inclusive start time of the time range for the forecast data to get. The
* date and time can be at most 56 days before the current date and time. </p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;}
/**
* <p>The inclusive start time of the time range for the forecast data to get. The
* date and time can be at most 56 days before the current date and time. </p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;}
/**
* <p>The exclusive end time of the time range for the forecast data to get. The
* maximum time duration between the start and end time is seven days. </p>
* <p>Although this parameter can accept a date and time that is more than two days
* in the future, the availability of forecast data has limits. AWS Auto Scaling
* only issues forecasts for periods of two days in advance.</p>
*/
inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; }
/**
* <p>The exclusive end time of the time range for the forecast data to get. The
* maximum time duration between the start and end time is seven days. </p>
* <p>Although this parameter can accept a date and time that is more than two days
* in the future, the availability of forecast data has limits. AWS Auto Scaling
* only issues forecasts for periods of two days in advance.</p>
*/
inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
/**
* <p>The exclusive end time of the time range for the forecast data to get. The
* maximum time duration between the start and end time is seven days. </p>
* <p>Although this parameter can accept a date and time that is more than two days
* in the future, the availability of forecast data has limits. AWS Auto Scaling
* only issues forecasts for periods of two days in advance.</p>
*/
inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; }
/**
* <p>The exclusive end time of the time range for the forecast data to get. The
* maximum time duration between the start and end time is seven days. </p>
* <p>Although this parameter can accept a date and time that is more than two days
* in the future, the availability of forecast data has limits. AWS Auto Scaling
* only issues forecasts for periods of two days in advance.</p>
*/
inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); }
/**
* <p>The exclusive end time of the time range for the forecast data to get. The
* maximum time duration between the start and end time is seven days. </p>
* <p>Although this parameter can accept a date and time that is more than two days
* in the future, the availability of forecast data has limits. AWS Auto Scaling
* only issues forecasts for periods of two days in advance.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;}
/**
* <p>The exclusive end time of the time range for the forecast data to get. The
* maximum time duration between the start and end time is seven days. </p>
* <p>Although this parameter can accept a date and time that is more than two days
* in the future, the availability of forecast data has limits. AWS Auto Scaling
* only issues forecasts for periods of two days in advance.</p>
*/
inline GetScalingPlanResourceForecastDataRequest& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;}
private:
Aws::String m_scalingPlanName;
bool m_scalingPlanNameHasBeenSet;
long long m_scalingPlanVersion;
bool m_scalingPlanVersionHasBeenSet;
ServiceNamespace m_serviceNamespace;
bool m_serviceNamespaceHasBeenSet;
Aws::String m_resourceId;
bool m_resourceIdHasBeenSet;
ScalableDimension m_scalableDimension;
bool m_scalableDimensionHasBeenSet;
ForecastDataType m_forecastDataType;
bool m_forecastDataTypeHasBeenSet;
Aws::Utils::DateTime m_startTime;
bool m_startTimeHasBeenSet;
Aws::Utils::DateTime m_endTime;
bool m_endTimeHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/Datapoint.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
class AWS_AUTOSCALINGPLANS_API GetScalingPlanResourceForecastDataResult
{
public:
GetScalingPlanResourceForecastDataResult();
GetScalingPlanResourceForecastDataResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetScalingPlanResourceForecastDataResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The data points to return.</p>
*/
inline const Aws::Vector<Datapoint>& GetDatapoints() const{ return m_datapoints; }
/**
* <p>The data points to return.</p>
*/
inline void SetDatapoints(const Aws::Vector<Datapoint>& value) { m_datapoints = value; }
/**
* <p>The data points to return.</p>
*/
inline void SetDatapoints(Aws::Vector<Datapoint>&& value) { m_datapoints = std::move(value); }
/**
* <p>The data points to return.</p>
*/
inline GetScalingPlanResourceForecastDataResult& WithDatapoints(const Aws::Vector<Datapoint>& value) { SetDatapoints(value); return *this;}
/**
* <p>The data points to return.</p>
*/
inline GetScalingPlanResourceForecastDataResult& WithDatapoints(Aws::Vector<Datapoint>&& value) { SetDatapoints(std::move(value)); return *this;}
/**
* <p>The data points to return.</p>
*/
inline GetScalingPlanResourceForecastDataResult& AddDatapoints(const Datapoint& value) { m_datapoints.push_back(value); return *this; }
/**
* <p>The data points to return.</p>
*/
inline GetScalingPlanResourceForecastDataResult& AddDatapoints(Datapoint&& value) { m_datapoints.push_back(std::move(value)); return *this; }
private:
Aws::Vector<Datapoint> m_datapoints;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class LoadMetricType
{
NOT_SET,
ASGTotalCPUUtilization,
ASGTotalNetworkIn,
ASGTotalNetworkOut,
ALBTargetGroupRequestCount
};
namespace LoadMetricTypeMapper
{
AWS_AUTOSCALINGPLANS_API LoadMetricType GetLoadMetricTypeForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForLoadMetricType(LoadMetricType value);
} // namespace LoadMetricTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,132 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a dimension for a customized metric.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/MetricDimension">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API MetricDimension
{
public:
MetricDimension();
MetricDimension(Aws::Utils::Json::JsonView jsonValue);
MetricDimension& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the dimension.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the dimension.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the dimension.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the dimension.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the dimension.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the dimension.</p>
*/
inline MetricDimension& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the dimension.</p>
*/
inline MetricDimension& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the dimension.</p>
*/
inline MetricDimension& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>The value of the dimension.</p>
*/
inline const Aws::String& GetValue() const{ return m_value; }
/**
* <p>The value of the dimension.</p>
*/
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
/**
* <p>The value of the dimension.</p>
*/
inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
/**
* <p>The value of the dimension.</p>
*/
inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
/**
* <p>The value of the dimension.</p>
*/
inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
/**
* <p>The value of the dimension.</p>
*/
inline MetricDimension& WithValue(const Aws::String& value) { SetValue(value); return *this;}
/**
* <p>The value of the dimension.</p>
*/
inline MetricDimension& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
/**
* <p>The value of the dimension.</p>
*/
inline MetricDimension& WithValue(const char* value) { SetValue(value); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::String m_value;
bool m_valueHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class MetricStatistic
{
NOT_SET,
Average,
Minimum,
Maximum,
SampleCount,
Sum
};
namespace MetricStatisticMapper
{
AWS_AUTOSCALINGPLANS_API MetricStatistic GetMetricStatisticForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForMetricStatistic(MetricStatistic value);
} // namespace MetricStatisticMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,30 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class PolicyType
{
NOT_SET,
TargetTrackingScaling
};
namespace PolicyTypeMapper
{
AWS_AUTOSCALINGPLANS_API PolicyType GetPolicyTypeForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForPolicyType(PolicyType value);
} // namespace PolicyTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,188 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/model/LoadMetricType.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a predefined metric that can be used for predictive scaling.
* </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/PredefinedLoadMetricSpecification">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API PredefinedLoadMetricSpecification
{
public:
PredefinedLoadMetricSpecification();
PredefinedLoadMetricSpecification(Aws::Utils::Json::JsonView jsonValue);
PredefinedLoadMetricSpecification& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The metric type.</p>
*/
inline const LoadMetricType& GetPredefinedLoadMetricType() const{ return m_predefinedLoadMetricType; }
/**
* <p>The metric type.</p>
*/
inline bool PredefinedLoadMetricTypeHasBeenSet() const { return m_predefinedLoadMetricTypeHasBeenSet; }
/**
* <p>The metric type.</p>
*/
inline void SetPredefinedLoadMetricType(const LoadMetricType& value) { m_predefinedLoadMetricTypeHasBeenSet = true; m_predefinedLoadMetricType = value; }
/**
* <p>The metric type.</p>
*/
inline void SetPredefinedLoadMetricType(LoadMetricType&& value) { m_predefinedLoadMetricTypeHasBeenSet = true; m_predefinedLoadMetricType = std::move(value); }
/**
* <p>The metric type.</p>
*/
inline PredefinedLoadMetricSpecification& WithPredefinedLoadMetricType(const LoadMetricType& value) { SetPredefinedLoadMetricType(value); return *this;}
/**
* <p>The metric type.</p>
*/
inline PredefinedLoadMetricSpecification& WithPredefinedLoadMetricType(LoadMetricType&& value) { SetPredefinedLoadMetricType(std::move(value)); return *this;}
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline const Aws::String& GetResourceLabel() const{ return m_resourceLabel; }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline bool ResourceLabelHasBeenSet() const { return m_resourceLabelHasBeenSet; }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline void SetResourceLabel(const Aws::String& value) { m_resourceLabelHasBeenSet = true; m_resourceLabel = value; }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline void SetResourceLabel(Aws::String&& value) { m_resourceLabelHasBeenSet = true; m_resourceLabel = std::move(value); }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline void SetResourceLabel(const char* value) { m_resourceLabelHasBeenSet = true; m_resourceLabel.assign(value); }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline PredefinedLoadMetricSpecification& WithResourceLabel(const Aws::String& value) { SetResourceLabel(value); return *this;}
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline PredefinedLoadMetricSpecification& WithResourceLabel(Aws::String&& value) { SetResourceLabel(std::move(value)); return *this;}
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline PredefinedLoadMetricSpecification& WithResourceLabel(const char* value) { SetResourceLabel(value); return *this;}
private:
LoadMetricType m_predefinedLoadMetricType;
bool m_predefinedLoadMetricTypeHasBeenSet;
Aws::String m_resourceLabel;
bool m_resourceLabelHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,194 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/model/ScalingMetricType.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a predefined metric that can be used for dynamic scaling as part
* of a target tracking scaling policy.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/PredefinedScalingMetricSpecification">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API PredefinedScalingMetricSpecification
{
public:
PredefinedScalingMetricSpecification();
PredefinedScalingMetricSpecification(Aws::Utils::Json::JsonView jsonValue);
PredefinedScalingMetricSpecification& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
* applies only to Auto Scaling groups, Spot Fleet requests, and ECS services.</p>
*/
inline const ScalingMetricType& GetPredefinedScalingMetricType() const{ return m_predefinedScalingMetricType; }
/**
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
* applies only to Auto Scaling groups, Spot Fleet requests, and ECS services.</p>
*/
inline bool PredefinedScalingMetricTypeHasBeenSet() const { return m_predefinedScalingMetricTypeHasBeenSet; }
/**
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
* applies only to Auto Scaling groups, Spot Fleet requests, and ECS services.</p>
*/
inline void SetPredefinedScalingMetricType(const ScalingMetricType& value) { m_predefinedScalingMetricTypeHasBeenSet = true; m_predefinedScalingMetricType = value; }
/**
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
* applies only to Auto Scaling groups, Spot Fleet requests, and ECS services.</p>
*/
inline void SetPredefinedScalingMetricType(ScalingMetricType&& value) { m_predefinedScalingMetricTypeHasBeenSet = true; m_predefinedScalingMetricType = std::move(value); }
/**
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
* applies only to Auto Scaling groups, Spot Fleet requests, and ECS services.</p>
*/
inline PredefinedScalingMetricSpecification& WithPredefinedScalingMetricType(const ScalingMetricType& value) { SetPredefinedScalingMetricType(value); return *this;}
/**
* <p>The metric type. The <code>ALBRequestCountPerTarget</code> metric type
* applies only to Auto Scaling groups, Spot Fleet requests, and ECS services.</p>
*/
inline PredefinedScalingMetricSpecification& WithPredefinedScalingMetricType(ScalingMetricType&& value) { SetPredefinedScalingMetricType(std::move(value)); return *this;}
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline const Aws::String& GetResourceLabel() const{ return m_resourceLabel; }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline bool ResourceLabelHasBeenSet() const { return m_resourceLabelHasBeenSet; }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline void SetResourceLabel(const Aws::String& value) { m_resourceLabelHasBeenSet = true; m_resourceLabel = value; }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline void SetResourceLabel(Aws::String&& value) { m_resourceLabelHasBeenSet = true; m_resourceLabel = std::move(value); }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline void SetResourceLabel(const char* value) { m_resourceLabelHasBeenSet = true; m_resourceLabel.assign(value); }
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline PredefinedScalingMetricSpecification& WithResourceLabel(const Aws::String& value) { SetResourceLabel(value); return *this;}
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline PredefinedScalingMetricSpecification& WithResourceLabel(Aws::String&& value) { SetResourceLabel(std::move(value)); return *this;}
/**
* <p>Identifies the resource associated with the metric type. You can't specify a
* resource label unless the metric type is <code>ALBRequestCountPerTarget</code>
* and there is a target group for an Application Load Balancer attached to the
* Auto Scaling group, Spot Fleet request, or ECS service.</p> <p>The format is
* app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;/targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt;,
* where:</p> <ul> <li> <p>app/&lt;load-balancer-name&gt;/&lt;load-balancer-id&gt;
* is the final portion of the load balancer ARN.</p> </li> <li>
* <p>targetgroup/&lt;target-group-name&gt;/&lt;target-group-id&gt; is the final
* portion of the target group ARN.</p> </li> </ul>
*/
inline PredefinedScalingMetricSpecification& WithResourceLabel(const char* value) { SetResourceLabel(value); return *this;}
private:
ScalingMetricType m_predefinedScalingMetricType;
bool m_predefinedScalingMetricTypeHasBeenSet;
Aws::String m_resourceLabel;
bool m_resourceLabelHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class PredictiveScalingMaxCapacityBehavior
{
NOT_SET,
SetForecastCapacityToMaxCapacity,
SetMaxCapacityToForecastCapacity,
SetMaxCapacityAboveForecastCapacity
};
namespace PredictiveScalingMaxCapacityBehaviorMapper
{
AWS_AUTOSCALINGPLANS_API PredictiveScalingMaxCapacityBehavior GetPredictiveScalingMaxCapacityBehaviorForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForPredictiveScalingMaxCapacityBehavior(PredictiveScalingMaxCapacityBehavior value);
} // namespace PredictiveScalingMaxCapacityBehaviorMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class PredictiveScalingMode
{
NOT_SET,
ForecastAndScale,
ForecastOnly
};
namespace PredictiveScalingModeMapper
{
AWS_AUTOSCALINGPLANS_API PredictiveScalingMode GetPredictiveScalingModeForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForPredictiveScalingMode(PredictiveScalingMode value);
} // namespace PredictiveScalingModeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class ScalableDimension
{
NOT_SET,
autoscaling_autoScalingGroup_DesiredCapacity,
ecs_service_DesiredCount,
ec2_spot_fleet_request_TargetCapacity,
rds_cluster_ReadReplicaCount,
dynamodb_table_ReadCapacityUnits,
dynamodb_table_WriteCapacityUnits,
dynamodb_index_ReadCapacityUnits,
dynamodb_index_WriteCapacityUnits
};
namespace ScalableDimensionMapper
{
AWS_AUTOSCALINGPLANS_API ScalableDimension GetScalableDimensionForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForScalableDimension(ScalableDimension value);
} // namespace ScalableDimensionMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class ScalingMetricType
{
NOT_SET,
ASGAverageCPUUtilization,
ASGAverageNetworkIn,
ASGAverageNetworkOut,
DynamoDBReadCapacityUtilization,
DynamoDBWriteCapacityUtilization,
ECSServiceAverageCPUUtilization,
ECSServiceAverageMemoryUtilization,
ALBRequestCountPerTarget,
RDSReaderAverageCPUUtilization,
RDSReaderAverageDatabaseConnections,
EC2SpotFleetRequestAverageCPUUtilization,
EC2SpotFleetRequestAverageNetworkIn,
EC2SpotFleetRequestAverageNetworkOut
};
namespace ScalingMetricTypeMapper
{
AWS_AUTOSCALINGPLANS_API ScalingMetricType GetScalingMetricTypeForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForScalingMetricType(ScalingMetricType value);
} // namespace ScalingMetricTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,401 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ApplicationSource.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/ScalingPlanStatusCode.h>
#include <aws/core/utils/DateTime.h>
#include <aws/autoscaling-plans/model/ScalingInstruction.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a scaling plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/ScalingPlan">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API ScalingPlan
{
public:
ScalingPlan();
ScalingPlan(Aws::Utils::Json::JsonView jsonValue);
ScalingPlan& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the scaling plan.</p>
*/
inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; }
/**
* <p>The name of the scaling plan.</p>
*/
inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline ScalingPlan& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline ScalingPlan& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline ScalingPlan& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;}
/**
* <p>The version number of the scaling plan.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline bool ScalingPlanVersionHasBeenSet() const { return m_scalingPlanVersionHasBeenSet; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersionHasBeenSet = true; m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline ScalingPlan& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
/**
* <p>The application source.</p>
*/
inline const ApplicationSource& GetApplicationSource() const{ return m_applicationSource; }
/**
* <p>The application source.</p>
*/
inline bool ApplicationSourceHasBeenSet() const { return m_applicationSourceHasBeenSet; }
/**
* <p>The application source.</p>
*/
inline void SetApplicationSource(const ApplicationSource& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = value; }
/**
* <p>The application source.</p>
*/
inline void SetApplicationSource(ApplicationSource&& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = std::move(value); }
/**
* <p>The application source.</p>
*/
inline ScalingPlan& WithApplicationSource(const ApplicationSource& value) { SetApplicationSource(value); return *this;}
/**
* <p>The application source.</p>
*/
inline ScalingPlan& WithApplicationSource(ApplicationSource&& value) { SetApplicationSource(std::move(value)); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline const Aws::Vector<ScalingInstruction>& GetScalingInstructions() const{ return m_scalingInstructions; }
/**
* <p>The scaling instructions.</p>
*/
inline bool ScalingInstructionsHasBeenSet() const { return m_scalingInstructionsHasBeenSet; }
/**
* <p>The scaling instructions.</p>
*/
inline void SetScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = value; }
/**
* <p>The scaling instructions.</p>
*/
inline void SetScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = std::move(value); }
/**
* <p>The scaling instructions.</p>
*/
inline ScalingPlan& WithScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { SetScalingInstructions(value); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline ScalingPlan& WithScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { SetScalingInstructions(std::move(value)); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline ScalingPlan& AddScalingInstructions(const ScalingInstruction& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(value); return *this; }
/**
* <p>The scaling instructions.</p>
*/
inline ScalingPlan& AddScalingInstructions(ScalingInstruction&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(std::move(value)); return *this; }
/**
* <p>The status of the scaling plan.</p> <ul> <li> <p> <code>Active</code> - The
* scaling plan is active.</p> </li> <li> <p> <code>ActiveWithProblems</code> - The
* scaling plan is active, but the scaling configuration for one or more resources
* could not be applied.</p> </li> <li> <p> <code>CreationInProgress</code> - The
* scaling plan is being created.</p> </li> <li> <p> <code>CreationFailed</code> -
* The scaling plan could not be created.</p> </li> <li> <p>
* <code>DeletionInProgress</code> - The scaling plan is being deleted.</p> </li>
* <li> <p> <code>DeletionFailed</code> - The scaling plan could not be
* deleted.</p> </li> <li> <p> <code>UpdateInProgress</code> - The scaling plan is
* being updated.</p> </li> <li> <p> <code>UpdateFailed</code> - The scaling plan
* could not be updated.</p> </li> </ul>
*/
inline const ScalingPlanStatusCode& GetStatusCode() const{ return m_statusCode; }
/**
* <p>The status of the scaling plan.</p> <ul> <li> <p> <code>Active</code> - The
* scaling plan is active.</p> </li> <li> <p> <code>ActiveWithProblems</code> - The
* scaling plan is active, but the scaling configuration for one or more resources
* could not be applied.</p> </li> <li> <p> <code>CreationInProgress</code> - The
* scaling plan is being created.</p> </li> <li> <p> <code>CreationFailed</code> -
* The scaling plan could not be created.</p> </li> <li> <p>
* <code>DeletionInProgress</code> - The scaling plan is being deleted.</p> </li>
* <li> <p> <code>DeletionFailed</code> - The scaling plan could not be
* deleted.</p> </li> <li> <p> <code>UpdateInProgress</code> - The scaling plan is
* being updated.</p> </li> <li> <p> <code>UpdateFailed</code> - The scaling plan
* could not be updated.</p> </li> </ul>
*/
inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; }
/**
* <p>The status of the scaling plan.</p> <ul> <li> <p> <code>Active</code> - The
* scaling plan is active.</p> </li> <li> <p> <code>ActiveWithProblems</code> - The
* scaling plan is active, but the scaling configuration for one or more resources
* could not be applied.</p> </li> <li> <p> <code>CreationInProgress</code> - The
* scaling plan is being created.</p> </li> <li> <p> <code>CreationFailed</code> -
* The scaling plan could not be created.</p> </li> <li> <p>
* <code>DeletionInProgress</code> - The scaling plan is being deleted.</p> </li>
* <li> <p> <code>DeletionFailed</code> - The scaling plan could not be
* deleted.</p> </li> <li> <p> <code>UpdateInProgress</code> - The scaling plan is
* being updated.</p> </li> <li> <p> <code>UpdateFailed</code> - The scaling plan
* could not be updated.</p> </li> </ul>
*/
inline void SetStatusCode(const ScalingPlanStatusCode& value) { m_statusCodeHasBeenSet = true; m_statusCode = value; }
/**
* <p>The status of the scaling plan.</p> <ul> <li> <p> <code>Active</code> - The
* scaling plan is active.</p> </li> <li> <p> <code>ActiveWithProblems</code> - The
* scaling plan is active, but the scaling configuration for one or more resources
* could not be applied.</p> </li> <li> <p> <code>CreationInProgress</code> - The
* scaling plan is being created.</p> </li> <li> <p> <code>CreationFailed</code> -
* The scaling plan could not be created.</p> </li> <li> <p>
* <code>DeletionInProgress</code> - The scaling plan is being deleted.</p> </li>
* <li> <p> <code>DeletionFailed</code> - The scaling plan could not be
* deleted.</p> </li> <li> <p> <code>UpdateInProgress</code> - The scaling plan is
* being updated.</p> </li> <li> <p> <code>UpdateFailed</code> - The scaling plan
* could not be updated.</p> </li> </ul>
*/
inline void SetStatusCode(ScalingPlanStatusCode&& value) { m_statusCodeHasBeenSet = true; m_statusCode = std::move(value); }
/**
* <p>The status of the scaling plan.</p> <ul> <li> <p> <code>Active</code> - The
* scaling plan is active.</p> </li> <li> <p> <code>ActiveWithProblems</code> - The
* scaling plan is active, but the scaling configuration for one or more resources
* could not be applied.</p> </li> <li> <p> <code>CreationInProgress</code> - The
* scaling plan is being created.</p> </li> <li> <p> <code>CreationFailed</code> -
* The scaling plan could not be created.</p> </li> <li> <p>
* <code>DeletionInProgress</code> - The scaling plan is being deleted.</p> </li>
* <li> <p> <code>DeletionFailed</code> - The scaling plan could not be
* deleted.</p> </li> <li> <p> <code>UpdateInProgress</code> - The scaling plan is
* being updated.</p> </li> <li> <p> <code>UpdateFailed</code> - The scaling plan
* could not be updated.</p> </li> </ul>
*/
inline ScalingPlan& WithStatusCode(const ScalingPlanStatusCode& value) { SetStatusCode(value); return *this;}
/**
* <p>The status of the scaling plan.</p> <ul> <li> <p> <code>Active</code> - The
* scaling plan is active.</p> </li> <li> <p> <code>ActiveWithProblems</code> - The
* scaling plan is active, but the scaling configuration for one or more resources
* could not be applied.</p> </li> <li> <p> <code>CreationInProgress</code> - The
* scaling plan is being created.</p> </li> <li> <p> <code>CreationFailed</code> -
* The scaling plan could not be created.</p> </li> <li> <p>
* <code>DeletionInProgress</code> - The scaling plan is being deleted.</p> </li>
* <li> <p> <code>DeletionFailed</code> - The scaling plan could not be
* deleted.</p> </li> <li> <p> <code>UpdateInProgress</code> - The scaling plan is
* being updated.</p> </li> <li> <p> <code>UpdateFailed</code> - The scaling plan
* could not be updated.</p> </li> </ul>
*/
inline ScalingPlan& WithStatusCode(ScalingPlanStatusCode&& value) { SetStatusCode(std::move(value)); return *this;}
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; }
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; }
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); }
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); }
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline ScalingPlan& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;}
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline ScalingPlan& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;}
/**
* <p>A simple message about the current status of the scaling plan.</p>
*/
inline ScalingPlan& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;}
/**
* <p>The Unix time stamp when the scaling plan entered the current status.</p>
*/
inline const Aws::Utils::DateTime& GetStatusStartTime() const{ return m_statusStartTime; }
/**
* <p>The Unix time stamp when the scaling plan entered the current status.</p>
*/
inline bool StatusStartTimeHasBeenSet() const { return m_statusStartTimeHasBeenSet; }
/**
* <p>The Unix time stamp when the scaling plan entered the current status.</p>
*/
inline void SetStatusStartTime(const Aws::Utils::DateTime& value) { m_statusStartTimeHasBeenSet = true; m_statusStartTime = value; }
/**
* <p>The Unix time stamp when the scaling plan entered the current status.</p>
*/
inline void SetStatusStartTime(Aws::Utils::DateTime&& value) { m_statusStartTimeHasBeenSet = true; m_statusStartTime = std::move(value); }
/**
* <p>The Unix time stamp when the scaling plan entered the current status.</p>
*/
inline ScalingPlan& WithStatusStartTime(const Aws::Utils::DateTime& value) { SetStatusStartTime(value); return *this;}
/**
* <p>The Unix time stamp when the scaling plan entered the current status.</p>
*/
inline ScalingPlan& WithStatusStartTime(Aws::Utils::DateTime&& value) { SetStatusStartTime(std::move(value)); return *this;}
/**
* <p>The Unix time stamp when the scaling plan was created.</p>
*/
inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; }
/**
* <p>The Unix time stamp when the scaling plan was created.</p>
*/
inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
/**
* <p>The Unix time stamp when the scaling plan was created.</p>
*/
inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; }
/**
* <p>The Unix time stamp when the scaling plan was created.</p>
*/
inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); }
/**
* <p>The Unix time stamp when the scaling plan was created.</p>
*/
inline ScalingPlan& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;}
/**
* <p>The Unix time stamp when the scaling plan was created.</p>
*/
inline ScalingPlan& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;}
private:
Aws::String m_scalingPlanName;
bool m_scalingPlanNameHasBeenSet;
long long m_scalingPlanVersion;
bool m_scalingPlanVersionHasBeenSet;
ApplicationSource m_applicationSource;
bool m_applicationSourceHasBeenSet;
Aws::Vector<ScalingInstruction> m_scalingInstructions;
bool m_scalingInstructionsHasBeenSet;
ScalingPlanStatusCode m_statusCode;
bool m_statusCodeHasBeenSet;
Aws::String m_statusMessage;
bool m_statusMessageHasBeenSet;
Aws::Utils::DateTime m_statusStartTime;
bool m_statusStartTimeHasBeenSet;
Aws::Utils::DateTime m_creationTime;
bool m_creationTimeHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,617 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ServiceNamespace.h>
#include <aws/autoscaling-plans/model/ScalableDimension.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/ScalingStatusCode.h>
#include <aws/autoscaling-plans/model/ScalingPolicy.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a scalable resource.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/ScalingPlanResource">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API ScalingPlanResource
{
public:
ScalingPlanResource();
ScalingPlanResource(Aws::Utils::Json::JsonView jsonValue);
ScalingPlanResource& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the scaling plan.</p>
*/
inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; }
/**
* <p>The name of the scaling plan.</p>
*/
inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline ScalingPlanResource& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline ScalingPlanResource& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline ScalingPlanResource& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;}
/**
* <p>The version number of the scaling plan.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline bool ScalingPlanVersionHasBeenSet() const { return m_scalingPlanVersionHasBeenSet; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersionHasBeenSet = true; m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline ScalingPlanResource& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
/**
* <p>The namespace of the AWS service.</p>
*/
inline const ServiceNamespace& GetServiceNamespace() const{ return m_serviceNamespace; }
/**
* <p>The namespace of the AWS service.</p>
*/
inline bool ServiceNamespaceHasBeenSet() const { return m_serviceNamespaceHasBeenSet; }
/**
* <p>The namespace of the AWS service.</p>
*/
inline void SetServiceNamespace(const ServiceNamespace& value) { m_serviceNamespaceHasBeenSet = true; m_serviceNamespace = value; }
/**
* <p>The namespace of the AWS service.</p>
*/
inline void SetServiceNamespace(ServiceNamespace&& value) { m_serviceNamespaceHasBeenSet = true; m_serviceNamespace = std::move(value); }
/**
* <p>The namespace of the AWS service.</p>
*/
inline ScalingPlanResource& WithServiceNamespace(const ServiceNamespace& value) { SetServiceNamespace(value); return *this;}
/**
* <p>The namespace of the AWS service.</p>
*/
inline ScalingPlanResource& WithServiceNamespace(ServiceNamespace&& value) { SetServiceNamespace(std::move(value)); return *this;}
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline const Aws::String& GetResourceId() const{ return m_resourceId; }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline ScalingPlanResource& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline ScalingPlanResource& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;}
/**
* <p>The ID of the resource. This string consists of the resource type and unique
* identifier.</p> <ul> <li> <p>Auto Scaling group - The resource type is
* <code>autoScalingGroup</code> and the unique identifier is the name of the Auto
* Scaling group. Example: <code>autoScalingGroup/my-asg</code>.</p> </li> <li>
* <p>ECS service - The resource type is <code>service</code> and the unique
* identifier is the cluster name and service name. Example:
* <code>service/default/sample-webapp</code>.</p> </li> <li> <p>Spot Fleet request
* - The resource type is <code>spot-fleet-request</code> and the unique identifier
* is the Spot Fleet request ID. Example:
* <code>spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE</code>.</p>
* </li> <li> <p>DynamoDB table - The resource type is <code>table</code> and the
* unique identifier is the resource ID. Example: <code>table/my-table</code>.</p>
* </li> <li> <p>DynamoDB global secondary index - The resource type is
* <code>index</code> and the unique identifier is the resource ID. Example:
* <code>table/my-table/index/my-table-index</code>.</p> </li> <li> <p>Aurora DB
* cluster - The resource type is <code>cluster</code> and the unique identifier is
* the cluster name. Example: <code>cluster:my-db-cluster</code>.</p> </li> </ul>
*/
inline ScalingPlanResource& WithResourceId(const char* value) { SetResourceId(value); return *this;}
/**
* <p>The scalable dimension for the resource.</p> <ul> <li> <p>
* <code>autoscaling:autoScalingGroup:DesiredCapacity</code> - The desired capacity
* of an Auto Scaling group.</p> </li> <li> <p>
* <code>ecs:service:DesiredCount</code> - The desired task count of an ECS
* service.</p> </li> <li> <p> <code>ec2:spot-fleet-request:TargetCapacity</code> -
* The target capacity of a Spot Fleet request.</p> </li> <li> <p>
* <code>dynamodb:table:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:table:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:index:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>dynamodb:index:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>rds:cluster:ReadReplicaCount</code> - The count of Aurora Replicas in an
* Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora
* PostgreSQL-compatible edition.</p> </li> </ul>
*/
inline const ScalableDimension& GetScalableDimension() const{ return m_scalableDimension; }
/**
* <p>The scalable dimension for the resource.</p> <ul> <li> <p>
* <code>autoscaling:autoScalingGroup:DesiredCapacity</code> - The desired capacity
* of an Auto Scaling group.</p> </li> <li> <p>
* <code>ecs:service:DesiredCount</code> - The desired task count of an ECS
* service.</p> </li> <li> <p> <code>ec2:spot-fleet-request:TargetCapacity</code> -
* The target capacity of a Spot Fleet request.</p> </li> <li> <p>
* <code>dynamodb:table:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:table:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:index:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>dynamodb:index:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>rds:cluster:ReadReplicaCount</code> - The count of Aurora Replicas in an
* Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora
* PostgreSQL-compatible edition.</p> </li> </ul>
*/
inline bool ScalableDimensionHasBeenSet() const { return m_scalableDimensionHasBeenSet; }
/**
* <p>The scalable dimension for the resource.</p> <ul> <li> <p>
* <code>autoscaling:autoScalingGroup:DesiredCapacity</code> - The desired capacity
* of an Auto Scaling group.</p> </li> <li> <p>
* <code>ecs:service:DesiredCount</code> - The desired task count of an ECS
* service.</p> </li> <li> <p> <code>ec2:spot-fleet-request:TargetCapacity</code> -
* The target capacity of a Spot Fleet request.</p> </li> <li> <p>
* <code>dynamodb:table:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:table:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:index:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>dynamodb:index:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>rds:cluster:ReadReplicaCount</code> - The count of Aurora Replicas in an
* Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora
* PostgreSQL-compatible edition.</p> </li> </ul>
*/
inline void SetScalableDimension(const ScalableDimension& value) { m_scalableDimensionHasBeenSet = true; m_scalableDimension = value; }
/**
* <p>The scalable dimension for the resource.</p> <ul> <li> <p>
* <code>autoscaling:autoScalingGroup:DesiredCapacity</code> - The desired capacity
* of an Auto Scaling group.</p> </li> <li> <p>
* <code>ecs:service:DesiredCount</code> - The desired task count of an ECS
* service.</p> </li> <li> <p> <code>ec2:spot-fleet-request:TargetCapacity</code> -
* The target capacity of a Spot Fleet request.</p> </li> <li> <p>
* <code>dynamodb:table:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:table:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:index:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>dynamodb:index:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>rds:cluster:ReadReplicaCount</code> - The count of Aurora Replicas in an
* Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora
* PostgreSQL-compatible edition.</p> </li> </ul>
*/
inline void SetScalableDimension(ScalableDimension&& value) { m_scalableDimensionHasBeenSet = true; m_scalableDimension = std::move(value); }
/**
* <p>The scalable dimension for the resource.</p> <ul> <li> <p>
* <code>autoscaling:autoScalingGroup:DesiredCapacity</code> - The desired capacity
* of an Auto Scaling group.</p> </li> <li> <p>
* <code>ecs:service:DesiredCount</code> - The desired task count of an ECS
* service.</p> </li> <li> <p> <code>ec2:spot-fleet-request:TargetCapacity</code> -
* The target capacity of a Spot Fleet request.</p> </li> <li> <p>
* <code>dynamodb:table:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:table:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:index:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>dynamodb:index:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>rds:cluster:ReadReplicaCount</code> - The count of Aurora Replicas in an
* Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora
* PostgreSQL-compatible edition.</p> </li> </ul>
*/
inline ScalingPlanResource& WithScalableDimension(const ScalableDimension& value) { SetScalableDimension(value); return *this;}
/**
* <p>The scalable dimension for the resource.</p> <ul> <li> <p>
* <code>autoscaling:autoScalingGroup:DesiredCapacity</code> - The desired capacity
* of an Auto Scaling group.</p> </li> <li> <p>
* <code>ecs:service:DesiredCount</code> - The desired task count of an ECS
* service.</p> </li> <li> <p> <code>ec2:spot-fleet-request:TargetCapacity</code> -
* The target capacity of a Spot Fleet request.</p> </li> <li> <p>
* <code>dynamodb:table:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:table:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB table.</p> </li> <li> <p>
* <code>dynamodb:index:ReadCapacityUnits</code> - The provisioned read capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>dynamodb:index:WriteCapacityUnits</code> - The provisioned write capacity
* for a DynamoDB global secondary index.</p> </li> <li> <p>
* <code>rds:cluster:ReadReplicaCount</code> - The count of Aurora Replicas in an
* Aurora DB cluster. Available for Aurora MySQL-compatible edition and Aurora
* PostgreSQL-compatible edition.</p> </li> </ul>
*/
inline ScalingPlanResource& WithScalableDimension(ScalableDimension&& value) { SetScalableDimension(std::move(value)); return *this;}
/**
* <p>The scaling policies.</p>
*/
inline const Aws::Vector<ScalingPolicy>& GetScalingPolicies() const{ return m_scalingPolicies; }
/**
* <p>The scaling policies.</p>
*/
inline bool ScalingPoliciesHasBeenSet() const { return m_scalingPoliciesHasBeenSet; }
/**
* <p>The scaling policies.</p>
*/
inline void SetScalingPolicies(const Aws::Vector<ScalingPolicy>& value) { m_scalingPoliciesHasBeenSet = true; m_scalingPolicies = value; }
/**
* <p>The scaling policies.</p>
*/
inline void SetScalingPolicies(Aws::Vector<ScalingPolicy>&& value) { m_scalingPoliciesHasBeenSet = true; m_scalingPolicies = std::move(value); }
/**
* <p>The scaling policies.</p>
*/
inline ScalingPlanResource& WithScalingPolicies(const Aws::Vector<ScalingPolicy>& value) { SetScalingPolicies(value); return *this;}
/**
* <p>The scaling policies.</p>
*/
inline ScalingPlanResource& WithScalingPolicies(Aws::Vector<ScalingPolicy>&& value) { SetScalingPolicies(std::move(value)); return *this;}
/**
* <p>The scaling policies.</p>
*/
inline ScalingPlanResource& AddScalingPolicies(const ScalingPolicy& value) { m_scalingPoliciesHasBeenSet = true; m_scalingPolicies.push_back(value); return *this; }
/**
* <p>The scaling policies.</p>
*/
inline ScalingPlanResource& AddScalingPolicies(ScalingPolicy&& value) { m_scalingPoliciesHasBeenSet = true; m_scalingPolicies.push_back(std::move(value)); return *this; }
/**
* <p>The scaling status of the resource.</p> <ul> <li> <p> <code>Active</code> -
* The scaling configuration is active.</p> </li> <li> <p> <code>Inactive</code> -
* The scaling configuration is not active because the scaling plan is being
* created or the scaling configuration could not be applied. Check the status
* message for more information.</p> </li> <li> <p> <code>PartiallyActive</code> -
* The scaling configuration is partially active because the scaling plan is being
* created or deleted or the scaling configuration could not be fully applied.
* Check the status message for more information.</p> </li> </ul>
*/
inline const ScalingStatusCode& GetScalingStatusCode() const{ return m_scalingStatusCode; }
/**
* <p>The scaling status of the resource.</p> <ul> <li> <p> <code>Active</code> -
* The scaling configuration is active.</p> </li> <li> <p> <code>Inactive</code> -
* The scaling configuration is not active because the scaling plan is being
* created or the scaling configuration could not be applied. Check the status
* message for more information.</p> </li> <li> <p> <code>PartiallyActive</code> -
* The scaling configuration is partially active because the scaling plan is being
* created or deleted or the scaling configuration could not be fully applied.
* Check the status message for more information.</p> </li> </ul>
*/
inline bool ScalingStatusCodeHasBeenSet() const { return m_scalingStatusCodeHasBeenSet; }
/**
* <p>The scaling status of the resource.</p> <ul> <li> <p> <code>Active</code> -
* The scaling configuration is active.</p> </li> <li> <p> <code>Inactive</code> -
* The scaling configuration is not active because the scaling plan is being
* created or the scaling configuration could not be applied. Check the status
* message for more information.</p> </li> <li> <p> <code>PartiallyActive</code> -
* The scaling configuration is partially active because the scaling plan is being
* created or deleted or the scaling configuration could not be fully applied.
* Check the status message for more information.</p> </li> </ul>
*/
inline void SetScalingStatusCode(const ScalingStatusCode& value) { m_scalingStatusCodeHasBeenSet = true; m_scalingStatusCode = value; }
/**
* <p>The scaling status of the resource.</p> <ul> <li> <p> <code>Active</code> -
* The scaling configuration is active.</p> </li> <li> <p> <code>Inactive</code> -
* The scaling configuration is not active because the scaling plan is being
* created or the scaling configuration could not be applied. Check the status
* message for more information.</p> </li> <li> <p> <code>PartiallyActive</code> -
* The scaling configuration is partially active because the scaling plan is being
* created or deleted or the scaling configuration could not be fully applied.
* Check the status message for more information.</p> </li> </ul>
*/
inline void SetScalingStatusCode(ScalingStatusCode&& value) { m_scalingStatusCodeHasBeenSet = true; m_scalingStatusCode = std::move(value); }
/**
* <p>The scaling status of the resource.</p> <ul> <li> <p> <code>Active</code> -
* The scaling configuration is active.</p> </li> <li> <p> <code>Inactive</code> -
* The scaling configuration is not active because the scaling plan is being
* created or the scaling configuration could not be applied. Check the status
* message for more information.</p> </li> <li> <p> <code>PartiallyActive</code> -
* The scaling configuration is partially active because the scaling plan is being
* created or deleted or the scaling configuration could not be fully applied.
* Check the status message for more information.</p> </li> </ul>
*/
inline ScalingPlanResource& WithScalingStatusCode(const ScalingStatusCode& value) { SetScalingStatusCode(value); return *this;}
/**
* <p>The scaling status of the resource.</p> <ul> <li> <p> <code>Active</code> -
* The scaling configuration is active.</p> </li> <li> <p> <code>Inactive</code> -
* The scaling configuration is not active because the scaling plan is being
* created or the scaling configuration could not be applied. Check the status
* message for more information.</p> </li> <li> <p> <code>PartiallyActive</code> -
* The scaling configuration is partially active because the scaling plan is being
* created or deleted or the scaling configuration could not be fully applied.
* Check the status message for more information.</p> </li> </ul>
*/
inline ScalingPlanResource& WithScalingStatusCode(ScalingStatusCode&& value) { SetScalingStatusCode(std::move(value)); return *this;}
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline const Aws::String& GetScalingStatusMessage() const{ return m_scalingStatusMessage; }
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline bool ScalingStatusMessageHasBeenSet() const { return m_scalingStatusMessageHasBeenSet; }
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline void SetScalingStatusMessage(const Aws::String& value) { m_scalingStatusMessageHasBeenSet = true; m_scalingStatusMessage = value; }
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline void SetScalingStatusMessage(Aws::String&& value) { m_scalingStatusMessageHasBeenSet = true; m_scalingStatusMessage = std::move(value); }
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline void SetScalingStatusMessage(const char* value) { m_scalingStatusMessageHasBeenSet = true; m_scalingStatusMessage.assign(value); }
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline ScalingPlanResource& WithScalingStatusMessage(const Aws::String& value) { SetScalingStatusMessage(value); return *this;}
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline ScalingPlanResource& WithScalingStatusMessage(Aws::String&& value) { SetScalingStatusMessage(std::move(value)); return *this;}
/**
* <p>A simple message about the current scaling status of the resource.</p>
*/
inline ScalingPlanResource& WithScalingStatusMessage(const char* value) { SetScalingStatusMessage(value); return *this;}
private:
Aws::String m_scalingPlanName;
bool m_scalingPlanNameHasBeenSet;
long long m_scalingPlanVersion;
bool m_scalingPlanVersionHasBeenSet;
ServiceNamespace m_serviceNamespace;
bool m_serviceNamespaceHasBeenSet;
Aws::String m_resourceId;
bool m_resourceIdHasBeenSet;
ScalableDimension m_scalableDimension;
bool m_scalableDimensionHasBeenSet;
Aws::Vector<ScalingPolicy> m_scalingPolicies;
bool m_scalingPoliciesHasBeenSet;
ScalingStatusCode m_scalingStatusCode;
bool m_scalingStatusCodeHasBeenSet;
Aws::String m_scalingStatusMessage;
bool m_scalingStatusMessageHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class ScalingPlanStatusCode
{
NOT_SET,
Active,
ActiveWithProblems,
CreationInProgress,
CreationFailed,
DeletionInProgress,
DeletionFailed,
UpdateInProgress,
UpdateFailed
};
namespace ScalingPlanStatusCodeMapper
{
AWS_AUTOSCALINGPLANS_API ScalingPlanStatusCode GetScalingPlanStatusCodeForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForScalingPlanStatusCode(ScalingPlanStatusCode value);
} // namespace ScalingPlanStatusCodeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,164 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/PolicyType.h>
#include <aws/autoscaling-plans/model/TargetTrackingConfiguration.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a scaling policy.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/ScalingPolicy">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API ScalingPolicy
{
public:
ScalingPolicy();
ScalingPolicy(Aws::Utils::Json::JsonView jsonValue);
ScalingPolicy& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the scaling policy.</p>
*/
inline const Aws::String& GetPolicyName() const{ return m_policyName; }
/**
* <p>The name of the scaling policy.</p>
*/
inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
/**
* <p>The name of the scaling policy.</p>
*/
inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
/**
* <p>The name of the scaling policy.</p>
*/
inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
/**
* <p>The name of the scaling policy.</p>
*/
inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
/**
* <p>The name of the scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
/**
* <p>The name of the scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
/**
* <p>The name of the scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
/**
* <p>The type of scaling policy.</p>
*/
inline const PolicyType& GetPolicyType() const{ return m_policyType; }
/**
* <p>The type of scaling policy.</p>
*/
inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
/**
* <p>The type of scaling policy.</p>
*/
inline void SetPolicyType(const PolicyType& value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
/**
* <p>The type of scaling policy.</p>
*/
inline void SetPolicyType(PolicyType&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); }
/**
* <p>The type of scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyType(const PolicyType& value) { SetPolicyType(value); return *this;}
/**
* <p>The type of scaling policy.</p>
*/
inline ScalingPolicy& WithPolicyType(PolicyType&& value) { SetPolicyType(std::move(value)); return *this;}
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const{ return m_targetTrackingConfiguration; }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline void SetTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = value; }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline void SetTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = std::move(value); }
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline ScalingPolicy& WithTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { SetTargetTrackingConfiguration(value); return *this;}
/**
* <p>The target tracking scaling policy. Includes support for predefined or
* customized metrics.</p>
*/
inline ScalingPolicy& WithTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { SetTargetTrackingConfiguration(std::move(value)); return *this;}
private:
Aws::String m_policyName;
bool m_policyNameHasBeenSet;
PolicyType m_policyType;
bool m_policyTypeHasBeenSet;
TargetTrackingConfiguration m_targetTrackingConfiguration;
bool m_targetTrackingConfigurationHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class ScalingPolicyUpdateBehavior
{
NOT_SET,
KeepExternalPolicies,
ReplaceExternalPolicies
};
namespace ScalingPolicyUpdateBehaviorMapper
{
AWS_AUTOSCALINGPLANS_API ScalingPolicyUpdateBehavior GetScalingPolicyUpdateBehaviorForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForScalingPolicyUpdateBehavior(ScalingPolicyUpdateBehavior value);
} // namespace ScalingPolicyUpdateBehaviorMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class ScalingStatusCode
{
NOT_SET,
Inactive,
PartiallyActive,
Active
};
namespace ScalingStatusCodeMapper
{
AWS_AUTOSCALINGPLANS_API ScalingStatusCode GetScalingStatusCodeForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForScalingStatusCode(ScalingStatusCode value);
} // namespace ScalingStatusCodeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
enum class ServiceNamespace
{
NOT_SET,
autoscaling,
ecs,
ec2,
rds,
dynamodb
};
namespace ServiceNamespaceMapper
{
AWS_AUTOSCALINGPLANS_API ServiceNamespace GetServiceNamespaceForName(const Aws::String& name);
AWS_AUTOSCALINGPLANS_API Aws::String GetNameForServiceNamespace(ServiceNamespace value);
} // namespace ServiceNamespaceMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Represents a tag.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/TagFilter">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API TagFilter
{
public:
TagFilter();
TagFilter(Aws::Utils::Json::JsonView jsonValue);
TagFilter& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The tag key.</p>
*/
inline const Aws::String& GetKey() const{ return m_key; }
/**
* <p>The tag key.</p>
*/
inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
/**
* <p>The tag key.</p>
*/
inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
/**
* <p>The tag key.</p>
*/
inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
/**
* <p>The tag key.</p>
*/
inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
/**
* <p>The tag key.</p>
*/
inline TagFilter& WithKey(const Aws::String& value) { SetKey(value); return *this;}
/**
* <p>The tag key.</p>
*/
inline TagFilter& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
/**
* <p>The tag key.</p>
*/
inline TagFilter& WithKey(const char* value) { SetKey(value); return *this;}
/**
* <p>The tag values (0 to 20).</p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
/**
* <p>The tag values (0 to 20).</p>
*/
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
/**
* <p>The tag values (0 to 20).</p>
*/
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
/**
* <p>The tag values (0 to 20).</p>
*/
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
/**
* <p>The tag values (0 to 20).</p>
*/
inline TagFilter& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
/**
* <p>The tag values (0 to 20).</p>
*/
inline TagFilter& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
/**
* <p>The tag values (0 to 20).</p>
*/
inline TagFilter& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
/**
* <p>The tag values (0 to 20).</p>
*/
inline TagFilter& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
/**
* <p>The tag values (0 to 20).</p>
*/
inline TagFilter& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
private:
Aws::String m_key;
bool m_keyHasBeenSet;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,323 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/model/PredefinedScalingMetricSpecification.h>
#include <aws/autoscaling-plans/model/CustomizedScalingMetricSpecification.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
/**
* <p>Describes a target tracking configuration to use with AWS Auto Scaling. Used
* with <a>ScalingInstruction</a> and <a>ScalingPolicy</a>.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06/TargetTrackingConfiguration">AWS
* API Reference</a></p>
*/
class AWS_AUTOSCALINGPLANS_API TargetTrackingConfiguration
{
public:
TargetTrackingConfiguration();
TargetTrackingConfiguration(Aws::Utils::Json::JsonView jsonValue);
TargetTrackingConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>A predefined metric. You can specify either a predefined metric or a
* customized metric.</p>
*/
inline const PredefinedScalingMetricSpecification& GetPredefinedScalingMetricSpecification() const{ return m_predefinedScalingMetricSpecification; }
/**
* <p>A predefined metric. You can specify either a predefined metric or a
* customized metric.</p>
*/
inline bool PredefinedScalingMetricSpecificationHasBeenSet() const { return m_predefinedScalingMetricSpecificationHasBeenSet; }
/**
* <p>A predefined metric. You can specify either a predefined metric or a
* customized metric.</p>
*/
inline void SetPredefinedScalingMetricSpecification(const PredefinedScalingMetricSpecification& value) { m_predefinedScalingMetricSpecificationHasBeenSet = true; m_predefinedScalingMetricSpecification = value; }
/**
* <p>A predefined metric. You can specify either a predefined metric or a
* customized metric.</p>
*/
inline void SetPredefinedScalingMetricSpecification(PredefinedScalingMetricSpecification&& value) { m_predefinedScalingMetricSpecificationHasBeenSet = true; m_predefinedScalingMetricSpecification = std::move(value); }
/**
* <p>A predefined metric. You can specify either a predefined metric or a
* customized metric.</p>
*/
inline TargetTrackingConfiguration& WithPredefinedScalingMetricSpecification(const PredefinedScalingMetricSpecification& value) { SetPredefinedScalingMetricSpecification(value); return *this;}
/**
* <p>A predefined metric. You can specify either a predefined metric or a
* customized metric.</p>
*/
inline TargetTrackingConfiguration& WithPredefinedScalingMetricSpecification(PredefinedScalingMetricSpecification&& value) { SetPredefinedScalingMetricSpecification(std::move(value)); return *this;}
/**
* <p>A customized metric. You can specify either a predefined metric or a
* customized metric. </p>
*/
inline const CustomizedScalingMetricSpecification& GetCustomizedScalingMetricSpecification() const{ return m_customizedScalingMetricSpecification; }
/**
* <p>A customized metric. You can specify either a predefined metric or a
* customized metric. </p>
*/
inline bool CustomizedScalingMetricSpecificationHasBeenSet() const { return m_customizedScalingMetricSpecificationHasBeenSet; }
/**
* <p>A customized metric. You can specify either a predefined metric or a
* customized metric. </p>
*/
inline void SetCustomizedScalingMetricSpecification(const CustomizedScalingMetricSpecification& value) { m_customizedScalingMetricSpecificationHasBeenSet = true; m_customizedScalingMetricSpecification = value; }
/**
* <p>A customized metric. You can specify either a predefined metric or a
* customized metric. </p>
*/
inline void SetCustomizedScalingMetricSpecification(CustomizedScalingMetricSpecification&& value) { m_customizedScalingMetricSpecificationHasBeenSet = true; m_customizedScalingMetricSpecification = std::move(value); }
/**
* <p>A customized metric. You can specify either a predefined metric or a
* customized metric. </p>
*/
inline TargetTrackingConfiguration& WithCustomizedScalingMetricSpecification(const CustomizedScalingMetricSpecification& value) { SetCustomizedScalingMetricSpecification(value); return *this;}
/**
* <p>A customized metric. You can specify either a predefined metric or a
* customized metric. </p>
*/
inline TargetTrackingConfiguration& WithCustomizedScalingMetricSpecification(CustomizedScalingMetricSpecification&& value) { SetCustomizedScalingMetricSpecification(std::move(value)); return *this;}
/**
* <p>The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
* (Base 10) or 2e-360 to 2e360 (Base 2).</p>
*/
inline double GetTargetValue() const{ return m_targetValue; }
/**
* <p>The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
* (Base 10) or 2e-360 to 2e360 (Base 2).</p>
*/
inline bool TargetValueHasBeenSet() const { return m_targetValueHasBeenSet; }
/**
* <p>The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
* (Base 10) or 2e-360 to 2e360 (Base 2).</p>
*/
inline void SetTargetValue(double value) { m_targetValueHasBeenSet = true; m_targetValue = value; }
/**
* <p>The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
* (Base 10) or 2e-360 to 2e360 (Base 2).</p>
*/
inline TargetTrackingConfiguration& WithTargetValue(double value) { SetTargetValue(value); return *this;}
/**
* <p>Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is <code>true</code>, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource. </p> <p>The default value is <code>false</code>.</p>
*/
inline bool GetDisableScaleIn() const{ return m_disableScaleIn; }
/**
* <p>Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is <code>true</code>, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource. </p> <p>The default value is <code>false</code>.</p>
*/
inline bool DisableScaleInHasBeenSet() const { return m_disableScaleInHasBeenSet; }
/**
* <p>Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is <code>true</code>, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource. </p> <p>The default value is <code>false</code>.</p>
*/
inline void SetDisableScaleIn(bool value) { m_disableScaleInHasBeenSet = true; m_disableScaleIn = value; }
/**
* <p>Indicates whether scale in by the target tracking scaling policy is disabled.
* If the value is <code>true</code>, scale in is disabled and the target tracking
* scaling policy doesn't remove capacity from the scalable resource. Otherwise,
* scale in is enabled and the target tracking scaling policy can remove capacity
* from the scalable resource. </p> <p>The default value is <code>false</code>.</p>
*/
inline TargetTrackingConfiguration& WithDisableScaleIn(bool value) { SetDisableScaleIn(value); return *this;}
/**
* <p>The amount of time, in seconds, after a scale-out activity completes before
* another scale-out activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>While the cooldown period is in
* effect, the capacity that has been added by the previous scale-out event that
* initiated the cooldown is calculated as part of the desired capacity for the
* next scale out. The intention is to continuously (but not excessively) scale
* out.</p>
*/
inline int GetScaleOutCooldown() const{ return m_scaleOutCooldown; }
/**
* <p>The amount of time, in seconds, after a scale-out activity completes before
* another scale-out activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>While the cooldown period is in
* effect, the capacity that has been added by the previous scale-out event that
* initiated the cooldown is calculated as part of the desired capacity for the
* next scale out. The intention is to continuously (but not excessively) scale
* out.</p>
*/
inline bool ScaleOutCooldownHasBeenSet() const { return m_scaleOutCooldownHasBeenSet; }
/**
* <p>The amount of time, in seconds, after a scale-out activity completes before
* another scale-out activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>While the cooldown period is in
* effect, the capacity that has been added by the previous scale-out event that
* initiated the cooldown is calculated as part of the desired capacity for the
* next scale out. The intention is to continuously (but not excessively) scale
* out.</p>
*/
inline void SetScaleOutCooldown(int value) { m_scaleOutCooldownHasBeenSet = true; m_scaleOutCooldown = value; }
/**
* <p>The amount of time, in seconds, after a scale-out activity completes before
* another scale-out activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>While the cooldown period is in
* effect, the capacity that has been added by the previous scale-out event that
* initiated the cooldown is calculated as part of the desired capacity for the
* next scale out. The intention is to continuously (but not excessively) scale
* out.</p>
*/
inline TargetTrackingConfiguration& WithScaleOutCooldown(int value) { SetScaleOutCooldown(value); return *this;}
/**
* <p>The amount of time, in seconds, after a scale in activity completes before
* another scale in activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>The cooldown period is used to block
* subsequent scale in requests until it has expired. The intention is to scale in
* conservatively to protect your application's availability. However, if another
* alarm triggers a scale-out policy during the cooldown period after a scale-in,
* AWS Auto Scaling scales out your scalable target immediately.</p>
*/
inline int GetScaleInCooldown() const{ return m_scaleInCooldown; }
/**
* <p>The amount of time, in seconds, after a scale in activity completes before
* another scale in activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>The cooldown period is used to block
* subsequent scale in requests until it has expired. The intention is to scale in
* conservatively to protect your application's availability. However, if another
* alarm triggers a scale-out policy during the cooldown period after a scale-in,
* AWS Auto Scaling scales out your scalable target immediately.</p>
*/
inline bool ScaleInCooldownHasBeenSet() const { return m_scaleInCooldownHasBeenSet; }
/**
* <p>The amount of time, in seconds, after a scale in activity completes before
* another scale in activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>The cooldown period is used to block
* subsequent scale in requests until it has expired. The intention is to scale in
* conservatively to protect your application's availability. However, if another
* alarm triggers a scale-out policy during the cooldown period after a scale-in,
* AWS Auto Scaling scales out your scalable target immediately.</p>
*/
inline void SetScaleInCooldown(int value) { m_scaleInCooldownHasBeenSet = true; m_scaleInCooldown = value; }
/**
* <p>The amount of time, in seconds, after a scale in activity completes before
* another scale in activity can start. This value is not used if the scalable
* resource is an Auto Scaling group.</p> <p>The cooldown period is used to block
* subsequent scale in requests until it has expired. The intention is to scale in
* conservatively to protect your application's availability. However, if another
* alarm triggers a scale-out policy during the cooldown period after a scale-in,
* AWS Auto Scaling scales out your scalable target immediately.</p>
*/
inline TargetTrackingConfiguration& WithScaleInCooldown(int value) { SetScaleInCooldown(value); return *this;}
/**
* <p>The estimated time, in seconds, until a newly launched instance can
* contribute to the CloudWatch metrics. This value is used only if the resource is
* an Auto Scaling group.</p>
*/
inline int GetEstimatedInstanceWarmup() const{ return m_estimatedInstanceWarmup; }
/**
* <p>The estimated time, in seconds, until a newly launched instance can
* contribute to the CloudWatch metrics. This value is used only if the resource is
* an Auto Scaling group.</p>
*/
inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; }
/**
* <p>The estimated time, in seconds, until a newly launched instance can
* contribute to the CloudWatch metrics. This value is used only if the resource is
* an Auto Scaling group.</p>
*/
inline void SetEstimatedInstanceWarmup(int value) { m_estimatedInstanceWarmupHasBeenSet = true; m_estimatedInstanceWarmup = value; }
/**
* <p>The estimated time, in seconds, until a newly launched instance can
* contribute to the CloudWatch metrics. This value is used only if the resource is
* an Auto Scaling group.</p>
*/
inline TargetTrackingConfiguration& WithEstimatedInstanceWarmup(int value) { SetEstimatedInstanceWarmup(value); return *this;}
private:
PredefinedScalingMetricSpecification m_predefinedScalingMetricSpecification;
bool m_predefinedScalingMetricSpecificationHasBeenSet;
CustomizedScalingMetricSpecification m_customizedScalingMetricSpecification;
bool m_customizedScalingMetricSpecificationHasBeenSet;
double m_targetValue;
bool m_targetValueHasBeenSet;
bool m_disableScaleIn;
bool m_disableScaleInHasBeenSet;
int m_scaleOutCooldown;
bool m_scaleOutCooldownHasBeenSet;
int m_scaleInCooldown;
bool m_scaleInCooldownHasBeenSet;
int m_estimatedInstanceWarmup;
bool m_estimatedInstanceWarmupHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,190 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
#include <aws/autoscaling-plans/AutoScalingPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/autoscaling-plans/model/ApplicationSource.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/autoscaling-plans/model/ScalingInstruction.h>
#include <utility>
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
/**
*/
class AWS_AUTOSCALINGPLANS_API UpdateScalingPlanRequest : public AutoScalingPlansRequest
{
public:
UpdateScalingPlanRequest();
// 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 "UpdateScalingPlan"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The name of the scaling plan.</p>
*/
inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; }
/**
* <p>The name of the scaling plan.</p>
*/
inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); }
/**
* <p>The name of the scaling plan.</p>
*/
inline UpdateScalingPlanRequest& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline UpdateScalingPlanRequest& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;}
/**
* <p>The name of the scaling plan.</p>
*/
inline UpdateScalingPlanRequest& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;}
/**
* <p>The version number of the scaling plan.</p>
*/
inline long long GetScalingPlanVersion() const{ return m_scalingPlanVersion; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline bool ScalingPlanVersionHasBeenSet() const { return m_scalingPlanVersionHasBeenSet; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline void SetScalingPlanVersion(long long value) { m_scalingPlanVersionHasBeenSet = true; m_scalingPlanVersion = value; }
/**
* <p>The version number of the scaling plan.</p>
*/
inline UpdateScalingPlanRequest& WithScalingPlanVersion(long long value) { SetScalingPlanVersion(value); return *this;}
/**
* <p>A CloudFormation stack or set of tags.</p>
*/
inline const ApplicationSource& GetApplicationSource() const{ return m_applicationSource; }
/**
* <p>A CloudFormation stack or set of tags.</p>
*/
inline bool ApplicationSourceHasBeenSet() const { return m_applicationSourceHasBeenSet; }
/**
* <p>A CloudFormation stack or set of tags.</p>
*/
inline void SetApplicationSource(const ApplicationSource& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = value; }
/**
* <p>A CloudFormation stack or set of tags.</p>
*/
inline void SetApplicationSource(ApplicationSource&& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = std::move(value); }
/**
* <p>A CloudFormation stack or set of tags.</p>
*/
inline UpdateScalingPlanRequest& WithApplicationSource(const ApplicationSource& value) { SetApplicationSource(value); return *this;}
/**
* <p>A CloudFormation stack or set of tags.</p>
*/
inline UpdateScalingPlanRequest& WithApplicationSource(ApplicationSource&& value) { SetApplicationSource(std::move(value)); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline const Aws::Vector<ScalingInstruction>& GetScalingInstructions() const{ return m_scalingInstructions; }
/**
* <p>The scaling instructions.</p>
*/
inline bool ScalingInstructionsHasBeenSet() const { return m_scalingInstructionsHasBeenSet; }
/**
* <p>The scaling instructions.</p>
*/
inline void SetScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = value; }
/**
* <p>The scaling instructions.</p>
*/
inline void SetScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = std::move(value); }
/**
* <p>The scaling instructions.</p>
*/
inline UpdateScalingPlanRequest& WithScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { SetScalingInstructions(value); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline UpdateScalingPlanRequest& WithScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { SetScalingInstructions(std::move(value)); return *this;}
/**
* <p>The scaling instructions.</p>
*/
inline UpdateScalingPlanRequest& AddScalingInstructions(const ScalingInstruction& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(value); return *this; }
/**
* <p>The scaling instructions.</p>
*/
inline UpdateScalingPlanRequest& AddScalingInstructions(ScalingInstruction&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(std::move(value)); return *this; }
private:
Aws::String m_scalingPlanName;
bool m_scalingPlanNameHasBeenSet;
long long m_scalingPlanVersion;
bool m_scalingPlanVersionHasBeenSet;
ApplicationSource m_applicationSource;
bool m_applicationSourceHasBeenSet;
Aws::Vector<ScalingInstruction> m_scalingInstructions;
bool m_scalingInstructionsHasBeenSet;
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace AutoScalingPlans
{
namespace Model
{
class AWS_AUTOSCALINGPLANS_API UpdateScalingPlanResult
{
public:
UpdateScalingPlanResult();
UpdateScalingPlanResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
UpdateScalingPlanResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,264 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/autoscaling-plans/AutoScalingPlansClient.h>
#include <aws/autoscaling-plans/AutoScalingPlansEndpoint.h>
#include <aws/autoscaling-plans/AutoScalingPlansErrorMarshaller.h>
#include <aws/autoscaling-plans/model/CreateScalingPlanRequest.h>
#include <aws/autoscaling-plans/model/DeleteScalingPlanRequest.h>
#include <aws/autoscaling-plans/model/DescribeScalingPlanResourcesRequest.h>
#include <aws/autoscaling-plans/model/DescribeScalingPlansRequest.h>
#include <aws/autoscaling-plans/model/GetScalingPlanResourceForecastDataRequest.h>
#include <aws/autoscaling-plans/model/UpdateScalingPlanRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::AutoScalingPlans;
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "autoscaling-plans";
static const char* ALLOCATION_TAG = "AutoScalingPlansClient";
AutoScalingPlansClient::AutoScalingPlansClient(const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<AutoScalingPlansErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
AutoScalingPlansClient::AutoScalingPlansClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<AutoScalingPlansErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
AutoScalingPlansClient::AutoScalingPlansClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<AutoScalingPlansErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
AutoScalingPlansClient::~AutoScalingPlansClient()
{
}
void AutoScalingPlansClient::init(const ClientConfiguration& config)
{
SetServiceClientName("Auto Scaling Plans");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + AutoScalingPlansEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void AutoScalingPlansClient::OverrideEndpoint(const Aws::String& endpoint)
{
if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
{
m_uri = endpoint;
}
else
{
m_uri = m_configScheme + "://" + endpoint;
}
}
CreateScalingPlanOutcome AutoScalingPlansClient::CreateScalingPlan(const CreateScalingPlanRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return CreateScalingPlanOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateScalingPlanOutcomeCallable AutoScalingPlansClient::CreateScalingPlanCallable(const CreateScalingPlanRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateScalingPlanOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateScalingPlan(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void AutoScalingPlansClient::CreateScalingPlanAsync(const CreateScalingPlanRequest& request, const CreateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateScalingPlanAsyncHelper( request, handler, context ); } );
}
void AutoScalingPlansClient::CreateScalingPlanAsyncHelper(const CreateScalingPlanRequest& request, const CreateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateScalingPlan(request), context);
}
DeleteScalingPlanOutcome AutoScalingPlansClient::DeleteScalingPlan(const DeleteScalingPlanRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return DeleteScalingPlanOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DeleteScalingPlanOutcomeCallable AutoScalingPlansClient::DeleteScalingPlanCallable(const DeleteScalingPlanRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DeleteScalingPlanOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteScalingPlan(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void AutoScalingPlansClient::DeleteScalingPlanAsync(const DeleteScalingPlanRequest& request, const DeleteScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DeleteScalingPlanAsyncHelper( request, handler, context ); } );
}
void AutoScalingPlansClient::DeleteScalingPlanAsyncHelper(const DeleteScalingPlanRequest& request, const DeleteScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DeleteScalingPlan(request), context);
}
DescribeScalingPlanResourcesOutcome AutoScalingPlansClient::DescribeScalingPlanResources(const DescribeScalingPlanResourcesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeScalingPlanResourcesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DescribeScalingPlanResourcesOutcomeCallable AutoScalingPlansClient::DescribeScalingPlanResourcesCallable(const DescribeScalingPlanResourcesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeScalingPlanResourcesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeScalingPlanResources(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void AutoScalingPlansClient::DescribeScalingPlanResourcesAsync(const DescribeScalingPlanResourcesRequest& request, const DescribeScalingPlanResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeScalingPlanResourcesAsyncHelper( request, handler, context ); } );
}
void AutoScalingPlansClient::DescribeScalingPlanResourcesAsyncHelper(const DescribeScalingPlanResourcesRequest& request, const DescribeScalingPlanResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeScalingPlanResources(request), context);
}
DescribeScalingPlansOutcome AutoScalingPlansClient::DescribeScalingPlans(const DescribeScalingPlansRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeScalingPlansOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DescribeScalingPlansOutcomeCallable AutoScalingPlansClient::DescribeScalingPlansCallable(const DescribeScalingPlansRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeScalingPlansOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeScalingPlans(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void AutoScalingPlansClient::DescribeScalingPlansAsync(const DescribeScalingPlansRequest& request, const DescribeScalingPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeScalingPlansAsyncHelper( request, handler, context ); } );
}
void AutoScalingPlansClient::DescribeScalingPlansAsyncHelper(const DescribeScalingPlansRequest& request, const DescribeScalingPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeScalingPlans(request), context);
}
GetScalingPlanResourceForecastDataOutcome AutoScalingPlansClient::GetScalingPlanResourceForecastData(const GetScalingPlanResourceForecastDataRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return GetScalingPlanResourceForecastDataOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
GetScalingPlanResourceForecastDataOutcomeCallable AutoScalingPlansClient::GetScalingPlanResourceForecastDataCallable(const GetScalingPlanResourceForecastDataRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetScalingPlanResourceForecastDataOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetScalingPlanResourceForecastData(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void AutoScalingPlansClient::GetScalingPlanResourceForecastDataAsync(const GetScalingPlanResourceForecastDataRequest& request, const GetScalingPlanResourceForecastDataResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetScalingPlanResourceForecastDataAsyncHelper( request, handler, context ); } );
}
void AutoScalingPlansClient::GetScalingPlanResourceForecastDataAsyncHelper(const GetScalingPlanResourceForecastDataRequest& request, const GetScalingPlanResourceForecastDataResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetScalingPlanResourceForecastData(request), context);
}
UpdateScalingPlanOutcome AutoScalingPlansClient::UpdateScalingPlan(const UpdateScalingPlanRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/";
uri.SetPath(uri.GetPath() + ss.str());
return UpdateScalingPlanOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UpdateScalingPlanOutcomeCallable AutoScalingPlansClient::UpdateScalingPlanCallable(const UpdateScalingPlanRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UpdateScalingPlanOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateScalingPlan(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void AutoScalingPlansClient::UpdateScalingPlanAsync(const UpdateScalingPlanRequest& request, const UpdateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UpdateScalingPlanAsyncHelper( request, handler, context ); } );
}
void AutoScalingPlansClient::UpdateScalingPlanAsyncHelper(const UpdateScalingPlanRequest& request, const UpdateScalingPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UpdateScalingPlan(request), context);
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/AutoScalingPlansEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::AutoScalingPlans;
namespace Aws
{
namespace AutoScalingPlans
{
namespace AutoScalingPlansEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "autoscaling-plans" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace AutoScalingPlansEndpoint
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/autoscaling-plans/AutoScalingPlansErrorMarshaller.h>
#include <aws/autoscaling-plans/AutoScalingPlansErrors.h>
using namespace Aws::Client;
using namespace Aws::AutoScalingPlans;
AWSError<CoreErrors> AutoScalingPlansErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = AutoScalingPlansErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/autoscaling-plans/AutoScalingPlansErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::AutoScalingPlans;
namespace Aws
{
namespace AutoScalingPlans
{
namespace AutoScalingPlansErrorMapper
{
static const int LIMIT_EXCEEDED_HASH = HashingUtils::HashString("LimitExceededException");
static const int CONCURRENT_UPDATE_HASH = HashingUtils::HashString("ConcurrentUpdateException");
static const int INTERNAL_SERVICE_HASH = HashingUtils::HashString("InternalServiceException");
static const int OBJECT_NOT_FOUND_HASH = HashingUtils::HashString("ObjectNotFoundException");
static const int INVALID_NEXT_TOKEN_HASH = HashingUtils::HashString("InvalidNextTokenException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(AutoScalingPlansErrors::LIMIT_EXCEEDED), true);
}
else if (hashCode == CONCURRENT_UPDATE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(AutoScalingPlansErrors::CONCURRENT_UPDATE), false);
}
else if (hashCode == INTERNAL_SERVICE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(AutoScalingPlansErrors::INTERNAL_SERVICE), false);
}
else if (hashCode == OBJECT_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(AutoScalingPlansErrors::OBJECT_NOT_FOUND), false);
}
else if (hashCode == INVALID_NEXT_TOKEN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(AutoScalingPlansErrors::INVALID_NEXT_TOKEN), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace AutoScalingPlansErrorMapper
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ApplicationSource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
ApplicationSource::ApplicationSource() :
m_cloudFormationStackARNHasBeenSet(false),
m_tagFiltersHasBeenSet(false)
{
}
ApplicationSource::ApplicationSource(JsonView jsonValue) :
m_cloudFormationStackARNHasBeenSet(false),
m_tagFiltersHasBeenSet(false)
{
*this = jsonValue;
}
ApplicationSource& ApplicationSource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CloudFormationStackARN"))
{
m_cloudFormationStackARN = jsonValue.GetString("CloudFormationStackARN");
m_cloudFormationStackARNHasBeenSet = true;
}
if(jsonValue.ValueExists("TagFilters"))
{
Array<JsonView> tagFiltersJsonList = jsonValue.GetArray("TagFilters");
for(unsigned tagFiltersIndex = 0; tagFiltersIndex < tagFiltersJsonList.GetLength(); ++tagFiltersIndex)
{
m_tagFilters.push_back(tagFiltersJsonList[tagFiltersIndex].AsObject());
}
m_tagFiltersHasBeenSet = true;
}
return *this;
}
JsonValue ApplicationSource::Jsonize() const
{
JsonValue payload;
if(m_cloudFormationStackARNHasBeenSet)
{
payload.WithString("CloudFormationStackARN", m_cloudFormationStackARN);
}
if(m_tagFiltersHasBeenSet)
{
Array<JsonValue> tagFiltersJsonList(m_tagFilters.size());
for(unsigned tagFiltersIndex = 0; tagFiltersIndex < tagFiltersJsonList.GetLength(); ++tagFiltersIndex)
{
tagFiltersJsonList[tagFiltersIndex].AsObject(m_tagFilters[tagFiltersIndex].Jsonize());
}
payload.WithArray("TagFilters", std::move(tagFiltersJsonList));
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/CreateScalingPlanRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateScalingPlanRequest::CreateScalingPlanRequest() :
m_scalingPlanNameHasBeenSet(false),
m_applicationSourceHasBeenSet(false),
m_scalingInstructionsHasBeenSet(false)
{
}
Aws::String CreateScalingPlanRequest::SerializePayload() const
{
JsonValue payload;
if(m_scalingPlanNameHasBeenSet)
{
payload.WithString("ScalingPlanName", m_scalingPlanName);
}
if(m_applicationSourceHasBeenSet)
{
payload.WithObject("ApplicationSource", m_applicationSource.Jsonize());
}
if(m_scalingInstructionsHasBeenSet)
{
Array<JsonValue> scalingInstructionsJsonList(m_scalingInstructions.size());
for(unsigned scalingInstructionsIndex = 0; scalingInstructionsIndex < scalingInstructionsJsonList.GetLength(); ++scalingInstructionsIndex)
{
scalingInstructionsJsonList[scalingInstructionsIndex].AsObject(m_scalingInstructions[scalingInstructionsIndex].Jsonize());
}
payload.WithArray("ScalingInstructions", std::move(scalingInstructionsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateScalingPlanRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleScalingPlannerFrontendService.CreateScalingPlan"));
return headers;
}

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/CreateScalingPlanResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateScalingPlanResult::CreateScalingPlanResult() :
m_scalingPlanVersion(0)
{
}
CreateScalingPlanResult::CreateScalingPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_scalingPlanVersion(0)
{
*this = result;
}
CreateScalingPlanResult& CreateScalingPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ScalingPlanVersion"))
{
m_scalingPlanVersion = jsonValue.GetInt64("ScalingPlanVersion");
}
return *this;
}

View File

@@ -0,0 +1,128 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/CustomizedLoadMetricSpecification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
CustomizedLoadMetricSpecification::CustomizedLoadMetricSpecification() :
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statistic(MetricStatistic::NOT_SET),
m_statisticHasBeenSet(false),
m_unitHasBeenSet(false)
{
}
CustomizedLoadMetricSpecification::CustomizedLoadMetricSpecification(JsonView jsonValue) :
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statistic(MetricStatistic::NOT_SET),
m_statisticHasBeenSet(false),
m_unitHasBeenSet(false)
{
*this = jsonValue;
}
CustomizedLoadMetricSpecification& CustomizedLoadMetricSpecification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("MetricName"))
{
m_metricName = jsonValue.GetString("MetricName");
m_metricNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Namespace"))
{
m_namespace = jsonValue.GetString("Namespace");
m_namespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("Dimensions"))
{
Array<JsonView> dimensionsJsonList = jsonValue.GetArray("Dimensions");
for(unsigned dimensionsIndex = 0; dimensionsIndex < dimensionsJsonList.GetLength(); ++dimensionsIndex)
{
m_dimensions.push_back(dimensionsJsonList[dimensionsIndex].AsObject());
}
m_dimensionsHasBeenSet = true;
}
if(jsonValue.ValueExists("Statistic"))
{
m_statistic = MetricStatisticMapper::GetMetricStatisticForName(jsonValue.GetString("Statistic"));
m_statisticHasBeenSet = true;
}
if(jsonValue.ValueExists("Unit"))
{
m_unit = jsonValue.GetString("Unit");
m_unitHasBeenSet = true;
}
return *this;
}
JsonValue CustomizedLoadMetricSpecification::Jsonize() const
{
JsonValue payload;
if(m_metricNameHasBeenSet)
{
payload.WithString("MetricName", m_metricName);
}
if(m_namespaceHasBeenSet)
{
payload.WithString("Namespace", m_namespace);
}
if(m_dimensionsHasBeenSet)
{
Array<JsonValue> dimensionsJsonList(m_dimensions.size());
for(unsigned dimensionsIndex = 0; dimensionsIndex < dimensionsJsonList.GetLength(); ++dimensionsIndex)
{
dimensionsJsonList[dimensionsIndex].AsObject(m_dimensions[dimensionsIndex].Jsonize());
}
payload.WithArray("Dimensions", std::move(dimensionsJsonList));
}
if(m_statisticHasBeenSet)
{
payload.WithString("Statistic", MetricStatisticMapper::GetNameForMetricStatistic(m_statistic));
}
if(m_unitHasBeenSet)
{
payload.WithString("Unit", m_unit);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,128 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/CustomizedScalingMetricSpecification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
CustomizedScalingMetricSpecification::CustomizedScalingMetricSpecification() :
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statistic(MetricStatistic::NOT_SET),
m_statisticHasBeenSet(false),
m_unitHasBeenSet(false)
{
}
CustomizedScalingMetricSpecification::CustomizedScalingMetricSpecification(JsonView jsonValue) :
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statistic(MetricStatistic::NOT_SET),
m_statisticHasBeenSet(false),
m_unitHasBeenSet(false)
{
*this = jsonValue;
}
CustomizedScalingMetricSpecification& CustomizedScalingMetricSpecification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("MetricName"))
{
m_metricName = jsonValue.GetString("MetricName");
m_metricNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Namespace"))
{
m_namespace = jsonValue.GetString("Namespace");
m_namespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("Dimensions"))
{
Array<JsonView> dimensionsJsonList = jsonValue.GetArray("Dimensions");
for(unsigned dimensionsIndex = 0; dimensionsIndex < dimensionsJsonList.GetLength(); ++dimensionsIndex)
{
m_dimensions.push_back(dimensionsJsonList[dimensionsIndex].AsObject());
}
m_dimensionsHasBeenSet = true;
}
if(jsonValue.ValueExists("Statistic"))
{
m_statistic = MetricStatisticMapper::GetMetricStatisticForName(jsonValue.GetString("Statistic"));
m_statisticHasBeenSet = true;
}
if(jsonValue.ValueExists("Unit"))
{
m_unit = jsonValue.GetString("Unit");
m_unitHasBeenSet = true;
}
return *this;
}
JsonValue CustomizedScalingMetricSpecification::Jsonize() const
{
JsonValue payload;
if(m_metricNameHasBeenSet)
{
payload.WithString("MetricName", m_metricName);
}
if(m_namespaceHasBeenSet)
{
payload.WithString("Namespace", m_namespace);
}
if(m_dimensionsHasBeenSet)
{
Array<JsonValue> dimensionsJsonList(m_dimensions.size());
for(unsigned dimensionsIndex = 0; dimensionsIndex < dimensionsJsonList.GetLength(); ++dimensionsIndex)
{
dimensionsJsonList[dimensionsIndex].AsObject(m_dimensions[dimensionsIndex].Jsonize());
}
payload.WithArray("Dimensions", std::move(dimensionsJsonList));
}
if(m_statisticHasBeenSet)
{
payload.WithString("Statistic", MetricStatisticMapper::GetNameForMetricStatistic(m_statistic));
}
if(m_unitHasBeenSet)
{
payload.WithString("Unit", m_unit);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/Datapoint.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
Datapoint::Datapoint() :
m_timestampHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false)
{
}
Datapoint::Datapoint(JsonView jsonValue) :
m_timestampHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
Datapoint& Datapoint::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Timestamp"))
{
m_timestamp = jsonValue.GetDouble("Timestamp");
m_timestampHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetDouble("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue Datapoint::Jsonize() const
{
JsonValue payload;
if(m_timestampHasBeenSet)
{
payload.WithDouble("Timestamp", m_timestamp.SecondsWithMSPrecision());
}
if(m_valueHasBeenSet)
{
payload.WithDouble("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/DeleteScalingPlanRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteScalingPlanRequest::DeleteScalingPlanRequest() :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false)
{
}
Aws::String DeleteScalingPlanRequest::SerializePayload() const
{
JsonValue payload;
if(m_scalingPlanNameHasBeenSet)
{
payload.WithString("ScalingPlanName", m_scalingPlanName);
}
if(m_scalingPlanVersionHasBeenSet)
{
payload.WithInt64("ScalingPlanVersion", m_scalingPlanVersion);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteScalingPlanRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleScalingPlannerFrontendService.DeleteScalingPlan"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/DeleteScalingPlanResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteScalingPlanResult::DeleteScalingPlanResult()
{
}
DeleteScalingPlanResult::DeleteScalingPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteScalingPlanResult& DeleteScalingPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,66 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/DescribeScalingPlanResourcesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeScalingPlanResourcesRequest::DescribeScalingPlanResourcesRequest() :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeScalingPlanResourcesRequest::SerializePayload() const
{
JsonValue payload;
if(m_scalingPlanNameHasBeenSet)
{
payload.WithString("ScalingPlanName", m_scalingPlanName);
}
if(m_scalingPlanVersionHasBeenSet)
{
payload.WithInt64("ScalingPlanVersion", m_scalingPlanVersion);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeScalingPlanResourcesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleScalingPlannerFrontendService.DescribeScalingPlanResources"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/DescribeScalingPlanResourcesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeScalingPlanResourcesResult::DescribeScalingPlanResourcesResult()
{
}
DescribeScalingPlanResourcesResult::DescribeScalingPlanResourcesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeScalingPlanResourcesResult& DescribeScalingPlanResourcesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ScalingPlanResources"))
{
Array<JsonView> scalingPlanResourcesJsonList = jsonValue.GetArray("ScalingPlanResources");
for(unsigned scalingPlanResourcesIndex = 0; scalingPlanResourcesIndex < scalingPlanResourcesJsonList.GetLength(); ++scalingPlanResourcesIndex)
{
m_scalingPlanResources.push_back(scalingPlanResourcesJsonList[scalingPlanResourcesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/DescribeScalingPlansRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeScalingPlansRequest::DescribeScalingPlansRequest() :
m_scalingPlanNamesHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_applicationSourcesHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeScalingPlansRequest::SerializePayload() const
{
JsonValue payload;
if(m_scalingPlanNamesHasBeenSet)
{
Array<JsonValue> scalingPlanNamesJsonList(m_scalingPlanNames.size());
for(unsigned scalingPlanNamesIndex = 0; scalingPlanNamesIndex < scalingPlanNamesJsonList.GetLength(); ++scalingPlanNamesIndex)
{
scalingPlanNamesJsonList[scalingPlanNamesIndex].AsString(m_scalingPlanNames[scalingPlanNamesIndex]);
}
payload.WithArray("ScalingPlanNames", std::move(scalingPlanNamesJsonList));
}
if(m_scalingPlanVersionHasBeenSet)
{
payload.WithInt64("ScalingPlanVersion", m_scalingPlanVersion);
}
if(m_applicationSourcesHasBeenSet)
{
Array<JsonValue> applicationSourcesJsonList(m_applicationSources.size());
for(unsigned applicationSourcesIndex = 0; applicationSourcesIndex < applicationSourcesJsonList.GetLength(); ++applicationSourcesIndex)
{
applicationSourcesJsonList[applicationSourcesIndex].AsObject(m_applicationSources[applicationSourcesIndex].Jsonize());
}
payload.WithArray("ApplicationSources", std::move(applicationSourcesJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeScalingPlansRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleScalingPlannerFrontendService.DescribeScalingPlans"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/DescribeScalingPlansResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeScalingPlansResult::DescribeScalingPlansResult()
{
}
DescribeScalingPlansResult::DescribeScalingPlansResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeScalingPlansResult& DescribeScalingPlansResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ScalingPlans"))
{
Array<JsonView> scalingPlansJsonList = jsonValue.GetArray("ScalingPlans");
for(unsigned scalingPlansIndex = 0; scalingPlansIndex < scalingPlansJsonList.GetLength(); ++scalingPlansIndex)
{
m_scalingPlans.push_back(scalingPlansJsonList[scalingPlansIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
return *this;
}

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ForecastDataType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace ForecastDataTypeMapper
{
static const int CapacityForecast_HASH = HashingUtils::HashString("CapacityForecast");
static const int LoadForecast_HASH = HashingUtils::HashString("LoadForecast");
static const int ScheduledActionMinCapacity_HASH = HashingUtils::HashString("ScheduledActionMinCapacity");
static const int ScheduledActionMaxCapacity_HASH = HashingUtils::HashString("ScheduledActionMaxCapacity");
ForecastDataType GetForecastDataTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CapacityForecast_HASH)
{
return ForecastDataType::CapacityForecast;
}
else if (hashCode == LoadForecast_HASH)
{
return ForecastDataType::LoadForecast;
}
else if (hashCode == ScheduledActionMinCapacity_HASH)
{
return ForecastDataType::ScheduledActionMinCapacity;
}
else if (hashCode == ScheduledActionMaxCapacity_HASH)
{
return ForecastDataType::ScheduledActionMaxCapacity;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ForecastDataType>(hashCode);
}
return ForecastDataType::NOT_SET;
}
Aws::String GetNameForForecastDataType(ForecastDataType enumValue)
{
switch(enumValue)
{
case ForecastDataType::CapacityForecast:
return "CapacityForecast";
case ForecastDataType::LoadForecast:
return "LoadForecast";
case ForecastDataType::ScheduledActionMinCapacity:
return "ScheduledActionMinCapacity";
case ForecastDataType::ScheduledActionMaxCapacity:
return "ScheduledActionMaxCapacity";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ForecastDataTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/GetScalingPlanResourceForecastDataRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetScalingPlanResourceForecastDataRequest::GetScalingPlanResourceForecastDataRequest() :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_serviceNamespace(ServiceNamespace::NOT_SET),
m_serviceNamespaceHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_scalableDimension(ScalableDimension::NOT_SET),
m_scalableDimensionHasBeenSet(false),
m_forecastDataType(ForecastDataType::NOT_SET),
m_forecastDataTypeHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false)
{
}
Aws::String GetScalingPlanResourceForecastDataRequest::SerializePayload() const
{
JsonValue payload;
if(m_scalingPlanNameHasBeenSet)
{
payload.WithString("ScalingPlanName", m_scalingPlanName);
}
if(m_scalingPlanVersionHasBeenSet)
{
payload.WithInt64("ScalingPlanVersion", m_scalingPlanVersion);
}
if(m_serviceNamespaceHasBeenSet)
{
payload.WithString("ServiceNamespace", ServiceNamespaceMapper::GetNameForServiceNamespace(m_serviceNamespace));
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_scalableDimensionHasBeenSet)
{
payload.WithString("ScalableDimension", ScalableDimensionMapper::GetNameForScalableDimension(m_scalableDimension));
}
if(m_forecastDataTypeHasBeenSet)
{
payload.WithString("ForecastDataType", ForecastDataTypeMapper::GetNameForForecastDataType(m_forecastDataType));
}
if(m_startTimeHasBeenSet)
{
payload.WithDouble("StartTime", m_startTime.SecondsWithMSPrecision());
}
if(m_endTimeHasBeenSet)
{
payload.WithDouble("EndTime", m_endTime.SecondsWithMSPrecision());
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetScalingPlanResourceForecastDataRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleScalingPlannerFrontendService.GetScalingPlanResourceForecastData"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/GetScalingPlanResourceForecastDataResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetScalingPlanResourceForecastDataResult::GetScalingPlanResourceForecastDataResult()
{
}
GetScalingPlanResourceForecastDataResult::GetScalingPlanResourceForecastDataResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetScalingPlanResourceForecastDataResult& GetScalingPlanResourceForecastDataResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Datapoints"))
{
Array<JsonView> datapointsJsonList = jsonValue.GetArray("Datapoints");
for(unsigned datapointsIndex = 0; datapointsIndex < datapointsJsonList.GetLength(); ++datapointsIndex)
{
m_datapoints.push_back(datapointsJsonList[datapointsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/LoadMetricType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace LoadMetricTypeMapper
{
static const int ASGTotalCPUUtilization_HASH = HashingUtils::HashString("ASGTotalCPUUtilization");
static const int ASGTotalNetworkIn_HASH = HashingUtils::HashString("ASGTotalNetworkIn");
static const int ASGTotalNetworkOut_HASH = HashingUtils::HashString("ASGTotalNetworkOut");
static const int ALBTargetGroupRequestCount_HASH = HashingUtils::HashString("ALBTargetGroupRequestCount");
LoadMetricType GetLoadMetricTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ASGTotalCPUUtilization_HASH)
{
return LoadMetricType::ASGTotalCPUUtilization;
}
else if (hashCode == ASGTotalNetworkIn_HASH)
{
return LoadMetricType::ASGTotalNetworkIn;
}
else if (hashCode == ASGTotalNetworkOut_HASH)
{
return LoadMetricType::ASGTotalNetworkOut;
}
else if (hashCode == ALBTargetGroupRequestCount_HASH)
{
return LoadMetricType::ALBTargetGroupRequestCount;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<LoadMetricType>(hashCode);
}
return LoadMetricType::NOT_SET;
}
Aws::String GetNameForLoadMetricType(LoadMetricType enumValue)
{
switch(enumValue)
{
case LoadMetricType::ASGTotalCPUUtilization:
return "ASGTotalCPUUtilization";
case LoadMetricType::ASGTotalNetworkIn:
return "ASGTotalNetworkIn";
case LoadMetricType::ASGTotalNetworkOut:
return "ASGTotalNetworkOut";
case LoadMetricType::ALBTargetGroupRequestCount:
return "ALBTargetGroupRequestCount";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace LoadMetricTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/MetricDimension.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
MetricDimension::MetricDimension() :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
MetricDimension::MetricDimension(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
MetricDimension& MetricDimension::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue MetricDimension::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/MetricStatistic.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace MetricStatisticMapper
{
static const int Average_HASH = HashingUtils::HashString("Average");
static const int Minimum_HASH = HashingUtils::HashString("Minimum");
static const int Maximum_HASH = HashingUtils::HashString("Maximum");
static const int SampleCount_HASH = HashingUtils::HashString("SampleCount");
static const int Sum_HASH = HashingUtils::HashString("Sum");
MetricStatistic GetMetricStatisticForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Average_HASH)
{
return MetricStatistic::Average;
}
else if (hashCode == Minimum_HASH)
{
return MetricStatistic::Minimum;
}
else if (hashCode == Maximum_HASH)
{
return MetricStatistic::Maximum;
}
else if (hashCode == SampleCount_HASH)
{
return MetricStatistic::SampleCount;
}
else if (hashCode == Sum_HASH)
{
return MetricStatistic::Sum;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<MetricStatistic>(hashCode);
}
return MetricStatistic::NOT_SET;
}
Aws::String GetNameForMetricStatistic(MetricStatistic enumValue)
{
switch(enumValue)
{
case MetricStatistic::Average:
return "Average";
case MetricStatistic::Minimum:
return "Minimum";
case MetricStatistic::Maximum:
return "Maximum";
case MetricStatistic::SampleCount:
return "SampleCount";
case MetricStatistic::Sum:
return "Sum";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace MetricStatisticMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/PolicyType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace PolicyTypeMapper
{
static const int TargetTrackingScaling_HASH = HashingUtils::HashString("TargetTrackingScaling");
PolicyType GetPolicyTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == TargetTrackingScaling_HASH)
{
return PolicyType::TargetTrackingScaling;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PolicyType>(hashCode);
}
return PolicyType::NOT_SET;
}
Aws::String GetNameForPolicyType(PolicyType enumValue)
{
switch(enumValue)
{
case PolicyType::TargetTrackingScaling:
return "TargetTrackingScaling";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PolicyTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/PredefinedLoadMetricSpecification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
PredefinedLoadMetricSpecification::PredefinedLoadMetricSpecification() :
m_predefinedLoadMetricType(LoadMetricType::NOT_SET),
m_predefinedLoadMetricTypeHasBeenSet(false),
m_resourceLabelHasBeenSet(false)
{
}
PredefinedLoadMetricSpecification::PredefinedLoadMetricSpecification(JsonView jsonValue) :
m_predefinedLoadMetricType(LoadMetricType::NOT_SET),
m_predefinedLoadMetricTypeHasBeenSet(false),
m_resourceLabelHasBeenSet(false)
{
*this = jsonValue;
}
PredefinedLoadMetricSpecification& PredefinedLoadMetricSpecification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PredefinedLoadMetricType"))
{
m_predefinedLoadMetricType = LoadMetricTypeMapper::GetLoadMetricTypeForName(jsonValue.GetString("PredefinedLoadMetricType"));
m_predefinedLoadMetricTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceLabel"))
{
m_resourceLabel = jsonValue.GetString("ResourceLabel");
m_resourceLabelHasBeenSet = true;
}
return *this;
}
JsonValue PredefinedLoadMetricSpecification::Jsonize() const
{
JsonValue payload;
if(m_predefinedLoadMetricTypeHasBeenSet)
{
payload.WithString("PredefinedLoadMetricType", LoadMetricTypeMapper::GetNameForLoadMetricType(m_predefinedLoadMetricType));
}
if(m_resourceLabelHasBeenSet)
{
payload.WithString("ResourceLabel", m_resourceLabel);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/PredefinedScalingMetricSpecification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
PredefinedScalingMetricSpecification::PredefinedScalingMetricSpecification() :
m_predefinedScalingMetricType(ScalingMetricType::NOT_SET),
m_predefinedScalingMetricTypeHasBeenSet(false),
m_resourceLabelHasBeenSet(false)
{
}
PredefinedScalingMetricSpecification::PredefinedScalingMetricSpecification(JsonView jsonValue) :
m_predefinedScalingMetricType(ScalingMetricType::NOT_SET),
m_predefinedScalingMetricTypeHasBeenSet(false),
m_resourceLabelHasBeenSet(false)
{
*this = jsonValue;
}
PredefinedScalingMetricSpecification& PredefinedScalingMetricSpecification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PredefinedScalingMetricType"))
{
m_predefinedScalingMetricType = ScalingMetricTypeMapper::GetScalingMetricTypeForName(jsonValue.GetString("PredefinedScalingMetricType"));
m_predefinedScalingMetricTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceLabel"))
{
m_resourceLabel = jsonValue.GetString("ResourceLabel");
m_resourceLabelHasBeenSet = true;
}
return *this;
}
JsonValue PredefinedScalingMetricSpecification::Jsonize() const
{
JsonValue payload;
if(m_predefinedScalingMetricTypeHasBeenSet)
{
payload.WithString("PredefinedScalingMetricType", ScalingMetricTypeMapper::GetNameForScalingMetricType(m_predefinedScalingMetricType));
}
if(m_resourceLabelHasBeenSet)
{
payload.WithString("ResourceLabel", m_resourceLabel);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/PredictiveScalingMaxCapacityBehavior.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace PredictiveScalingMaxCapacityBehaviorMapper
{
static const int SetForecastCapacityToMaxCapacity_HASH = HashingUtils::HashString("SetForecastCapacityToMaxCapacity");
static const int SetMaxCapacityToForecastCapacity_HASH = HashingUtils::HashString("SetMaxCapacityToForecastCapacity");
static const int SetMaxCapacityAboveForecastCapacity_HASH = HashingUtils::HashString("SetMaxCapacityAboveForecastCapacity");
PredictiveScalingMaxCapacityBehavior GetPredictiveScalingMaxCapacityBehaviorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == SetForecastCapacityToMaxCapacity_HASH)
{
return PredictiveScalingMaxCapacityBehavior::SetForecastCapacityToMaxCapacity;
}
else if (hashCode == SetMaxCapacityToForecastCapacity_HASH)
{
return PredictiveScalingMaxCapacityBehavior::SetMaxCapacityToForecastCapacity;
}
else if (hashCode == SetMaxCapacityAboveForecastCapacity_HASH)
{
return PredictiveScalingMaxCapacityBehavior::SetMaxCapacityAboveForecastCapacity;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PredictiveScalingMaxCapacityBehavior>(hashCode);
}
return PredictiveScalingMaxCapacityBehavior::NOT_SET;
}
Aws::String GetNameForPredictiveScalingMaxCapacityBehavior(PredictiveScalingMaxCapacityBehavior enumValue)
{
switch(enumValue)
{
case PredictiveScalingMaxCapacityBehavior::SetForecastCapacityToMaxCapacity:
return "SetForecastCapacityToMaxCapacity";
case PredictiveScalingMaxCapacityBehavior::SetMaxCapacityToForecastCapacity:
return "SetMaxCapacityToForecastCapacity";
case PredictiveScalingMaxCapacityBehavior::SetMaxCapacityAboveForecastCapacity:
return "SetMaxCapacityAboveForecastCapacity";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PredictiveScalingMaxCapacityBehaviorMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/PredictiveScalingMode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace PredictiveScalingModeMapper
{
static const int ForecastAndScale_HASH = HashingUtils::HashString("ForecastAndScale");
static const int ForecastOnly_HASH = HashingUtils::HashString("ForecastOnly");
PredictiveScalingMode GetPredictiveScalingModeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ForecastAndScale_HASH)
{
return PredictiveScalingMode::ForecastAndScale;
}
else if (hashCode == ForecastOnly_HASH)
{
return PredictiveScalingMode::ForecastOnly;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PredictiveScalingMode>(hashCode);
}
return PredictiveScalingMode::NOT_SET;
}
Aws::String GetNameForPredictiveScalingMode(PredictiveScalingMode enumValue)
{
switch(enumValue)
{
case PredictiveScalingMode::ForecastAndScale:
return "ForecastAndScale";
case PredictiveScalingMode::ForecastOnly:
return "ForecastOnly";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PredictiveScalingModeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalableDimension.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace ScalableDimensionMapper
{
static const int autoscaling_autoScalingGroup_DesiredCapacity_HASH = HashingUtils::HashString("autoscaling:autoScalingGroup:DesiredCapacity");
static const int ecs_service_DesiredCount_HASH = HashingUtils::HashString("ecs:service:DesiredCount");
static const int ec2_spot_fleet_request_TargetCapacity_HASH = HashingUtils::HashString("ec2:spot-fleet-request:TargetCapacity");
static const int rds_cluster_ReadReplicaCount_HASH = HashingUtils::HashString("rds:cluster:ReadReplicaCount");
static const int dynamodb_table_ReadCapacityUnits_HASH = HashingUtils::HashString("dynamodb:table:ReadCapacityUnits");
static const int dynamodb_table_WriteCapacityUnits_HASH = HashingUtils::HashString("dynamodb:table:WriteCapacityUnits");
static const int dynamodb_index_ReadCapacityUnits_HASH = HashingUtils::HashString("dynamodb:index:ReadCapacityUnits");
static const int dynamodb_index_WriteCapacityUnits_HASH = HashingUtils::HashString("dynamodb:index:WriteCapacityUnits");
ScalableDimension GetScalableDimensionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == autoscaling_autoScalingGroup_DesiredCapacity_HASH)
{
return ScalableDimension::autoscaling_autoScalingGroup_DesiredCapacity;
}
else if (hashCode == ecs_service_DesiredCount_HASH)
{
return ScalableDimension::ecs_service_DesiredCount;
}
else if (hashCode == ec2_spot_fleet_request_TargetCapacity_HASH)
{
return ScalableDimension::ec2_spot_fleet_request_TargetCapacity;
}
else if (hashCode == rds_cluster_ReadReplicaCount_HASH)
{
return ScalableDimension::rds_cluster_ReadReplicaCount;
}
else if (hashCode == dynamodb_table_ReadCapacityUnits_HASH)
{
return ScalableDimension::dynamodb_table_ReadCapacityUnits;
}
else if (hashCode == dynamodb_table_WriteCapacityUnits_HASH)
{
return ScalableDimension::dynamodb_table_WriteCapacityUnits;
}
else if (hashCode == dynamodb_index_ReadCapacityUnits_HASH)
{
return ScalableDimension::dynamodb_index_ReadCapacityUnits;
}
else if (hashCode == dynamodb_index_WriteCapacityUnits_HASH)
{
return ScalableDimension::dynamodb_index_WriteCapacityUnits;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ScalableDimension>(hashCode);
}
return ScalableDimension::NOT_SET;
}
Aws::String GetNameForScalableDimension(ScalableDimension enumValue)
{
switch(enumValue)
{
case ScalableDimension::autoscaling_autoScalingGroup_DesiredCapacity:
return "autoscaling:autoScalingGroup:DesiredCapacity";
case ScalableDimension::ecs_service_DesiredCount:
return "ecs:service:DesiredCount";
case ScalableDimension::ec2_spot_fleet_request_TargetCapacity:
return "ec2:spot-fleet-request:TargetCapacity";
case ScalableDimension::rds_cluster_ReadReplicaCount:
return "rds:cluster:ReadReplicaCount";
case ScalableDimension::dynamodb_table_ReadCapacityUnits:
return "dynamodb:table:ReadCapacityUnits";
case ScalableDimension::dynamodb_table_WriteCapacityUnits:
return "dynamodb:table:WriteCapacityUnits";
case ScalableDimension::dynamodb_index_ReadCapacityUnits:
return "dynamodb:index:ReadCapacityUnits";
case ScalableDimension::dynamodb_index_WriteCapacityUnits:
return "dynamodb:index:WriteCapacityUnits";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ScalableDimensionMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,277 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingInstruction.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
ScalingInstruction::ScalingInstruction() :
m_serviceNamespace(ServiceNamespace::NOT_SET),
m_serviceNamespaceHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_scalableDimension(ScalableDimension::NOT_SET),
m_scalableDimensionHasBeenSet(false),
m_minCapacity(0),
m_minCapacityHasBeenSet(false),
m_maxCapacity(0),
m_maxCapacityHasBeenSet(false),
m_targetTrackingConfigurationsHasBeenSet(false),
m_predefinedLoadMetricSpecificationHasBeenSet(false),
m_customizedLoadMetricSpecificationHasBeenSet(false),
m_scheduledActionBufferTime(0),
m_scheduledActionBufferTimeHasBeenSet(false),
m_predictiveScalingMaxCapacityBehavior(PredictiveScalingMaxCapacityBehavior::NOT_SET),
m_predictiveScalingMaxCapacityBehaviorHasBeenSet(false),
m_predictiveScalingMaxCapacityBuffer(0),
m_predictiveScalingMaxCapacityBufferHasBeenSet(false),
m_predictiveScalingMode(PredictiveScalingMode::NOT_SET),
m_predictiveScalingModeHasBeenSet(false),
m_scalingPolicyUpdateBehavior(ScalingPolicyUpdateBehavior::NOT_SET),
m_scalingPolicyUpdateBehaviorHasBeenSet(false),
m_disableDynamicScaling(false),
m_disableDynamicScalingHasBeenSet(false)
{
}
ScalingInstruction::ScalingInstruction(JsonView jsonValue) :
m_serviceNamespace(ServiceNamespace::NOT_SET),
m_serviceNamespaceHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_scalableDimension(ScalableDimension::NOT_SET),
m_scalableDimensionHasBeenSet(false),
m_minCapacity(0),
m_minCapacityHasBeenSet(false),
m_maxCapacity(0),
m_maxCapacityHasBeenSet(false),
m_targetTrackingConfigurationsHasBeenSet(false),
m_predefinedLoadMetricSpecificationHasBeenSet(false),
m_customizedLoadMetricSpecificationHasBeenSet(false),
m_scheduledActionBufferTime(0),
m_scheduledActionBufferTimeHasBeenSet(false),
m_predictiveScalingMaxCapacityBehavior(PredictiveScalingMaxCapacityBehavior::NOT_SET),
m_predictiveScalingMaxCapacityBehaviorHasBeenSet(false),
m_predictiveScalingMaxCapacityBuffer(0),
m_predictiveScalingMaxCapacityBufferHasBeenSet(false),
m_predictiveScalingMode(PredictiveScalingMode::NOT_SET),
m_predictiveScalingModeHasBeenSet(false),
m_scalingPolicyUpdateBehavior(ScalingPolicyUpdateBehavior::NOT_SET),
m_scalingPolicyUpdateBehaviorHasBeenSet(false),
m_disableDynamicScaling(false),
m_disableDynamicScalingHasBeenSet(false)
{
*this = jsonValue;
}
ScalingInstruction& ScalingInstruction::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ServiceNamespace"))
{
m_serviceNamespace = ServiceNamespaceMapper::GetServiceNamespaceForName(jsonValue.GetString("ServiceNamespace"));
m_serviceNamespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalableDimension"))
{
m_scalableDimension = ScalableDimensionMapper::GetScalableDimensionForName(jsonValue.GetString("ScalableDimension"));
m_scalableDimensionHasBeenSet = true;
}
if(jsonValue.ValueExists("MinCapacity"))
{
m_minCapacity = jsonValue.GetInteger("MinCapacity");
m_minCapacityHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxCapacity"))
{
m_maxCapacity = jsonValue.GetInteger("MaxCapacity");
m_maxCapacityHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetTrackingConfigurations"))
{
Array<JsonView> targetTrackingConfigurationsJsonList = jsonValue.GetArray("TargetTrackingConfigurations");
for(unsigned targetTrackingConfigurationsIndex = 0; targetTrackingConfigurationsIndex < targetTrackingConfigurationsJsonList.GetLength(); ++targetTrackingConfigurationsIndex)
{
m_targetTrackingConfigurations.push_back(targetTrackingConfigurationsJsonList[targetTrackingConfigurationsIndex].AsObject());
}
m_targetTrackingConfigurationsHasBeenSet = true;
}
if(jsonValue.ValueExists("PredefinedLoadMetricSpecification"))
{
m_predefinedLoadMetricSpecification = jsonValue.GetObject("PredefinedLoadMetricSpecification");
m_predefinedLoadMetricSpecificationHasBeenSet = true;
}
if(jsonValue.ValueExists("CustomizedLoadMetricSpecification"))
{
m_customizedLoadMetricSpecification = jsonValue.GetObject("CustomizedLoadMetricSpecification");
m_customizedLoadMetricSpecificationHasBeenSet = true;
}
if(jsonValue.ValueExists("ScheduledActionBufferTime"))
{
m_scheduledActionBufferTime = jsonValue.GetInteger("ScheduledActionBufferTime");
m_scheduledActionBufferTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("PredictiveScalingMaxCapacityBehavior"))
{
m_predictiveScalingMaxCapacityBehavior = PredictiveScalingMaxCapacityBehaviorMapper::GetPredictiveScalingMaxCapacityBehaviorForName(jsonValue.GetString("PredictiveScalingMaxCapacityBehavior"));
m_predictiveScalingMaxCapacityBehaviorHasBeenSet = true;
}
if(jsonValue.ValueExists("PredictiveScalingMaxCapacityBuffer"))
{
m_predictiveScalingMaxCapacityBuffer = jsonValue.GetInteger("PredictiveScalingMaxCapacityBuffer");
m_predictiveScalingMaxCapacityBufferHasBeenSet = true;
}
if(jsonValue.ValueExists("PredictiveScalingMode"))
{
m_predictiveScalingMode = PredictiveScalingModeMapper::GetPredictiveScalingModeForName(jsonValue.GetString("PredictiveScalingMode"));
m_predictiveScalingModeHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalingPolicyUpdateBehavior"))
{
m_scalingPolicyUpdateBehavior = ScalingPolicyUpdateBehaviorMapper::GetScalingPolicyUpdateBehaviorForName(jsonValue.GetString("ScalingPolicyUpdateBehavior"));
m_scalingPolicyUpdateBehaviorHasBeenSet = true;
}
if(jsonValue.ValueExists("DisableDynamicScaling"))
{
m_disableDynamicScaling = jsonValue.GetBool("DisableDynamicScaling");
m_disableDynamicScalingHasBeenSet = true;
}
return *this;
}
JsonValue ScalingInstruction::Jsonize() const
{
JsonValue payload;
if(m_serviceNamespaceHasBeenSet)
{
payload.WithString("ServiceNamespace", ServiceNamespaceMapper::GetNameForServiceNamespace(m_serviceNamespace));
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_scalableDimensionHasBeenSet)
{
payload.WithString("ScalableDimension", ScalableDimensionMapper::GetNameForScalableDimension(m_scalableDimension));
}
if(m_minCapacityHasBeenSet)
{
payload.WithInteger("MinCapacity", m_minCapacity);
}
if(m_maxCapacityHasBeenSet)
{
payload.WithInteger("MaxCapacity", m_maxCapacity);
}
if(m_targetTrackingConfigurationsHasBeenSet)
{
Array<JsonValue> targetTrackingConfigurationsJsonList(m_targetTrackingConfigurations.size());
for(unsigned targetTrackingConfigurationsIndex = 0; targetTrackingConfigurationsIndex < targetTrackingConfigurationsJsonList.GetLength(); ++targetTrackingConfigurationsIndex)
{
targetTrackingConfigurationsJsonList[targetTrackingConfigurationsIndex].AsObject(m_targetTrackingConfigurations[targetTrackingConfigurationsIndex].Jsonize());
}
payload.WithArray("TargetTrackingConfigurations", std::move(targetTrackingConfigurationsJsonList));
}
if(m_predefinedLoadMetricSpecificationHasBeenSet)
{
payload.WithObject("PredefinedLoadMetricSpecification", m_predefinedLoadMetricSpecification.Jsonize());
}
if(m_customizedLoadMetricSpecificationHasBeenSet)
{
payload.WithObject("CustomizedLoadMetricSpecification", m_customizedLoadMetricSpecification.Jsonize());
}
if(m_scheduledActionBufferTimeHasBeenSet)
{
payload.WithInteger("ScheduledActionBufferTime", m_scheduledActionBufferTime);
}
if(m_predictiveScalingMaxCapacityBehaviorHasBeenSet)
{
payload.WithString("PredictiveScalingMaxCapacityBehavior", PredictiveScalingMaxCapacityBehaviorMapper::GetNameForPredictiveScalingMaxCapacityBehavior(m_predictiveScalingMaxCapacityBehavior));
}
if(m_predictiveScalingMaxCapacityBufferHasBeenSet)
{
payload.WithInteger("PredictiveScalingMaxCapacityBuffer", m_predictiveScalingMaxCapacityBuffer);
}
if(m_predictiveScalingModeHasBeenSet)
{
payload.WithString("PredictiveScalingMode", PredictiveScalingModeMapper::GetNameForPredictiveScalingMode(m_predictiveScalingMode));
}
if(m_scalingPolicyUpdateBehaviorHasBeenSet)
{
payload.WithString("ScalingPolicyUpdateBehavior", ScalingPolicyUpdateBehaviorMapper::GetNameForScalingPolicyUpdateBehavior(m_scalingPolicyUpdateBehavior));
}
if(m_disableDynamicScalingHasBeenSet)
{
payload.WithBool("DisableDynamicScaling", m_disableDynamicScaling);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,147 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingMetricType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace ScalingMetricTypeMapper
{
static const int ASGAverageCPUUtilization_HASH = HashingUtils::HashString("ASGAverageCPUUtilization");
static const int ASGAverageNetworkIn_HASH = HashingUtils::HashString("ASGAverageNetworkIn");
static const int ASGAverageNetworkOut_HASH = HashingUtils::HashString("ASGAverageNetworkOut");
static const int DynamoDBReadCapacityUtilization_HASH = HashingUtils::HashString("DynamoDBReadCapacityUtilization");
static const int DynamoDBWriteCapacityUtilization_HASH = HashingUtils::HashString("DynamoDBWriteCapacityUtilization");
static const int ECSServiceAverageCPUUtilization_HASH = HashingUtils::HashString("ECSServiceAverageCPUUtilization");
static const int ECSServiceAverageMemoryUtilization_HASH = HashingUtils::HashString("ECSServiceAverageMemoryUtilization");
static const int ALBRequestCountPerTarget_HASH = HashingUtils::HashString("ALBRequestCountPerTarget");
static const int RDSReaderAverageCPUUtilization_HASH = HashingUtils::HashString("RDSReaderAverageCPUUtilization");
static const int RDSReaderAverageDatabaseConnections_HASH = HashingUtils::HashString("RDSReaderAverageDatabaseConnections");
static const int EC2SpotFleetRequestAverageCPUUtilization_HASH = HashingUtils::HashString("EC2SpotFleetRequestAverageCPUUtilization");
static const int EC2SpotFleetRequestAverageNetworkIn_HASH = HashingUtils::HashString("EC2SpotFleetRequestAverageNetworkIn");
static const int EC2SpotFleetRequestAverageNetworkOut_HASH = HashingUtils::HashString("EC2SpotFleetRequestAverageNetworkOut");
ScalingMetricType GetScalingMetricTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ASGAverageCPUUtilization_HASH)
{
return ScalingMetricType::ASGAverageCPUUtilization;
}
else if (hashCode == ASGAverageNetworkIn_HASH)
{
return ScalingMetricType::ASGAverageNetworkIn;
}
else if (hashCode == ASGAverageNetworkOut_HASH)
{
return ScalingMetricType::ASGAverageNetworkOut;
}
else if (hashCode == DynamoDBReadCapacityUtilization_HASH)
{
return ScalingMetricType::DynamoDBReadCapacityUtilization;
}
else if (hashCode == DynamoDBWriteCapacityUtilization_HASH)
{
return ScalingMetricType::DynamoDBWriteCapacityUtilization;
}
else if (hashCode == ECSServiceAverageCPUUtilization_HASH)
{
return ScalingMetricType::ECSServiceAverageCPUUtilization;
}
else if (hashCode == ECSServiceAverageMemoryUtilization_HASH)
{
return ScalingMetricType::ECSServiceAverageMemoryUtilization;
}
else if (hashCode == ALBRequestCountPerTarget_HASH)
{
return ScalingMetricType::ALBRequestCountPerTarget;
}
else if (hashCode == RDSReaderAverageCPUUtilization_HASH)
{
return ScalingMetricType::RDSReaderAverageCPUUtilization;
}
else if (hashCode == RDSReaderAverageDatabaseConnections_HASH)
{
return ScalingMetricType::RDSReaderAverageDatabaseConnections;
}
else if (hashCode == EC2SpotFleetRequestAverageCPUUtilization_HASH)
{
return ScalingMetricType::EC2SpotFleetRequestAverageCPUUtilization;
}
else if (hashCode == EC2SpotFleetRequestAverageNetworkIn_HASH)
{
return ScalingMetricType::EC2SpotFleetRequestAverageNetworkIn;
}
else if (hashCode == EC2SpotFleetRequestAverageNetworkOut_HASH)
{
return ScalingMetricType::EC2SpotFleetRequestAverageNetworkOut;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ScalingMetricType>(hashCode);
}
return ScalingMetricType::NOT_SET;
}
Aws::String GetNameForScalingMetricType(ScalingMetricType enumValue)
{
switch(enumValue)
{
case ScalingMetricType::ASGAverageCPUUtilization:
return "ASGAverageCPUUtilization";
case ScalingMetricType::ASGAverageNetworkIn:
return "ASGAverageNetworkIn";
case ScalingMetricType::ASGAverageNetworkOut:
return "ASGAverageNetworkOut";
case ScalingMetricType::DynamoDBReadCapacityUtilization:
return "DynamoDBReadCapacityUtilization";
case ScalingMetricType::DynamoDBWriteCapacityUtilization:
return "DynamoDBWriteCapacityUtilization";
case ScalingMetricType::ECSServiceAverageCPUUtilization:
return "ECSServiceAverageCPUUtilization";
case ScalingMetricType::ECSServiceAverageMemoryUtilization:
return "ECSServiceAverageMemoryUtilization";
case ScalingMetricType::ALBRequestCountPerTarget:
return "ALBRequestCountPerTarget";
case ScalingMetricType::RDSReaderAverageCPUUtilization:
return "RDSReaderAverageCPUUtilization";
case ScalingMetricType::RDSReaderAverageDatabaseConnections:
return "RDSReaderAverageDatabaseConnections";
case ScalingMetricType::EC2SpotFleetRequestAverageCPUUtilization:
return "EC2SpotFleetRequestAverageCPUUtilization";
case ScalingMetricType::EC2SpotFleetRequestAverageNetworkIn:
return "EC2SpotFleetRequestAverageNetworkIn";
case ScalingMetricType::EC2SpotFleetRequestAverageNetworkOut:
return "EC2SpotFleetRequestAverageNetworkOut";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ScalingMetricTypeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,173 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingPlan.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
ScalingPlan::ScalingPlan() :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_applicationSourceHasBeenSet(false),
m_scalingInstructionsHasBeenSet(false),
m_statusCode(ScalingPlanStatusCode::NOT_SET),
m_statusCodeHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_statusStartTimeHasBeenSet(false),
m_creationTimeHasBeenSet(false)
{
}
ScalingPlan::ScalingPlan(JsonView jsonValue) :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_applicationSourceHasBeenSet(false),
m_scalingInstructionsHasBeenSet(false),
m_statusCode(ScalingPlanStatusCode::NOT_SET),
m_statusCodeHasBeenSet(false),
m_statusMessageHasBeenSet(false),
m_statusStartTimeHasBeenSet(false),
m_creationTimeHasBeenSet(false)
{
*this = jsonValue;
}
ScalingPlan& ScalingPlan::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ScalingPlanName"))
{
m_scalingPlanName = jsonValue.GetString("ScalingPlanName");
m_scalingPlanNameHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalingPlanVersion"))
{
m_scalingPlanVersion = jsonValue.GetInt64("ScalingPlanVersion");
m_scalingPlanVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("ApplicationSource"))
{
m_applicationSource = jsonValue.GetObject("ApplicationSource");
m_applicationSourceHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalingInstructions"))
{
Array<JsonView> scalingInstructionsJsonList = jsonValue.GetArray("ScalingInstructions");
for(unsigned scalingInstructionsIndex = 0; scalingInstructionsIndex < scalingInstructionsJsonList.GetLength(); ++scalingInstructionsIndex)
{
m_scalingInstructions.push_back(scalingInstructionsJsonList[scalingInstructionsIndex].AsObject());
}
m_scalingInstructionsHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusCode"))
{
m_statusCode = ScalingPlanStatusCodeMapper::GetScalingPlanStatusCodeForName(jsonValue.GetString("StatusCode"));
m_statusCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusMessage"))
{
m_statusMessage = jsonValue.GetString("StatusMessage");
m_statusMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusStartTime"))
{
m_statusStartTime = jsonValue.GetDouble("StatusStartTime");
m_statusStartTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("CreationTime"))
{
m_creationTime = jsonValue.GetDouble("CreationTime");
m_creationTimeHasBeenSet = true;
}
return *this;
}
JsonValue ScalingPlan::Jsonize() const
{
JsonValue payload;
if(m_scalingPlanNameHasBeenSet)
{
payload.WithString("ScalingPlanName", m_scalingPlanName);
}
if(m_scalingPlanVersionHasBeenSet)
{
payload.WithInt64("ScalingPlanVersion", m_scalingPlanVersion);
}
if(m_applicationSourceHasBeenSet)
{
payload.WithObject("ApplicationSource", m_applicationSource.Jsonize());
}
if(m_scalingInstructionsHasBeenSet)
{
Array<JsonValue> scalingInstructionsJsonList(m_scalingInstructions.size());
for(unsigned scalingInstructionsIndex = 0; scalingInstructionsIndex < scalingInstructionsJsonList.GetLength(); ++scalingInstructionsIndex)
{
scalingInstructionsJsonList[scalingInstructionsIndex].AsObject(m_scalingInstructions[scalingInstructionsIndex].Jsonize());
}
payload.WithArray("ScalingInstructions", std::move(scalingInstructionsJsonList));
}
if(m_statusCodeHasBeenSet)
{
payload.WithString("StatusCode", ScalingPlanStatusCodeMapper::GetNameForScalingPlanStatusCode(m_statusCode));
}
if(m_statusMessageHasBeenSet)
{
payload.WithString("StatusMessage", m_statusMessage);
}
if(m_statusStartTimeHasBeenSet)
{
payload.WithDouble("StatusStartTime", m_statusStartTime.SecondsWithMSPrecision());
}
if(m_creationTimeHasBeenSet)
{
payload.WithDouble("CreationTime", m_creationTime.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,177 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingPlanResource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
ScalingPlanResource::ScalingPlanResource() :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_serviceNamespace(ServiceNamespace::NOT_SET),
m_serviceNamespaceHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_scalableDimension(ScalableDimension::NOT_SET),
m_scalableDimensionHasBeenSet(false),
m_scalingPoliciesHasBeenSet(false),
m_scalingStatusCode(ScalingStatusCode::NOT_SET),
m_scalingStatusCodeHasBeenSet(false),
m_scalingStatusMessageHasBeenSet(false)
{
}
ScalingPlanResource::ScalingPlanResource(JsonView jsonValue) :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_serviceNamespace(ServiceNamespace::NOT_SET),
m_serviceNamespaceHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_scalableDimension(ScalableDimension::NOT_SET),
m_scalableDimensionHasBeenSet(false),
m_scalingPoliciesHasBeenSet(false),
m_scalingStatusCode(ScalingStatusCode::NOT_SET),
m_scalingStatusCodeHasBeenSet(false),
m_scalingStatusMessageHasBeenSet(false)
{
*this = jsonValue;
}
ScalingPlanResource& ScalingPlanResource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ScalingPlanName"))
{
m_scalingPlanName = jsonValue.GetString("ScalingPlanName");
m_scalingPlanNameHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalingPlanVersion"))
{
m_scalingPlanVersion = jsonValue.GetInt64("ScalingPlanVersion");
m_scalingPlanVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceNamespace"))
{
m_serviceNamespace = ServiceNamespaceMapper::GetServiceNamespaceForName(jsonValue.GetString("ServiceNamespace"));
m_serviceNamespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalableDimension"))
{
m_scalableDimension = ScalableDimensionMapper::GetScalableDimensionForName(jsonValue.GetString("ScalableDimension"));
m_scalableDimensionHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalingPolicies"))
{
Array<JsonView> scalingPoliciesJsonList = jsonValue.GetArray("ScalingPolicies");
for(unsigned scalingPoliciesIndex = 0; scalingPoliciesIndex < scalingPoliciesJsonList.GetLength(); ++scalingPoliciesIndex)
{
m_scalingPolicies.push_back(scalingPoliciesJsonList[scalingPoliciesIndex].AsObject());
}
m_scalingPoliciesHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalingStatusCode"))
{
m_scalingStatusCode = ScalingStatusCodeMapper::GetScalingStatusCodeForName(jsonValue.GetString("ScalingStatusCode"));
m_scalingStatusCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ScalingStatusMessage"))
{
m_scalingStatusMessage = jsonValue.GetString("ScalingStatusMessage");
m_scalingStatusMessageHasBeenSet = true;
}
return *this;
}
JsonValue ScalingPlanResource::Jsonize() const
{
JsonValue payload;
if(m_scalingPlanNameHasBeenSet)
{
payload.WithString("ScalingPlanName", m_scalingPlanName);
}
if(m_scalingPlanVersionHasBeenSet)
{
payload.WithInt64("ScalingPlanVersion", m_scalingPlanVersion);
}
if(m_serviceNamespaceHasBeenSet)
{
payload.WithString("ServiceNamespace", ServiceNamespaceMapper::GetNameForServiceNamespace(m_serviceNamespace));
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_scalableDimensionHasBeenSet)
{
payload.WithString("ScalableDimension", ScalableDimensionMapper::GetNameForScalableDimension(m_scalableDimension));
}
if(m_scalingPoliciesHasBeenSet)
{
Array<JsonValue> scalingPoliciesJsonList(m_scalingPolicies.size());
for(unsigned scalingPoliciesIndex = 0; scalingPoliciesIndex < scalingPoliciesJsonList.GetLength(); ++scalingPoliciesIndex)
{
scalingPoliciesJsonList[scalingPoliciesIndex].AsObject(m_scalingPolicies[scalingPoliciesIndex].Jsonize());
}
payload.WithArray("ScalingPolicies", std::move(scalingPoliciesJsonList));
}
if(m_scalingStatusCodeHasBeenSet)
{
payload.WithString("ScalingStatusCode", ScalingStatusCodeMapper::GetNameForScalingStatusCode(m_scalingStatusCode));
}
if(m_scalingStatusMessageHasBeenSet)
{
payload.WithString("ScalingStatusMessage", m_scalingStatusMessage);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingPlanStatusCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace ScalingPlanStatusCodeMapper
{
static const int Active_HASH = HashingUtils::HashString("Active");
static const int ActiveWithProblems_HASH = HashingUtils::HashString("ActiveWithProblems");
static const int CreationInProgress_HASH = HashingUtils::HashString("CreationInProgress");
static const int CreationFailed_HASH = HashingUtils::HashString("CreationFailed");
static const int DeletionInProgress_HASH = HashingUtils::HashString("DeletionInProgress");
static const int DeletionFailed_HASH = HashingUtils::HashString("DeletionFailed");
static const int UpdateInProgress_HASH = HashingUtils::HashString("UpdateInProgress");
static const int UpdateFailed_HASH = HashingUtils::HashString("UpdateFailed");
ScalingPlanStatusCode GetScalingPlanStatusCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Active_HASH)
{
return ScalingPlanStatusCode::Active;
}
else if (hashCode == ActiveWithProblems_HASH)
{
return ScalingPlanStatusCode::ActiveWithProblems;
}
else if (hashCode == CreationInProgress_HASH)
{
return ScalingPlanStatusCode::CreationInProgress;
}
else if (hashCode == CreationFailed_HASH)
{
return ScalingPlanStatusCode::CreationFailed;
}
else if (hashCode == DeletionInProgress_HASH)
{
return ScalingPlanStatusCode::DeletionInProgress;
}
else if (hashCode == DeletionFailed_HASH)
{
return ScalingPlanStatusCode::DeletionFailed;
}
else if (hashCode == UpdateInProgress_HASH)
{
return ScalingPlanStatusCode::UpdateInProgress;
}
else if (hashCode == UpdateFailed_HASH)
{
return ScalingPlanStatusCode::UpdateFailed;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ScalingPlanStatusCode>(hashCode);
}
return ScalingPlanStatusCode::NOT_SET;
}
Aws::String GetNameForScalingPlanStatusCode(ScalingPlanStatusCode enumValue)
{
switch(enumValue)
{
case ScalingPlanStatusCode::Active:
return "Active";
case ScalingPlanStatusCode::ActiveWithProblems:
return "ActiveWithProblems";
case ScalingPlanStatusCode::CreationInProgress:
return "CreationInProgress";
case ScalingPlanStatusCode::CreationFailed:
return "CreationFailed";
case ScalingPlanStatusCode::DeletionInProgress:
return "DeletionInProgress";
case ScalingPlanStatusCode::DeletionFailed:
return "DeletionFailed";
case ScalingPlanStatusCode::UpdateInProgress:
return "UpdateInProgress";
case ScalingPlanStatusCode::UpdateFailed:
return "UpdateFailed";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ScalingPlanStatusCodeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingPolicy.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
ScalingPolicy::ScalingPolicy() :
m_policyNameHasBeenSet(false),
m_policyType(PolicyType::NOT_SET),
m_policyTypeHasBeenSet(false),
m_targetTrackingConfigurationHasBeenSet(false)
{
}
ScalingPolicy::ScalingPolicy(JsonView jsonValue) :
m_policyNameHasBeenSet(false),
m_policyType(PolicyType::NOT_SET),
m_policyTypeHasBeenSet(false),
m_targetTrackingConfigurationHasBeenSet(false)
{
*this = jsonValue;
}
ScalingPolicy& ScalingPolicy::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PolicyName"))
{
m_policyName = jsonValue.GetString("PolicyName");
m_policyNameHasBeenSet = true;
}
if(jsonValue.ValueExists("PolicyType"))
{
m_policyType = PolicyTypeMapper::GetPolicyTypeForName(jsonValue.GetString("PolicyType"));
m_policyTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetTrackingConfiguration"))
{
m_targetTrackingConfiguration = jsonValue.GetObject("TargetTrackingConfiguration");
m_targetTrackingConfigurationHasBeenSet = true;
}
return *this;
}
JsonValue ScalingPolicy::Jsonize() const
{
JsonValue payload;
if(m_policyNameHasBeenSet)
{
payload.WithString("PolicyName", m_policyName);
}
if(m_policyTypeHasBeenSet)
{
payload.WithString("PolicyType", PolicyTypeMapper::GetNameForPolicyType(m_policyType));
}
if(m_targetTrackingConfigurationHasBeenSet)
{
payload.WithObject("TargetTrackingConfiguration", m_targetTrackingConfiguration.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingPolicyUpdateBehavior.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace ScalingPolicyUpdateBehaviorMapper
{
static const int KeepExternalPolicies_HASH = HashingUtils::HashString("KeepExternalPolicies");
static const int ReplaceExternalPolicies_HASH = HashingUtils::HashString("ReplaceExternalPolicies");
ScalingPolicyUpdateBehavior GetScalingPolicyUpdateBehaviorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == KeepExternalPolicies_HASH)
{
return ScalingPolicyUpdateBehavior::KeepExternalPolicies;
}
else if (hashCode == ReplaceExternalPolicies_HASH)
{
return ScalingPolicyUpdateBehavior::ReplaceExternalPolicies;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ScalingPolicyUpdateBehavior>(hashCode);
}
return ScalingPolicyUpdateBehavior::NOT_SET;
}
Aws::String GetNameForScalingPolicyUpdateBehavior(ScalingPolicyUpdateBehavior enumValue)
{
switch(enumValue)
{
case ScalingPolicyUpdateBehavior::KeepExternalPolicies:
return "KeepExternalPolicies";
case ScalingPolicyUpdateBehavior::ReplaceExternalPolicies:
return "ReplaceExternalPolicies";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ScalingPolicyUpdateBehaviorMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ScalingStatusCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace ScalingStatusCodeMapper
{
static const int Inactive_HASH = HashingUtils::HashString("Inactive");
static const int PartiallyActive_HASH = HashingUtils::HashString("PartiallyActive");
static const int Active_HASH = HashingUtils::HashString("Active");
ScalingStatusCode GetScalingStatusCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Inactive_HASH)
{
return ScalingStatusCode::Inactive;
}
else if (hashCode == PartiallyActive_HASH)
{
return ScalingStatusCode::PartiallyActive;
}
else if (hashCode == Active_HASH)
{
return ScalingStatusCode::Active;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ScalingStatusCode>(hashCode);
}
return ScalingStatusCode::NOT_SET;
}
Aws::String GetNameForScalingStatusCode(ScalingStatusCode enumValue)
{
switch(enumValue)
{
case ScalingStatusCode::Inactive:
return "Inactive";
case ScalingStatusCode::PartiallyActive:
return "PartiallyActive";
case ScalingStatusCode::Active:
return "Active";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ScalingStatusCodeMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/ServiceNamespace.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
namespace ServiceNamespaceMapper
{
static const int autoscaling_HASH = HashingUtils::HashString("autoscaling");
static const int ecs_HASH = HashingUtils::HashString("ecs");
static const int ec2_HASH = HashingUtils::HashString("ec2");
static const int rds_HASH = HashingUtils::HashString("rds");
static const int dynamodb_HASH = HashingUtils::HashString("dynamodb");
ServiceNamespace GetServiceNamespaceForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == autoscaling_HASH)
{
return ServiceNamespace::autoscaling;
}
else if (hashCode == ecs_HASH)
{
return ServiceNamespace::ecs;
}
else if (hashCode == ec2_HASH)
{
return ServiceNamespace::ec2;
}
else if (hashCode == rds_HASH)
{
return ServiceNamespace::rds;
}
else if (hashCode == dynamodb_HASH)
{
return ServiceNamespace::dynamodb;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ServiceNamespace>(hashCode);
}
return ServiceNamespace::NOT_SET;
}
Aws::String GetNameForServiceNamespace(ServiceNamespace enumValue)
{
switch(enumValue)
{
case ServiceNamespace::autoscaling:
return "autoscaling";
case ServiceNamespace::ecs:
return "ecs";
case ServiceNamespace::ec2:
return "ec2";
case ServiceNamespace::rds:
return "rds";
case ServiceNamespace::dynamodb:
return "dynamodb";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ServiceNamespaceMapper
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/TagFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
TagFilter::TagFilter() :
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
TagFilter::TagFilter(JsonView jsonValue) :
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
TagFilter& TagFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = jsonValue.GetString("Key");
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("Values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue TagFilter::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", m_key);
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("Values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,159 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/TargetTrackingConfiguration.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AutoScalingPlans
{
namespace Model
{
TargetTrackingConfiguration::TargetTrackingConfiguration() :
m_predefinedScalingMetricSpecificationHasBeenSet(false),
m_customizedScalingMetricSpecificationHasBeenSet(false),
m_targetValue(0.0),
m_targetValueHasBeenSet(false),
m_disableScaleIn(false),
m_disableScaleInHasBeenSet(false),
m_scaleOutCooldown(0),
m_scaleOutCooldownHasBeenSet(false),
m_scaleInCooldown(0),
m_scaleInCooldownHasBeenSet(false),
m_estimatedInstanceWarmup(0),
m_estimatedInstanceWarmupHasBeenSet(false)
{
}
TargetTrackingConfiguration::TargetTrackingConfiguration(JsonView jsonValue) :
m_predefinedScalingMetricSpecificationHasBeenSet(false),
m_customizedScalingMetricSpecificationHasBeenSet(false),
m_targetValue(0.0),
m_targetValueHasBeenSet(false),
m_disableScaleIn(false),
m_disableScaleInHasBeenSet(false),
m_scaleOutCooldown(0),
m_scaleOutCooldownHasBeenSet(false),
m_scaleInCooldown(0),
m_scaleInCooldownHasBeenSet(false),
m_estimatedInstanceWarmup(0),
m_estimatedInstanceWarmupHasBeenSet(false)
{
*this = jsonValue;
}
TargetTrackingConfiguration& TargetTrackingConfiguration::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("PredefinedScalingMetricSpecification"))
{
m_predefinedScalingMetricSpecification = jsonValue.GetObject("PredefinedScalingMetricSpecification");
m_predefinedScalingMetricSpecificationHasBeenSet = true;
}
if(jsonValue.ValueExists("CustomizedScalingMetricSpecification"))
{
m_customizedScalingMetricSpecification = jsonValue.GetObject("CustomizedScalingMetricSpecification");
m_customizedScalingMetricSpecificationHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetValue"))
{
m_targetValue = jsonValue.GetDouble("TargetValue");
m_targetValueHasBeenSet = true;
}
if(jsonValue.ValueExists("DisableScaleIn"))
{
m_disableScaleIn = jsonValue.GetBool("DisableScaleIn");
m_disableScaleInHasBeenSet = true;
}
if(jsonValue.ValueExists("ScaleOutCooldown"))
{
m_scaleOutCooldown = jsonValue.GetInteger("ScaleOutCooldown");
m_scaleOutCooldownHasBeenSet = true;
}
if(jsonValue.ValueExists("ScaleInCooldown"))
{
m_scaleInCooldown = jsonValue.GetInteger("ScaleInCooldown");
m_scaleInCooldownHasBeenSet = true;
}
if(jsonValue.ValueExists("EstimatedInstanceWarmup"))
{
m_estimatedInstanceWarmup = jsonValue.GetInteger("EstimatedInstanceWarmup");
m_estimatedInstanceWarmupHasBeenSet = true;
}
return *this;
}
JsonValue TargetTrackingConfiguration::Jsonize() const
{
JsonValue payload;
if(m_predefinedScalingMetricSpecificationHasBeenSet)
{
payload.WithObject("PredefinedScalingMetricSpecification", m_predefinedScalingMetricSpecification.Jsonize());
}
if(m_customizedScalingMetricSpecificationHasBeenSet)
{
payload.WithObject("CustomizedScalingMetricSpecification", m_customizedScalingMetricSpecification.Jsonize());
}
if(m_targetValueHasBeenSet)
{
payload.WithDouble("TargetValue", m_targetValue);
}
if(m_disableScaleInHasBeenSet)
{
payload.WithBool("DisableScaleIn", m_disableScaleIn);
}
if(m_scaleOutCooldownHasBeenSet)
{
payload.WithInteger("ScaleOutCooldown", m_scaleOutCooldown);
}
if(m_scaleInCooldownHasBeenSet)
{
payload.WithInteger("ScaleInCooldown", m_scaleInCooldown);
}
if(m_estimatedInstanceWarmupHasBeenSet)
{
payload.WithInteger("EstimatedInstanceWarmup", m_estimatedInstanceWarmup);
}
return payload;
}
} // namespace Model
} // namespace AutoScalingPlans
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/UpdateScalingPlanRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateScalingPlanRequest::UpdateScalingPlanRequest() :
m_scalingPlanNameHasBeenSet(false),
m_scalingPlanVersion(0),
m_scalingPlanVersionHasBeenSet(false),
m_applicationSourceHasBeenSet(false),
m_scalingInstructionsHasBeenSet(false)
{
}
Aws::String UpdateScalingPlanRequest::SerializePayload() const
{
JsonValue payload;
if(m_scalingPlanNameHasBeenSet)
{
payload.WithString("ScalingPlanName", m_scalingPlanName);
}
if(m_scalingPlanVersionHasBeenSet)
{
payload.WithInt64("ScalingPlanVersion", m_scalingPlanVersion);
}
if(m_applicationSourceHasBeenSet)
{
payload.WithObject("ApplicationSource", m_applicationSource.Jsonize());
}
if(m_scalingInstructionsHasBeenSet)
{
Array<JsonValue> scalingInstructionsJsonList(m_scalingInstructions.size());
for(unsigned scalingInstructionsIndex = 0; scalingInstructionsIndex < scalingInstructionsJsonList.GetLength(); ++scalingInstructionsIndex)
{
scalingInstructionsJsonList[scalingInstructionsIndex].AsObject(m_scalingInstructions[scalingInstructionsIndex].Jsonize());
}
payload.WithArray("ScalingInstructions", std::move(scalingInstructionsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateScalingPlanRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleScalingPlannerFrontendService.UpdateScalingPlan"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/autoscaling-plans/model/UpdateScalingPlanResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::AutoScalingPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateScalingPlanResult::UpdateScalingPlanResult()
{
}
UpdateScalingPlanResult::UpdateScalingPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateScalingPlanResult& UpdateScalingPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}