This class is a simple Facade over the CloudWatch client. This class is a very small abstraction over the CloudWatch client. It allows us to change the details of how we're communicating with CloudWatch without the need to expose this in the rest of our code. It also provides a shim for us to be able to Mock to unit test the rest of the code.
More...
#include <cloudwatch_metrics_facade.hpp>
|
| std::shared_ptr< Aws::CloudWatch::CloudWatchClient > | cw_client_ |
| |
This class is a simple Facade over the CloudWatch client. This class is a very small abstraction over the CloudWatch client. It allows us to change the details of how we're communicating with CloudWatch without the need to expose this in the rest of our code. It also provides a shim for us to be able to Mock to unit test the rest of the code.
This class expects Aws::InitAPI() to have already been called before an instance is constructed
Definition at line 48 of file cloudwatch_metrics_facade.hpp.
◆ CloudWatchMetricsFacade() [1/3]
| Aws::CloudWatchMetrics::Utils::CloudWatchMetricsFacade::CloudWatchMetricsFacade |
( |
const Aws::Client::ClientConfiguration & |
client_config | ) |
|
◆ CloudWatchMetricsFacade() [2/3]
| Aws::CloudWatchMetrics::Utils::CloudWatchMetricsFacade::CloudWatchMetricsFacade |
( |
const std::shared_ptr< Aws::CloudWatch::CloudWatchClient > & |
cw_client | ) |
|
◆ ~CloudWatchMetricsFacade()
| virtual Aws::CloudWatchMetrics::Utils::CloudWatchMetricsFacade::~CloudWatchMetricsFacade |
( |
| ) |
|
|
virtualdefault |
◆ CloudWatchMetricsFacade() [3/3]
| Aws::CloudWatchMetrics::Utils::CloudWatchMetricsFacade::CloudWatchMetricsFacade |
( |
| ) |
|
|
protecteddefault |
◆ SendMetricsRequest()
| CloudWatchMetricsStatus Aws::CloudWatchMetrics::Utils::CloudWatchMetricsFacade::SendMetricsRequest |
( |
const Aws::CloudWatch::Model::PutMetricDataRequest & |
request | ) |
|
|
private |
◆ SendMetricsToCloudWatch()
Sends a list of metrics to CloudWatch Used to send a list of metrics to CloudWatch.
- Parameters
-
| metric_namespace | A reference to a string with the namespace for all the metrics being posted |
| metrics | A reference to a list of metrics that you want sent to CloudWatch |
- Returns
- An error code that will be Aws::AwsError::AWS_ERR_OK if all metrics were sent successfully.
Reimplemented in MockCloudWatchFacade.
Definition at line 75 of file cloudwatch_metrics_facade.cpp.
◆ cw_client_
| std::shared_ptr<Aws::CloudWatch::CloudWatchClient> Aws::CloudWatchMetrics::Utils::CloudWatchMetricsFacade::cw_client_ |
|
private |
The documentation for this class was generated from the following files: