class CloudWatchConfigBuilder
| Language | Type name |
|---|---|
Python | aws_rfdk.CloudWatchConfigBuilder |
TypeScript (source) | aws-rfdk » CloudWatchConfigBuilder |
Class that can build a CloudWatch Agent configuration.
Initializer
new CloudWatchConfigBuilder(logFlushInterval?: Duration)
Parameters
- logFlushInterval
Duration
Constructs.
Properties
| Name | Type | Description |
|---|---|---|
| log | Duration | Flush interval of the Cloud Watch Agent (in Seconds). |
logFlushInterval
Type:
Duration
Flush interval of the Cloud Watch Agent (in Seconds).
Methods
| Name | Description |
|---|---|
| add | This method adds the log file path and its associated log group and log stream properties to the list of files which needs to be streamed to cloud watch logs. |
| generate | The method generates the configuration for log file streaming to be added to CloudWatch Agent Configuration File. |
addLogsCollectList(logGroupName, logStreamPrefix, logFilePath, timeZone?)
public addLogsCollectList(logGroupName: string, logStreamPrefix: string, logFilePath: string, timeZone?: TimeZone): void
Parameters
- logGroupName
string— - string for the log group name. - logStreamPrefix
string— - string for the log stream prefix. - logFilePath
string— - local file path which needs to be streamed. - timeZone
Time— - the time zone to use when putting timestamps on log events.Zone
This method adds the log file path and its associated log group and log stream properties to the list of files which needs to be streamed to cloud watch logs.
generateCloudWatchConfiguration()
public generateCloudWatchConfiguration(): string
Returns
string
The method generates the configuration for log file streaming to be added to CloudWatch Agent Configuration File.

Python
TypeScript (