/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Http { class HttpClient; class HttpClientFactory; } // namespace Http namespace Utils { template< typename R, typename E> class Outcome; namespace Threading { class Executor; } // namespace Threading } // namespace Utils namespace Auth { class AWSCredentials; class AWSCredentialsProvider; } // namespace Auth namespace Client { class RetryStrategy; } // namespace Client namespace ComputeOptimizer { namespace Model { class DescribeRecommendationExportJobsRequest; class ExportAutoScalingGroupRecommendationsRequest; class ExportEC2InstanceRecommendationsRequest; class GetAutoScalingGroupRecommendationsRequest; class GetEC2InstanceRecommendationsRequest; class GetEC2RecommendationProjectedMetricsRequest; class GetEnrollmentStatusRequest; class GetRecommendationSummariesRequest; class UpdateEnrollmentStatusRequest; typedef Aws::Utils::Outcome DescribeRecommendationExportJobsOutcome; typedef Aws::Utils::Outcome ExportAutoScalingGroupRecommendationsOutcome; typedef Aws::Utils::Outcome ExportEC2InstanceRecommendationsOutcome; typedef Aws::Utils::Outcome GetAutoScalingGroupRecommendationsOutcome; typedef Aws::Utils::Outcome GetEC2InstanceRecommendationsOutcome; typedef Aws::Utils::Outcome GetEC2RecommendationProjectedMetricsOutcome; typedef Aws::Utils::Outcome GetEnrollmentStatusOutcome; typedef Aws::Utils::Outcome GetRecommendationSummariesOutcome; typedef Aws::Utils::Outcome UpdateEnrollmentStatusOutcome; typedef std::future DescribeRecommendationExportJobsOutcomeCallable; typedef std::future ExportAutoScalingGroupRecommendationsOutcomeCallable; typedef std::future ExportEC2InstanceRecommendationsOutcomeCallable; typedef std::future GetAutoScalingGroupRecommendationsOutcomeCallable; typedef std::future GetEC2InstanceRecommendationsOutcomeCallable; typedef std::future GetEC2RecommendationProjectedMetricsOutcomeCallable; typedef std::future GetEnrollmentStatusOutcomeCallable; typedef std::future GetRecommendationSummariesOutcomeCallable; typedef std::future UpdateEnrollmentStatusOutcomeCallable; } // namespace Model class ComputeOptimizerClient; typedef std::function&) > DescribeRecommendationExportJobsResponseReceivedHandler; typedef std::function&) > ExportAutoScalingGroupRecommendationsResponseReceivedHandler; typedef std::function&) > ExportEC2InstanceRecommendationsResponseReceivedHandler; typedef std::function&) > GetAutoScalingGroupRecommendationsResponseReceivedHandler; typedef std::function&) > GetEC2InstanceRecommendationsResponseReceivedHandler; typedef std::function&) > GetEC2RecommendationProjectedMetricsResponseReceivedHandler; typedef std::function&) > GetEnrollmentStatusResponseReceivedHandler; typedef std::function&) > GetRecommendationSummariesResponseReceivedHandler; typedef std::function&) > UpdateEnrollmentStatusResponseReceivedHandler; /** *

AWS Compute Optimizer is a service that analyzes the configuration and * utilization metrics of your AWS resources, such as EC2 instances and Auto * Scaling groups. It reports whether your resources are optimal, and generates * optimization recommendations to reduce the cost and improve the performance of * your workloads. Compute Optimizer also provides recent utilization metric data, * as well as projected utilization metric data for the recommendations, which you * can use to evaluate which recommendation provides the best price-performance * trade-off. The analysis of your usage patterns can help you decide when to move * or resize your running resources, and still meet your performance and capacity * requirements. For more information about Compute Optimizer, including the * required permissions to use the service, see the AWS Compute * Optimizer User Guide.

