/**
* 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
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 PI
{
namespace Model
{
class DescribeDimensionKeysRequest;
class GetResourceMetricsRequest;
typedef Aws::Utils::Outcome DescribeDimensionKeysOutcome;
typedef Aws::Utils::Outcome GetResourceMetricsOutcome;
typedef std::future DescribeDimensionKeysOutcomeCallable;
typedef std::future GetResourceMetricsOutcomeCallable;
} // namespace Model
class PIClient;
typedef std::function&) > DescribeDimensionKeysResponseReceivedHandler;
typedef std::function&) > GetResourceMetricsResponseReceivedHandler;
/**
* AWS Performance Insights enables you to monitor and explore different
* dimensions of database load based on data captured from a running RDS instance.
* The guide provides detailed information about Performance Insights data types,
* parameters and errors. For more information about Performance Insights
* capabilities see Using
* Amazon RDS Performance Insights in the Amazon RDS User Guide.
* The AWS Performance Insights API provides visibility into the performance of
* your RDS instance, when Performance Insights is enabled for supported engine
* types. While Amazon CloudWatch provides the authoritative source for AWS service
* vended monitoring metrics, AWS Performance Insights offers a domain-specific
* view of database load measured as Average Active Sessions and provided to API
* consumers as a 2-dimensional time-series dataset. The time dimension of the data
* provides DB load data for each time point in the queried time range, and each
* time point decomposes overall load in relation to the requested dimensions, such
* as SQL, Wait-event, User or Host, measured at that time point.
*/
class AWS_PI_API PIClient : 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.
*/
PIClient(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.
*/
PIClient(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
*/
PIClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~PIClient();
/**
* For a specific time period, retrieve the top N dimension keys
* for a metric.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeDimensionKeysOutcome DescribeDimensionKeys(const Model::DescribeDimensionKeysRequest& request) const;
/**
* For a specific time period, retrieve the top N dimension keys
* for a metric.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeDimensionKeysOutcomeCallable DescribeDimensionKeysCallable(const Model::DescribeDimensionKeysRequest& request) const;
/**
* For a specific time period, retrieve the top N dimension keys
* for a metric.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeDimensionKeysAsync(const Model::DescribeDimensionKeysRequest& request, const DescribeDimensionKeysResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Retrieve Performance Insights metrics for a set of data sources, over a time
* period. You can provide specific dimension groups and dimensions, and provide
* aggregation and filtering criteria for each group.
See Also:
AWS
* API Reference
*/
virtual Model::GetResourceMetricsOutcome GetResourceMetrics(const Model::GetResourceMetricsRequest& request) const;
/**
* Retrieve Performance Insights metrics for a set of data sources, over a time
* period. You can provide specific dimension groups and dimensions, and provide
* aggregation and filtering criteria for each group.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetResourceMetricsOutcomeCallable GetResourceMetricsCallable(const Model::GetResourceMetricsRequest& request) const;
/**
* Retrieve Performance Insights metrics for a set of data sources, over a time
* period. You can provide specific dimension groups and dimensions, and provide
* aggregation and filtering criteria for each group.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetResourceMetricsAsync(const Model::GetResourceMetricsRequest& request, const GetResourceMetricsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void DescribeDimensionKeysAsyncHelper(const Model::DescribeDimensionKeysRequest& request, const DescribeDimensionKeysResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void GetResourceMetricsAsyncHelper(const Model::GetResourceMetricsRequest& request, const GetResourceMetricsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace PI
} // namespace Aws