18 #include <aws/core/Aws.h> 19 #include <aws/logs/CloudWatchLogsClient.h> 20 #include <aws/logs/model/InputLogEvent.h> 21 #include <aws/logs/model/PutLogEventsRequest.h> 26 namespace CloudWatchLogs {
55 CloudWatchLogsFacade(
const std::shared_ptr<Aws::CloudWatchLogs::CloudWatchLogsClient>& cw_client);
74 Aws::String & next_token,
const std::string & log_group,
const std::string & log_stream,
85 const std::string & log_group);
94 const std::string & log_group);
105 const std::string & log_group,
const std::string & log_stream);
116 const std::string & log_group,
const std::string & log_stream,
117 Aws::CloudWatchLogs::Model::LogStream * log_stream_object);
129 const std::string & log_group,
const std::string & log_stream, Aws::String & next_token);
134 std::shared_ptr<Aws::CloudWatchLogs::CloudWatchLogsClient>
cw_client_;
138 const Aws::CloudWatchLogs::Model::PutLogEventsRequest & request, Aws::String & next_token);
std::chrono::milliseconds last_put_time_
virtual Aws::CloudWatchLogs::ROSCloudWatchLogsErrors SendLogsToCloudWatch(Aws::String &next_token, const std::string &log_group, const std::string &log_stream, LogCollection &logs)
Sends a list of logs to CloudWatch.
virtual ~CloudWatchLogsFacade()=default
virtual Aws::CloudWatchLogs::ROSCloudWatchLogsErrors GetLogStreamToken(const std::string &log_group, const std::string &log_stream, Aws::String &next_token)
Gets the next sequence token to use for sending logs to cloudwatch.
std::shared_ptr< Aws::CloudWatchLogs::CloudWatchLogsClient > cw_client_
This class is a simple Facade over the CloudWatch client. This class is a very small abstraction over...
Aws::CloudWatchLogs::ROSCloudWatchLogsErrors SendLogsRequest(const Aws::CloudWatchLogs::Model::PutLogEventsRequest &request, Aws::String &next_token)
std::list< LogType > LogCollection
virtual Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CheckLogStreamExists(const std::string &log_group, const std::string &log_stream, Aws::CloudWatchLogs::Model::LogStream *log_stream_object)
Check if a log stream in a log group exists.
virtual Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CreateLogStream(const std::string &log_group, const std::string &log_stream)
Creates a log stream in the specified log group.
virtual Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CheckLogGroupExists(const std::string &log_group)
Check if a log group exists.
Contains Error handling functionality for ROS AWS CloudWatch Logs libraries.
CloudWatchLogsFacade()=default
virtual Aws::CloudWatchLogs::ROSCloudWatchLogsErrors CreateLogGroup(const std::string &log_group)
Creates a log group.
ROSCloudWatchLogsErrors
Defines error return codes for functions This enum defines standard error codes that will be returned...