*/ class AWS_COMPUTEOPTIMIZER_API ComputeOptimizerClient : 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. */ ComputeOptimizerClient(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. */ ComputeOptimizerClient(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 */ ComputeOptimizerClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); virtual ~ComputeOptimizerClient(); /** *

Describes recommendation export jobs created in the last seven days.

*

Use the ExportAutoScalingGroupRecommendations or * ExportEC2InstanceRecommendations actions to request an export of * your recommendations. Then use the DescribeRecommendationExportJobs * action to view your export jobs.

See Also:

AWS * API Reference

*/ virtual Model::DescribeRecommendationExportJobsOutcome DescribeRecommendationExportJobs(const Model::DescribeRecommendationExportJobsRequest& request) const; /** *

Describes recommendation export jobs created in the last seven days.

*

Use the ExportAutoScalingGroupRecommendations or * ExportEC2InstanceRecommendations actions to request an export of * your recommendations. Then use the DescribeRecommendationExportJobs * action to view your export jobs.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::DescribeRecommendationExportJobsOutcomeCallable DescribeRecommendationExportJobsCallable(const Model::DescribeRecommendationExportJobsRequest& request) const; /** *

Describes recommendation export jobs created in the last seven days.

*

Use the ExportAutoScalingGroupRecommendations or * ExportEC2InstanceRecommendations actions to request an export of * your recommendations. Then use the DescribeRecommendationExportJobs * action to view your export jobs.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void DescribeRecommendationExportJobsAsync(const Model::DescribeRecommendationExportJobsRequest& request, const DescribeRecommendationExportJobsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Exports optimization recommendations for Auto Scaling groups.

*

Recommendations are exported in a comma-separated values (.csv) file, and its * metadata in a JavaScript Object Notation (.json) file, to an existing Amazon * Simple Storage Service (Amazon S3) bucket that you specify. For more * information, see Exporting * Recommendations in the Compute Optimizer User Guide.

You can * have only one Auto Scaling group export job in progress per AWS * Region.

See Also:

AWS * API Reference

*/ virtual Model::ExportAutoScalingGroupRecommendationsOutcome ExportAutoScalingGroupRecommendations(const Model::ExportAutoScalingGroupRecommendationsRequest& request) const; /** *

Exports optimization recommendations for Auto Scaling groups.

*

Recommendations are exported in a comma-separated values (.csv) file, and its * metadata in a JavaScript Object Notation (.json) file, to an existing Amazon * Simple Storage Service (Amazon S3) bucket that you specify. For more * information, see Exporting * Recommendations in the Compute Optimizer User Guide.

You can * have only one Auto Scaling group export job in progress per AWS * Region.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ExportAutoScalingGroupRecommendationsOutcomeCallable ExportAutoScalingGroupRecommendationsCallable(const Model::ExportAutoScalingGroupRecommendationsRequest& request) const; /** *

Exports optimization recommendations for Auto Scaling groups.

*

Recommendations are exported in a comma-separated values (.csv) file, and its * metadata in a JavaScript Object Notation (.json) file, to an existing Amazon * Simple Storage Service (Amazon S3) bucket that you specify. For more * information, see Exporting * Recommendations in the Compute Optimizer User Guide.

You can * have only one Auto Scaling group export job in progress per AWS * Region.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ExportAutoScalingGroupRecommendationsAsync(const Model::ExportAutoScalingGroupRecommendationsRequest& request, const ExportAutoScalingGroupRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Exports optimization recommendations for Amazon EC2 instances.

*

Recommendations are exported in a comma-separated values (.csv) file, and its * metadata in a JavaScript Object Notation (.json) file, to an existing Amazon * Simple Storage Service (Amazon S3) bucket that you specify. For more * information, see Exporting * Recommendations in the Compute Optimizer User Guide.

You can * have only one Amazon EC2 instance export job in progress per AWS * Region.

See Also:

AWS * API Reference

*/ virtual Model::ExportEC2InstanceRecommendationsOutcome ExportEC2InstanceRecommendations(const Model::ExportEC2InstanceRecommendationsRequest& request) const; /** *

Exports optimization recommendations for Amazon EC2 instances.

*

Recommendations are exported in a comma-separated values (.csv) file, and its * metadata in a JavaScript Object Notation (.json) file, to an existing Amazon * Simple Storage Service (Amazon S3) bucket that you specify. For more * information, see Exporting * Recommendations in the Compute Optimizer User Guide.

You can * have only one Amazon EC2 instance export job in progress per AWS * Region.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ExportEC2InstanceRecommendationsOutcomeCallable ExportEC2InstanceRecommendationsCallable(const Model::ExportEC2InstanceRecommendationsRequest& request) const; /** *

Exports optimization recommendations for Amazon EC2 instances.

*

Recommendations are exported in a comma-separated values (.csv) file, and its * metadata in a JavaScript Object Notation (.json) file, to an existing Amazon * Simple Storage Service (Amazon S3) bucket that you specify. For more * information, see Exporting * Recommendations in the Compute Optimizer User Guide.

You can * have only one Amazon EC2 instance export job in progress per AWS * Region.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ExportEC2InstanceRecommendationsAsync(const Model::ExportEC2InstanceRecommendationsRequest& request, const ExportEC2InstanceRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns Auto Scaling group recommendations.

AWS Compute Optimizer * currently generates recommendations for Auto Scaling groups that are configured * to run instances of the M, C, R, T, and X instance families. The service does * not generate recommendations for Auto Scaling groups that have a scaling policy * attached to them, or that do not have the same values for desired, minimum, and * maximum capacity. In order for Compute Optimizer to analyze your Auto Scaling * groups, they must be of a fixed size. For more information, see the AWS * Compute Optimizer User Guide.

See Also:

AWS * API Reference

*/ virtual Model::GetAutoScalingGroupRecommendationsOutcome GetAutoScalingGroupRecommendations(const Model::GetAutoScalingGroupRecommendationsRequest& request) const; /** *

Returns Auto Scaling group recommendations.

AWS Compute Optimizer * currently generates recommendations for Auto Scaling groups that are configured * to run instances of the M, C, R, T, and X instance families. The service does * not generate recommendations for Auto Scaling groups that have a scaling policy * attached to them, or that do not have the same values for desired, minimum, and * maximum capacity. In order for Compute Optimizer to analyze your Auto Scaling * groups, they must be of a fixed size. For more information, see the AWS * Compute Optimizer User Guide.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetAutoScalingGroupRecommendationsOutcomeCallable GetAutoScalingGroupRecommendationsCallable(const Model::GetAutoScalingGroupRecommendationsRequest& request) const; /** *

Returns Auto Scaling group recommendations.

AWS Compute Optimizer * currently generates recommendations for Auto Scaling groups that are configured * to run instances of the M, C, R, T, and X instance families. The service does * not generate recommendations for Auto Scaling groups that have a scaling policy * attached to them, or that do not have the same values for desired, minimum, and * maximum capacity. In order for Compute Optimizer to analyze your Auto Scaling * groups, they must be of a fixed size. For more information, see the AWS * Compute Optimizer User Guide.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetAutoScalingGroupRecommendationsAsync(const Model::GetAutoScalingGroupRecommendationsRequest& request, const GetAutoScalingGroupRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns Amazon EC2 instance recommendations.

AWS Compute Optimizer * currently generates recommendations for Amazon Elastic Compute Cloud (Amazon * EC2) and Amazon EC2 Auto Scaling. It generates recommendations for M, C, R, T, * and X instance families. For more information, see the AWS * Compute Optimizer User Guide.

See Also:

AWS * API Reference

*/ virtual Model::GetEC2InstanceRecommendationsOutcome GetEC2InstanceRecommendations(const Model::GetEC2InstanceRecommendationsRequest& request) const; /** *

Returns Amazon EC2 instance recommendations.

AWS Compute Optimizer * currently generates recommendations for Amazon Elastic Compute Cloud (Amazon * EC2) and Amazon EC2 Auto Scaling. It generates recommendations for M, C, R, T, * and X instance families. For more information, see the AWS * Compute Optimizer User Guide.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetEC2InstanceRecommendationsOutcomeCallable GetEC2InstanceRecommendationsCallable(const Model::GetEC2InstanceRecommendationsRequest& request) const; /** *

Returns Amazon EC2 instance recommendations.

AWS Compute Optimizer * currently generates recommendations for Amazon Elastic Compute Cloud (Amazon * EC2) and Amazon EC2 Auto Scaling. It generates recommendations for M, C, R, T, * and X instance families. For more information, see the AWS * Compute Optimizer User Guide.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetEC2InstanceRecommendationsAsync(const Model::GetEC2InstanceRecommendationsRequest& request, const GetEC2InstanceRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns the projected utilization metrics of Amazon EC2 instance * recommendations.

See Also:

AWS * API Reference

*/ virtual Model::GetEC2RecommendationProjectedMetricsOutcome GetEC2RecommendationProjectedMetrics(const Model::GetEC2RecommendationProjectedMetricsRequest& request) const; /** *

Returns the projected utilization metrics of Amazon EC2 instance * recommendations.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetEC2RecommendationProjectedMetricsOutcomeCallable GetEC2RecommendationProjectedMetricsCallable(const Model::GetEC2RecommendationProjectedMetricsRequest& request) const; /** *

Returns the projected utilization metrics of Amazon EC2 instance * recommendations.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetEC2RecommendationProjectedMetricsAsync(const Model::GetEC2RecommendationProjectedMetricsRequest& request, const GetEC2RecommendationProjectedMetricsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns the enrollment (opt in) status of an account to the AWS Compute * Optimizer service.

If the account is the master account of an * organization, this action also confirms the enrollment status of member accounts * within the organization.

See Also:

AWS * API Reference

*/ virtual Model::GetEnrollmentStatusOutcome GetEnrollmentStatus(const Model::GetEnrollmentStatusRequest& request) const; /** *

Returns the enrollment (opt in) status of an account to the AWS Compute * Optimizer service.

If the account is the master account of an * organization, this action also confirms the enrollment status of member accounts * within the organization.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetEnrollmentStatusOutcomeCallable GetEnrollmentStatusCallable(const Model::GetEnrollmentStatusRequest& request) const; /** *

Returns the enrollment (opt in) status of an account to the AWS Compute * Optimizer service.

If the account is the master account of an * organization, this action also confirms the enrollment status of member accounts * within the organization.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetEnrollmentStatusAsync(const Model::GetEnrollmentStatusRequest& request, const GetEnrollmentStatusResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Returns the optimization findings for an account.

For example, it * returns the number of Amazon EC2 instances in an account that are * under-provisioned, over-provisioned, or optimized. It also returns the number of * Auto Scaling groups in an account that are not optimized, or * optimized.

See Also:

AWS * API Reference

*/ virtual Model::GetRecommendationSummariesOutcome GetRecommendationSummaries(const Model::GetRecommendationSummariesRequest& request) const; /** *

Returns the optimization findings for an account.

For example, it * returns the number of Amazon EC2 instances in an account that are * under-provisioned, over-provisioned, or optimized. It also returns the number of * Auto Scaling groups in an account that are not optimized, or * optimized.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetRecommendationSummariesOutcomeCallable GetRecommendationSummariesCallable(const Model::GetRecommendationSummariesRequest& request) const; /** *

Returns the optimization findings for an account.

For example, it * returns the number of Amazon EC2 instances in an account that are * under-provisioned, over-provisioned, or optimized. It also returns the number of * Auto Scaling groups in an account that are not optimized, or * optimized.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetRecommendationSummariesAsync(const Model::GetRecommendationSummariesRequest& request, const GetRecommendationSummariesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Updates the enrollment (opt in) status of an account to the AWS Compute * Optimizer service.

If the account is a master account of an organization, * this action can also be used to enroll member accounts within the * organization.

See Also:

AWS * API Reference

*/ virtual Model::UpdateEnrollmentStatusOutcome UpdateEnrollmentStatus(const Model::UpdateEnrollmentStatusRequest& request) const; /** *

Updates the enrollment (opt in) status of an account to the AWS Compute * Optimizer service.

If the account is a master account of an organization, * this action can also be used to enroll member accounts within the * organization.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::UpdateEnrollmentStatusOutcomeCallable UpdateEnrollmentStatusCallable(const Model::UpdateEnrollmentStatusRequest& request) const; /** *

Updates the enrollment (opt in) status of an account to the AWS Compute * Optimizer service.

If the account is a master account of an organization, * this action can also be used to enroll member accounts within the * organization.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void UpdateEnrollmentStatusAsync(const Model::UpdateEnrollmentStatusRequest& request, const UpdateEnrollmentStatusResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; void OverrideEndpoint(const Aws::String& endpoint); private: void init(const Aws::Client::ClientConfiguration& clientConfiguration); void DescribeRecommendationExportJobsAsyncHelper(const Model::DescribeRecommendationExportJobsRequest& request, const DescribeRecommendationExportJobsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ExportAutoScalingGroupRecommendationsAsyncHelper(const Model::ExportAutoScalingGroupRecommendationsRequest& request, const ExportAutoScalingGroupRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ExportEC2InstanceRecommendationsAsyncHelper(const Model::ExportEC2InstanceRecommendationsRequest& request, const ExportEC2InstanceRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetAutoScalingGroupRecommendationsAsyncHelper(const Model::GetAutoScalingGroupRecommendationsRequest& request, const GetAutoScalingGroupRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetEC2InstanceRecommendationsAsyncHelper(const Model::GetEC2InstanceRecommendationsRequest& request, const GetEC2InstanceRecommendationsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetEC2RecommendationProjectedMetricsAsyncHelper(const Model::GetEC2RecommendationProjectedMetricsRequest& request, const GetEC2RecommendationProjectedMetricsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetEnrollmentStatusAsyncHelper(const Model::GetEnrollmentStatusRequest& request, const GetEnrollmentStatusResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetRecommendationSummariesAsyncHelper(const Model::GetRecommendationSummariesRequest& request, const GetRecommendationSummariesResponseReceivedHandler& handler, const std::shared_ptr& context) const; void UpdateEnrollmentStatusAsyncHelper(const Model::UpdateEnrollmentStatusRequest& request, const UpdateEnrollmentStatusResponseReceivedHandler& handler, const std::shared_ptr& context) const; Aws::String m_uri; Aws::String m_configScheme; std::shared_ptr m_executor; }; } // namespace ComputeOptimizer } // namespace Aws