Interface CfnCompositeAlarmProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnCompositeAlarmProps.Jsii$Proxy
CfnCompositeAlarm.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;
CfnCompositeAlarmProps cfnCompositeAlarmProps = CfnCompositeAlarmProps.builder()
.alarmRule("alarmRule")
// the properties below are optional
.actionsEnabled(false)
.actionsSuppressor("actionsSuppressor")
.actionsSuppressorExtensionPeriod(123)
.actionsSuppressorWaitPeriod(123)
.alarmActions(List.of("alarmActions"))
.alarmDescription("alarmDescription")
.alarmName("alarmName")
.insufficientDataActions(List.of("insufficientDataActions"))
.okActions(List.of("okActions"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnCompositeAlarmPropsstatic final classAn implementation forCfnCompositeAlarmProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectIndicates whether actions should be executed during any changes to the alarm state of the composite alarm.default StringActions will be suppressed if the suppressor alarm is in theALARMstate.default NumberThe maximum time in seconds that the composite alarm waits after suppressor alarm goes out of theALARMstate.default NumberThe maximum time in seconds that the composite alarm waits for the suppressor alarm to go into theALARMstate.The actions to execute when this alarm transitions to the ALARM state from any other state.default StringThe description for the composite alarm.default StringThe name for the composite alarm.An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.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.getTags()A list of key-value pairs to associate with the alarm.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAlarmRule
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
AlarmRulesyntax, see PutCompositeAlarm in the Amazon CloudWatch API Reference .- See Also:
-
getActionsEnabled
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.The default is TRUE.
Returns union: either
BooleanorIResolvable- See Also:
-
getActionsSuppressor
Actions will be suppressed if the suppressor alarm is in theALARMstate.ActionsSuppressorcan be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.- See Also:
-
getActionsSuppressorExtensionPeriod
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of theALARMstate.After this time, the composite alarm performs its actions.
ExtensionPeriodis required only whenActionsSuppressoris specified.- See Also:
-
getActionsSuppressorWaitPeriod
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into theALARMstate.After this time, the composite alarm performs its actions.
WaitPeriodis required only whenActionsSuppressoris specified.- See Also:
-
getAlarmActions
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 .
- See Also:
-
getAlarmDescription
The description for the composite alarm.- See Also:
-
getAlarmName
The name for the composite alarm.This name must be unique within your AWS account.
- See Also:
-
getInsufficientDataActions
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 .
- See Also:
-
getOkActions
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 .
- See Also:
-
getTags
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:TagResourcepermission.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.
- See Also:
-
builder
- Returns:
- a
CfnCompositeAlarmProps.BuilderofCfnCompositeAlarmProps
-