Class CfnLogAlarm.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.CfnLogAlarm.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLogAlarm>
- Enclosing class:
CfnLogAlarm
@Stability(Stable)
public static final class CfnLogAlarm.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLogAlarm>
A fluent builder for
CfnLogAlarm.-
Method Summary
Modifier and TypeMethodDescriptionactionLogLineCount(Number actionLogLineCount) The number of log lines to include in alarm notifications.actionLogLineRoleArn(String actionLogLineRoleArn) The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications.actionsEnabled(Boolean actionsEnabled) Indicates whether actions should be executed during any changes to the alarm state.actionsEnabled(IResolvable actionsEnabled) Indicates whether actions should be executed during any changes to the alarm state.alarmActions(List<String> alarmActions) The list of actions to execute when this alarm transitions into an ALARM state from any other state.alarmDescription(String alarmDescription) The description of the log alarm.The name of the log alarm.build()comparisonOperator(String comparisonOperator) The arithmetic operation to use when comparing the specified threshold and the query results.static CfnLogAlarm.BuilderinsufficientDataActions(List<String> insufficientDataActions) The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.The actions to execute when this alarm transitions to the OK state from any other state.queryResultsToAlarm(Number queryResultsToAlarm) The number of query results that must be breaching to trigger the alarm.queryResultsToEvaluate(Number queryResultsToEvaluate) The number of query results over which data is compared to the specified threshold.scheduledQueryConfiguration(IResolvable scheduledQueryConfiguration) The scheduled query configuration for the log alarm.scheduledQueryConfiguration(CfnLogAlarm.ScheduledQueryConfigurationProperty scheduledQueryConfiguration) The scheduled query configuration for the log alarm.A list of key-value pairs to associate with the log alarm.The value to compare against the results of the scheduled query evaluation.treatMissingData(String treatMissingData) Sets how this alarm is to handle missing data points.
-
Method Details
-
create
@Stability(Stable) public static CfnLogAlarm.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnLogAlarm.Builder.
-
comparisonOperator
The arithmetic operation to use when comparing the specified threshold and the query results.Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- Parameters:
comparisonOperator- The arithmetic operation to use when comparing the specified threshold and the query results. This parameter is required.- Returns:
this- See Also:
-
queryResultsToAlarm
The number of query results that must be breaching to trigger the alarm.- Parameters:
queryResultsToAlarm- The number of query results that must be breaching to trigger the alarm. This parameter is required.- Returns:
this- See Also:
-
queryResultsToEvaluate
The number of query results over which data is compared to the specified threshold.- Parameters:
queryResultsToEvaluate- The number of query results over which data is compared to the specified threshold. This parameter is required.- Returns:
this- See Also:
-
scheduledQueryConfiguration
@Stability(Stable) public CfnLogAlarm.Builder scheduledQueryConfiguration(IResolvable scheduledQueryConfiguration) The scheduled query configuration for the log alarm.- Parameters:
scheduledQueryConfiguration- The scheduled query configuration for the log alarm. This parameter is required.- Returns:
this- See Also:
-
scheduledQueryConfiguration
@Stability(Stable) public CfnLogAlarm.Builder scheduledQueryConfiguration(CfnLogAlarm.ScheduledQueryConfigurationProperty scheduledQueryConfiguration) The scheduled query configuration for the log alarm.- Parameters:
scheduledQueryConfiguration- The scheduled query configuration for the log alarm. This parameter is required.- Returns:
this- See Also:
-
threshold
The value to compare against the results of the scheduled query evaluation.- Parameters:
threshold- The value to compare against the results of the scheduled query evaluation. This parameter is required.- Returns:
this- See Also:
-
actionLogLineCount
The number of log lines to include in alarm notifications.Valid values are 0 to 50.
- Parameters:
actionLogLineCount- The number of log lines to include in alarm notifications. This parameter is required.- Returns:
this- See Also:
-
actionLogLineRoleArn
The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications.Required when ActionLogLineCount is greater than 0.
- Parameters:
actionLogLineRoleArn- The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. This parameter is required.- Returns:
this- See Also:
-
actionsEnabled
Indicates whether actions should be executed during any changes to the alarm state.The default is TRUE.
Default: - true
- Parameters:
actionsEnabled- Indicates whether actions should be executed during any changes to the alarm state. This parameter is required.- Returns:
this- See Also:
-
actionsEnabled
Indicates whether actions should be executed during any changes to the alarm state.The default is TRUE.
Default: - true
- Parameters:
actionsEnabled- Indicates whether actions should be executed during any changes to the alarm state. This parameter is required.- Returns:
this- See Also:
-
alarmActions
The list of actions to execute when this alarm transitions into an ALARM state from any other state.- Parameters:
alarmActions- The list of actions to execute when this alarm transitions into an ALARM state from any other state. This parameter is required.- Returns:
this- See Also:
-
alarmDescription
The description of the log alarm.- Parameters:
alarmDescription- The description of the log alarm. This parameter is required.- Returns:
this- See Also:
-
alarmName
The name of the log alarm.- Parameters:
alarmName- The name of the log alarm. This parameter is required.- Returns:
this- See Also:
-
insufficientDataActions
@Stability(Stable) public CfnLogAlarm.Builder insufficientDataActions(List<String> insufficientDataActions) The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.- Parameters:
insufficientDataActions- The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. This parameter is required.- Returns:
this- See Also:
-
okActions
The actions to execute when this alarm transitions to the OK state from any other state.- Parameters:
okActions- The actions to execute when this alarm transitions to the OK state from any other state. This parameter is required.- Returns:
this- See Also:
-
tags
A list of key-value pairs to associate with the log alarm.- Parameters:
tags- A list of key-value pairs to associate with the log alarm. This parameter is required.- Returns:
this- See Also:
-
treatMissingData
Sets how this alarm is to handle missing data points.Valid values are breaching, notBreaching, ignore, and missing.
- Parameters:
treatMissingData- Sets how this alarm is to handle missing data points. This parameter is required.- Returns:
this- See Also:
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLogAlarm>- Returns:
- a newly built instance of
CfnLogAlarm.
-