Class CfnLogAlarmProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.CfnLogAlarmProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLogAlarmProps>
- Enclosing interface:
CfnLogAlarmProps
@Stability(Stable)
public static final class CfnLogAlarmProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLogAlarmProps>
A builder for
CfnLogAlarmProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactionLogLineCount(Number actionLogLineCount) Sets the value ofCfnLogAlarmProps.getActionLogLineCount()actionLogLineRoleArn(String actionLogLineRoleArn) Sets the value ofCfnLogAlarmProps.getActionLogLineRoleArn()actionsEnabled(Boolean actionsEnabled) Sets the value ofCfnLogAlarmProps.getActionsEnabled()actionsEnabled(IResolvable actionsEnabled) Sets the value ofCfnLogAlarmProps.getActionsEnabled()alarmActions(List<String> alarmActions) Sets the value ofCfnLogAlarmProps.getAlarmActions()alarmDescription(String alarmDescription) Sets the value ofCfnLogAlarmProps.getAlarmDescription()Sets the value ofCfnLogAlarmProps.getAlarmName()build()Builds the configured instance.comparisonOperator(String comparisonOperator) Sets the value ofCfnLogAlarmProps.getComparisonOperator()insufficientDataActions(List<String> insufficientDataActions) Sets the value ofCfnLogAlarmProps.getInsufficientDataActions()Sets the value ofCfnLogAlarmProps.getOkActions()queryResultsToAlarm(Number queryResultsToAlarm) Sets the value ofCfnLogAlarmProps.getQueryResultsToAlarm()queryResultsToEvaluate(Number queryResultsToEvaluate) Sets the value ofCfnLogAlarmProps.getQueryResultsToEvaluate()scheduledQueryConfiguration(IResolvable scheduledQueryConfiguration) Sets the value ofCfnLogAlarmProps.getScheduledQueryConfiguration()scheduledQueryConfiguration(CfnLogAlarm.ScheduledQueryConfigurationProperty scheduledQueryConfiguration) Sets the value ofCfnLogAlarmProps.getScheduledQueryConfiguration()Sets the value ofCfnLogAlarmProps.getTags()Sets the value ofCfnLogAlarmProps.getThreshold()treatMissingData(String treatMissingData) Sets the value ofCfnLogAlarmProps.getTreatMissingData()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
comparisonOperator
Sets the value ofCfnLogAlarmProps.getComparisonOperator()- Parameters:
comparisonOperator- The arithmetic operation to use when comparing the specified threshold and the query results. This parameter is required. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.- Returns:
this
-
queryResultsToAlarm
Sets the value ofCfnLogAlarmProps.getQueryResultsToAlarm()- Parameters:
queryResultsToAlarm- The number of query results that must be breaching to trigger the alarm. This parameter is required.- Returns:
this
-
queryResultsToEvaluate
@Stability(Stable) public CfnLogAlarmProps.Builder queryResultsToEvaluate(Number queryResultsToEvaluate) Sets the value ofCfnLogAlarmProps.getQueryResultsToEvaluate()- Parameters:
queryResultsToEvaluate- The number of query results over which data is compared to the specified threshold. This parameter is required.- Returns:
this
-
scheduledQueryConfiguration
@Stability(Stable) public CfnLogAlarmProps.Builder scheduledQueryConfiguration(IResolvable scheduledQueryConfiguration) Sets the value ofCfnLogAlarmProps.getScheduledQueryConfiguration()- Parameters:
scheduledQueryConfiguration- The scheduled query configuration for the log alarm. This parameter is required.- Returns:
this
-
scheduledQueryConfiguration
@Stability(Stable) public CfnLogAlarmProps.Builder scheduledQueryConfiguration(CfnLogAlarm.ScheduledQueryConfigurationProperty scheduledQueryConfiguration) Sets the value ofCfnLogAlarmProps.getScheduledQueryConfiguration()- Parameters:
scheduledQueryConfiguration- The scheduled query configuration for the log alarm. This parameter is required.- Returns:
this
-
threshold
Sets the value ofCfnLogAlarmProps.getThreshold()- Parameters:
threshold- The value to compare against the results of the scheduled query evaluation. This parameter is required.- Returns:
this
-
actionLogLineCount
Sets the value ofCfnLogAlarmProps.getActionLogLineCount()- Parameters:
actionLogLineCount- The number of log lines to include in alarm notifications. Valid values are 0 to 50.- Returns:
this
-
actionLogLineRoleArn
@Stability(Stable) public CfnLogAlarmProps.Builder actionLogLineRoleArn(String actionLogLineRoleArn) Sets the value ofCfnLogAlarmProps.getActionLogLineRoleArn()- Parameters:
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.- Returns:
this
-
actionsEnabled
Sets the value ofCfnLogAlarmProps.getActionsEnabled()- Parameters:
actionsEnabled- Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.- Returns:
this
-
actionsEnabled
Sets the value ofCfnLogAlarmProps.getActionsEnabled()- Parameters:
actionsEnabled- Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.- Returns:
this
-
alarmActions
Sets the value ofCfnLogAlarmProps.getAlarmActions()- Parameters:
alarmActions- The list of actions to execute when this alarm transitions into an ALARM state from any other state.- Returns:
this
-
alarmDescription
Sets the value ofCfnLogAlarmProps.getAlarmDescription()- Parameters:
alarmDescription- The description of the log alarm.- Returns:
this
-
alarmName
Sets the value ofCfnLogAlarmProps.getAlarmName()- Parameters:
alarmName- The name of the log alarm.- Returns:
this
-
insufficientDataActions
@Stability(Stable) public CfnLogAlarmProps.Builder insufficientDataActions(List<String> insufficientDataActions) Sets the value ofCfnLogAlarmProps.getInsufficientDataActions()- Parameters:
insufficientDataActions- The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.- Returns:
this
-
okActions
Sets the value ofCfnLogAlarmProps.getOkActions()- Parameters:
okActions- The actions to execute when this alarm transitions to the OK state from any other state.- Returns:
this
-
tags
Sets the value ofCfnLogAlarmProps.getTags()- Parameters:
tags- A list of key-value pairs to associate with the log alarm.- Returns:
this
-
treatMissingData
Sets the value ofCfnLogAlarmProps.getTreatMissingData()- Parameters:
treatMissingData- Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLogAlarmProps>- Returns:
- a new instance of
CfnLogAlarmProps - Throws:
NullPointerException- if any required attribute was not provided
-