Class CfnCompositeAlarm.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCompositeAlarm>
- Enclosing class:
CfnCompositeAlarm
CfnCompositeAlarm
.-
Method Summary
Modifier and TypeMethodDescriptionactionsEnabled
(Boolean actionsEnabled) Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.actionsEnabled
(IResolvable actionsEnabled) Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.actionsSuppressor
(String actionsSuppressor) Actions will be suppressed if the suppressor alarm is in theALARM
state.actionsSuppressorExtensionPeriod
(Number actionsSuppressorExtensionPeriod) The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of theALARM
state.actionsSuppressorWaitPeriod
(Number actionsSuppressorWaitPeriod) The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into theALARM
state.alarmActions
(List<String> alarmActions) The actions to execute when this alarm transitions to the ALARM state from any other state.alarmDescription
(String alarmDescription) The description for the composite alarm.The name for the composite alarm.An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.build()
static CfnCompositeAlarm.Builder
insufficientDataActions
(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.A list of key-value pairs to associate with the alarm.
-
Method Details
-
create
@Stability(Stable) public static CfnCompositeAlarm.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
CfnCompositeAlarm.Builder
.
-
alarmRule
An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression.
You can use either alarm names or ARNs to reference the other alarms that are to be evaluated.
Functions can include the following:
- ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM state.
- OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state.
- INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm is in INSUFFICIENT_DATA state.
- TRUE always evaluates to TRUE.
- FALSE always evaluates to FALSE.
TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions.
For more information about
AlarmRule
syntax, see PutCompositeAlarm in the Amazon CloudWatch API Reference .- Parameters:
alarmRule
- An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. This parameter is required.- Returns:
this
- See Also:
-
actionsEnabled
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.The default is TRUE.
- Parameters:
actionsEnabled
- Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. This parameter is required.- Returns:
this
- See Also:
-
actionsEnabled
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.The default is TRUE.
- Parameters:
actionsEnabled
- Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. This parameter is required.- Returns:
this
- See Also:
-
actionsSuppressor
Actions will be suppressed if the suppressor alarm is in theALARM
state.ActionsSuppressor
can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.- Parameters:
actionsSuppressor
- Actions will be suppressed if the suppressor alarm is in theALARM
state. This parameter is required.- Returns:
this
- See Also:
-
actionsSuppressorExtensionPeriod
@Stability(Stable) public CfnCompositeAlarm.Builder actionsSuppressorExtensionPeriod(Number actionsSuppressorExtensionPeriod) The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of theALARM
state.After this time, the composite alarm performs its actions.
ExtensionPeriod
is required only whenActionsSuppressor
is specified.- Parameters:
actionsSuppressorExtensionPeriod
- The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of theALARM
state. This parameter is required.- Returns:
this
- See Also:
-
actionsSuppressorWaitPeriod
@Stability(Stable) public CfnCompositeAlarm.Builder actionsSuppressorWaitPeriod(Number actionsSuppressorWaitPeriod) The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into theALARM
state.After this time, the composite alarm performs its actions.
WaitPeriod
is required only whenActionsSuppressor
is specified.- Parameters:
actionsSuppressorWaitPeriod
- The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into theALARM
state. This parameter is required.- Returns:
this
- See Also:
-
alarmActions
The actions to execute when this alarm transitions to the ALARM state from any other state.Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
- Parameters:
alarmActions
- The actions to execute when this alarm transitions to the ALARM state from any other state. This parameter is required.- Returns:
this
- See Also:
-
alarmDescription
The description for the composite alarm.- Parameters:
alarmDescription
- The description for the composite alarm. This parameter is required.- Returns:
this
- See Also:
-
alarmName
The name for the composite alarm.This name must be unique within your AWS account.
- Parameters:
alarmName
- The name for the composite alarm. This parameter is required.- Returns:
this
- See Also:
-
insufficientDataActions
@Stability(Stable) public CfnCompositeAlarm.Builder insufficientDataActions(List<String> insufficientDataActions) The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
- 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.Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
- 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 alarm.You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the
cloudwatch:TagResource
permission.Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
- Parameters:
tags
- A list of key-value pairs to associate with the alarm. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnCompositeAlarm>
- Returns:
- a newly built instance of
CfnCompositeAlarm
.
-