Class AlarmRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudwatch.AlarmRule
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-08-19T15:41:14.455Z")
@Stability(Stable)
public class AlarmRule
extends software.amazon.jsii.JsiiObject
Class with static functions to build AlarmRule for Composite Alarms.
Example:
Alarm alarm1;
Alarm alarm2;
IAlarmAction onAlarmAction;
IAlarmAction onOkAction;
Alarm actionsSuppressor;
IAlarmRule alarmRule = AlarmRule.anyOf(alarm1, alarm2);
CompositeAlarm myCompositeAlarm = CompositeAlarm.Builder.create(this, "MyAwesomeCompositeAlarm")
.alarmRule(alarmRule)
.actionsSuppressor(actionsSuppressor)
.build();
myCompositeAlarm.addAlarmAction(onAlarmAction);
myCompositeAlarm.addOkAction(onOkAction);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IAlarmRuleallOf(IAlarmRule... operands) function to join all provided AlarmRules with AND operator.static IAlarmRuleanyOf(IAlarmRule... operands) function to join all provided AlarmRules with OR operator.static IAlarmRuleatLeast(AlarmState alarmState, AtLeastOptions options) function to create an AT_LEAST expression for the given alarm state.static IAlarmRuleatLeastNot(AlarmState alarmState, AtLeastOptions options) function to create an AT_LEAST expression for the negated alarm state.static IAlarmRulefromAlarm(IAlarmRef alarm, AlarmState alarmState) function to build Rule Expression for given IAlarm and AlarmState.static IAlarmRulefromBoolean(Boolean value) function to build TRUE/FALSE intent for Rule Expression.static IAlarmRulefromString(String alarmRule) function to build Rule Expression for given Alarm Rule string.static IAlarmRulenot(IAlarmRule operand) function to wrap provided AlarmRule in NOT operator.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
AlarmRule
protected AlarmRule(software.amazon.jsii.JsiiObjectRef objRef) -
AlarmRule
protected AlarmRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AlarmRule
@Stability(Stable) public AlarmRule()
-
-
Method Details
-
allOf
function to join all provided AlarmRules with AND operator.- Parameters:
operands- IAlarmRules to be joined with AND operator. This parameter is required.
-
anyOf
function to join all provided AlarmRules with OR operator.- Parameters:
operands- IAlarmRules to be joined with OR operator. This parameter is required.
-
atLeast
@Stability(Stable) @NotNull public static IAlarmRule atLeast(@NotNull AlarmState alarmState, @NotNull AtLeastOptions options) function to create an AT_LEAST expression for the given alarm state.- Parameters:
alarmState- the alarm state to evaluate against. This parameter is required.options- operands and threshold for the AT_LEAST expression. This parameter is required.
-
atLeastNot
@Stability(Stable) @NotNull public static IAlarmRule atLeastNot(@NotNull AlarmState alarmState, @NotNull AtLeastOptions options) function to create an AT_LEAST expression for the negated alarm state.- Parameters:
alarmState- the alarm state to negate and evaluate against. This parameter is required.options- operands and threshold for the AT_LEAST expression. This parameter is required.
-
fromAlarm
@Stability(Stable) @NotNull public static IAlarmRule fromAlarm(@NotNull IAlarmRef alarm, @NotNull AlarmState alarmState) function to build Rule Expression for given IAlarm and AlarmState.- Parameters:
alarm- IAlarm to be used in Rule Expression. This parameter is required.alarmState- AlarmState to be used in Rule Expression. This parameter is required.
-
fromBoolean
function to build TRUE/FALSE intent for Rule Expression.- Parameters:
value- boolean value to be used in rule expression. This parameter is required.
-
fromString
function to build Rule Expression for given Alarm Rule string.- Parameters:
alarmRule- string to be used in Rule Expression. This parameter is required.
-
not
function to wrap provided AlarmRule in NOT operator.- Parameters:
operand- IAlarmRule to be wrapped in NOT operator. This parameter is required.
-