/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace OpsWorks { namespace Model { /** *

Describes the Amazon CloudWatch logs configuration for a layer. For detailed * information about members of this data type, see the CloudWatch * Logs Agent Reference.

See Also:

AWS * API Reference

*/ class CloudWatchLogsLogStream { public: AWS_OPSWORKS_API CloudWatchLogsLogStream(); AWS_OPSWORKS_API CloudWatchLogsLogStream(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API CloudWatchLogsLogStream& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_OPSWORKS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline const Aws::String& GetLogGroupName() const{ return m_logGroupName; } /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; } /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline void SetLogGroupName(const Aws::String& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = value; } /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline void SetLogGroupName(Aws::String&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::move(value); } /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline void SetLogGroupName(const char* value) { m_logGroupNameHasBeenSet = true; m_logGroupName.assign(value); } /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline CloudWatchLogsLogStream& WithLogGroupName(const Aws::String& value) { SetLogGroupName(value); return *this;} /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline CloudWatchLogsLogStream& WithLogGroupName(Aws::String&& value) { SetLogGroupName(std::move(value)); return *this;} /** *

Specifies the destination log group. A log group is created automatically if * it doesn't already exist. Log group names can be between 1 and 512 characters * long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), * '/' (forward slash), and '.' (period).

*/ inline CloudWatchLogsLogStream& WithLogGroupName(const char* value) { SetLogGroupName(value); return *this;} /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline const Aws::String& GetDatetimeFormat() const{ return m_datetimeFormat; } /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline bool DatetimeFormatHasBeenSet() const { return m_datetimeFormatHasBeenSet; } /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline void SetDatetimeFormat(const Aws::String& value) { m_datetimeFormatHasBeenSet = true; m_datetimeFormat = value; } /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline void SetDatetimeFormat(Aws::String&& value) { m_datetimeFormatHasBeenSet = true; m_datetimeFormat = std::move(value); } /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline void SetDatetimeFormat(const char* value) { m_datetimeFormatHasBeenSet = true; m_datetimeFormat.assign(value); } /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline CloudWatchLogsLogStream& WithDatetimeFormat(const Aws::String& value) { SetDatetimeFormat(value); return *this;} /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline CloudWatchLogsLogStream& WithDatetimeFormat(Aws::String&& value) { SetDatetimeFormat(std::move(value)); return *this;} /** *

Specifies how the time stamp is extracted from logs. For more information, * see the CloudWatch * Logs Agent Reference.

*/ inline CloudWatchLogsLogStream& WithDatetimeFormat(const char* value) { SetDatetimeFormat(value); return *this;} /** *

Specifies the time zone of log event time stamps.

*/ inline const CloudWatchLogsTimeZone& GetTimeZone() const{ return m_timeZone; } /** *

Specifies the time zone of log event time stamps.

*/ inline bool TimeZoneHasBeenSet() const { return m_timeZoneHasBeenSet; } /** *

Specifies the time zone of log event time stamps.

*/ inline void SetTimeZone(const CloudWatchLogsTimeZone& value) { m_timeZoneHasBeenSet = true; m_timeZone = value; } /** *

Specifies the time zone of log event time stamps.

*/ inline void SetTimeZone(CloudWatchLogsTimeZone&& value) { m_timeZoneHasBeenSet = true; m_timeZone = std::move(value); } /** *

Specifies the time zone of log event time stamps.

*/ inline CloudWatchLogsLogStream& WithTimeZone(const CloudWatchLogsTimeZone& value) { SetTimeZone(value); return *this;} /** *

Specifies the time zone of log event time stamps.

*/ inline CloudWatchLogsLogStream& WithTimeZone(CloudWatchLogsTimeZone&& value) { SetTimeZone(std::move(value)); return *this;} /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline const Aws::String& GetFile() const{ return m_file; } /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline bool FileHasBeenSet() const { return m_fileHasBeenSet; } /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline void SetFile(const Aws::String& value) { m_fileHasBeenSet = true; m_file = value; } /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline void SetFile(Aws::String&& value) { m_fileHasBeenSet = true; m_file = std::move(value); } /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline void SetFile(const char* value) { m_fileHasBeenSet = true; m_file.assign(value); } /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline CloudWatchLogsLogStream& WithFile(const Aws::String& value) { SetFile(value); return *this;} /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline CloudWatchLogsLogStream& WithFile(Aws::String&& value) { SetFile(std::move(value)); return *this;} /** *

Specifies log files that you want to push to CloudWatch Logs.

* File can point to a specific file or multiple files (by using wild * card characters such as /var/log/system.log*). Only the latest file * is pushed to CloudWatch Logs, based on file modification time. We recommend that * you use wild card characters to specify a series of files of the same type, such * as access_log.2014-06-01-01, access_log.2014-06-01-02, * and so on by using a pattern like access_log.*. Don't use a * wildcard to match multiple file types, such as access_log_80 and * access_log_443. To specify multiple, different file types, add * another log stream entry to the configuration file, so that each log file type * is stored in a different log group.

Zipped files are not supported.

*/ inline CloudWatchLogsLogStream& WithFile(const char* value) { SetFile(value); return *this;} /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline const Aws::String& GetFileFingerprintLines() const{ return m_fileFingerprintLines; } /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline bool FileFingerprintLinesHasBeenSet() const { return m_fileFingerprintLinesHasBeenSet; } /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline void SetFileFingerprintLines(const Aws::String& value) { m_fileFingerprintLinesHasBeenSet = true; m_fileFingerprintLines = value; } /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline void SetFileFingerprintLines(Aws::String&& value) { m_fileFingerprintLinesHasBeenSet = true; m_fileFingerprintLines = std::move(value); } /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline void SetFileFingerprintLines(const char* value) { m_fileFingerprintLinesHasBeenSet = true; m_fileFingerprintLines.assign(value); } /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline CloudWatchLogsLogStream& WithFileFingerprintLines(const Aws::String& value) { SetFileFingerprintLines(value); return *this;} /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline CloudWatchLogsLogStream& WithFileFingerprintLines(Aws::String&& value) { SetFileFingerprintLines(std::move(value)); return *this;} /** *

Specifies the range of lines for identifying a file. The valid values are one * number, or two dash-delimited numbers, such as '1', '2-5'. The default value is * '1', meaning the first line is used to calculate the fingerprint. Fingerprint * lines are not sent to CloudWatch Logs unless all specified lines are * available.

*/ inline CloudWatchLogsLogStream& WithFileFingerprintLines(const char* value) { SetFileFingerprintLines(value); return *this;} /** *

Specifies the pattern for identifying the start of a log message.

*/ inline const Aws::String& GetMultiLineStartPattern() const{ return m_multiLineStartPattern; } /** *

Specifies the pattern for identifying the start of a log message.

*/ inline bool MultiLineStartPatternHasBeenSet() const { return m_multiLineStartPatternHasBeenSet; } /** *

Specifies the pattern for identifying the start of a log message.

*/ inline void SetMultiLineStartPattern(const Aws::String& value) { m_multiLineStartPatternHasBeenSet = true; m_multiLineStartPattern = value; } /** *

Specifies the pattern for identifying the start of a log message.

*/ inline void SetMultiLineStartPattern(Aws::String&& value) { m_multiLineStartPatternHasBeenSet = true; m_multiLineStartPattern = std::move(value); } /** *

Specifies the pattern for identifying the start of a log message.

*/ inline void SetMultiLineStartPattern(const char* value) { m_multiLineStartPatternHasBeenSet = true; m_multiLineStartPattern.assign(value); } /** *

Specifies the pattern for identifying the start of a log message.

*/ inline CloudWatchLogsLogStream& WithMultiLineStartPattern(const Aws::String& value) { SetMultiLineStartPattern(value); return *this;} /** *

Specifies the pattern for identifying the start of a log message.

*/ inline CloudWatchLogsLogStream& WithMultiLineStartPattern(Aws::String&& value) { SetMultiLineStartPattern(std::move(value)); return *this;} /** *

Specifies the pattern for identifying the start of a log message.

*/ inline CloudWatchLogsLogStream& WithMultiLineStartPattern(const char* value) { SetMultiLineStartPattern(value); return *this;} /** *

Specifies where to start to read data (start_of_file or end_of_file). The * default is start_of_file. This setting is only used if there is no state * persisted for that log stream.

*/ inline const CloudWatchLogsInitialPosition& GetInitialPosition() const{ return m_initialPosition; } /** *

Specifies where to start to read data (start_of_file or end_of_file). The * default is start_of_file. This setting is only used if there is no state * persisted for that log stream.

*/ inline bool InitialPositionHasBeenSet() const { return m_initialPositionHasBeenSet; } /** *

Specifies where to start to read data (start_of_file or end_of_file). The * default is start_of_file. This setting is only used if there is no state * persisted for that log stream.

*/ inline void SetInitialPosition(const CloudWatchLogsInitialPosition& value) { m_initialPositionHasBeenSet = true; m_initialPosition = value; } /** *

Specifies where to start to read data (start_of_file or end_of_file). The * default is start_of_file. This setting is only used if there is no state * persisted for that log stream.

*/ inline void SetInitialPosition(CloudWatchLogsInitialPosition&& value) { m_initialPositionHasBeenSet = true; m_initialPosition = std::move(value); } /** *

Specifies where to start to read data (start_of_file or end_of_file). The * default is start_of_file. This setting is only used if there is no state * persisted for that log stream.

*/ inline CloudWatchLogsLogStream& WithInitialPosition(const CloudWatchLogsInitialPosition& value) { SetInitialPosition(value); return *this;} /** *

Specifies where to start to read data (start_of_file or end_of_file). The * default is start_of_file. This setting is only used if there is no state * persisted for that log stream.

*/ inline CloudWatchLogsLogStream& WithInitialPosition(CloudWatchLogsInitialPosition&& value) { SetInitialPosition(std::move(value)); return *this;} /** *

Specifies the encoding of the log file so that the file can be read * correctly. The default is utf_8. Encodings supported by Python * codecs.decode() can be used here.

*/ inline const CloudWatchLogsEncoding& GetEncoding() const{ return m_encoding; } /** *

Specifies the encoding of the log file so that the file can be read * correctly. The default is utf_8. Encodings supported by Python * codecs.decode() can be used here.

*/ inline bool EncodingHasBeenSet() const { return m_encodingHasBeenSet; } /** *

Specifies the encoding of the log file so that the file can be read * correctly. The default is utf_8. Encodings supported by Python * codecs.decode() can be used here.

*/ inline void SetEncoding(const CloudWatchLogsEncoding& value) { m_encodingHasBeenSet = true; m_encoding = value; } /** *

Specifies the encoding of the log file so that the file can be read * correctly. The default is utf_8. Encodings supported by Python * codecs.decode() can be used here.

*/ inline void SetEncoding(CloudWatchLogsEncoding&& value) { m_encodingHasBeenSet = true; m_encoding = std::move(value); } /** *

Specifies the encoding of the log file so that the file can be read * correctly. The default is utf_8. Encodings supported by Python * codecs.decode() can be used here.

*/ inline CloudWatchLogsLogStream& WithEncoding(const CloudWatchLogsEncoding& value) { SetEncoding(value); return *this;} /** *

Specifies the encoding of the log file so that the file can be read * correctly. The default is utf_8. Encodings supported by Python * codecs.decode() can be used here.

*/ inline CloudWatchLogsLogStream& WithEncoding(CloudWatchLogsEncoding&& value) { SetEncoding(std::move(value)); return *this;} /** *

Specifies the time duration for the batching of log events. The minimum value * is 5000ms and default value is 5000ms.

*/ inline int GetBufferDuration() const{ return m_bufferDuration; } /** *

Specifies the time duration for the batching of log events. The minimum value * is 5000ms and default value is 5000ms.

*/ inline bool BufferDurationHasBeenSet() const { return m_bufferDurationHasBeenSet; } /** *

Specifies the time duration for the batching of log events. The minimum value * is 5000ms and default value is 5000ms.

*/ inline void SetBufferDuration(int value) { m_bufferDurationHasBeenSet = true; m_bufferDuration = value; } /** *

Specifies the time duration for the batching of log events. The minimum value * is 5000ms and default value is 5000ms.

*/ inline CloudWatchLogsLogStream& WithBufferDuration(int value) { SetBufferDuration(value); return *this;} /** *

Specifies the max number of log events in a batch, up to 10000. The default * value is 1000.

*/ inline int GetBatchCount() const{ return m_batchCount; } /** *

Specifies the max number of log events in a batch, up to 10000. The default * value is 1000.

*/ inline bool BatchCountHasBeenSet() const { return m_batchCountHasBeenSet; } /** *

Specifies the max number of log events in a batch, up to 10000. The default * value is 1000.

*/ inline void SetBatchCount(int value) { m_batchCountHasBeenSet = true; m_batchCount = value; } /** *

Specifies the max number of log events in a batch, up to 10000. The default * value is 1000.

*/ inline CloudWatchLogsLogStream& WithBatchCount(int value) { SetBatchCount(value); return *this;} /** *

Specifies the maximum size of log events in a batch, in bytes, up to 1048576 * bytes. The default value is 32768 bytes. This size is calculated as the sum of * all event messages in UTF-8, plus 26 bytes for each log event.

*/ inline int GetBatchSize() const{ return m_batchSize; } /** *

Specifies the maximum size of log events in a batch, in bytes, up to 1048576 * bytes. The default value is 32768 bytes. This size is calculated as the sum of * all event messages in UTF-8, plus 26 bytes for each log event.

*/ inline bool BatchSizeHasBeenSet() const { return m_batchSizeHasBeenSet; } /** *

Specifies the maximum size of log events in a batch, in bytes, up to 1048576 * bytes. The default value is 32768 bytes. This size is calculated as the sum of * all event messages in UTF-8, plus 26 bytes for each log event.

*/ inline void SetBatchSize(int value) { m_batchSizeHasBeenSet = true; m_batchSize = value; } /** *

Specifies the maximum size of log events in a batch, in bytes, up to 1048576 * bytes. The default value is 32768 bytes. This size is calculated as the sum of * all event messages in UTF-8, plus 26 bytes for each log event.

*/ inline CloudWatchLogsLogStream& WithBatchSize(int value) { SetBatchSize(value); return *this;} private: Aws::String m_logGroupName; bool m_logGroupNameHasBeenSet = false; Aws::String m_datetimeFormat; bool m_datetimeFormatHasBeenSet = false; CloudWatchLogsTimeZone m_timeZone; bool m_timeZoneHasBeenSet = false; Aws::String m_file; bool m_fileHasBeenSet = false; Aws::String m_fileFingerprintLines; bool m_fileFingerprintLinesHasBeenSet = false; Aws::String m_multiLineStartPattern; bool m_multiLineStartPatternHasBeenSet = false; CloudWatchLogsInitialPosition m_initialPosition; bool m_initialPositionHasBeenSet = false; CloudWatchLogsEncoding m_encoding; bool m_encodingHasBeenSet = false; int m_bufferDuration; bool m_bufferDurationHasBeenSet = false; int m_batchCount; bool m_batchCountHasBeenSet = false; int m_batchSize; bool m_batchSizeHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws