Class AtLeastThreshold
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudwatch.AtLeastThreshold
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-08-13T16:20:02.108Z")
@Stability(Stable)
public abstract class AtLeastThreshold
extends software.amazon.jsii.JsiiObject
Threshold configuration for the AT_LEAST composite alarm rule expression.
Use AtLeastThreshold.count() for an absolute number or
AtLeastThreshold.percentage() for a percentage-based threshold.
Example:
Alarm alarm1;
Alarm alarm2;
Alarm alarm3;
Alarm alarm4;
IAlarmRule alarmRule = AlarmRule.anyOf(AlarmRule.allOf(AlarmRule.anyOf(alarm1, AlarmRule.fromAlarm(alarm2, AlarmState.OK), alarm3), AlarmRule.not(AlarmRule.fromAlarm(alarm4, AlarmState.INSUFFICIENT_DATA)), AlarmRule.atLeast(AlarmState.ALARM, AtLeastOptions.builder()
.operands(List.of(alarm1, alarm2, alarm3))
.threshold(AtLeastThreshold.count(2))
.build()), AlarmRule.atLeastNot(AlarmState.OK, AtLeastOptions.builder()
.operands(List.of(alarm1, alarm2, alarm3))
.threshold(AtLeastThreshold.percentage(60))
.build())), AlarmRule.fromBoolean(false));
CompositeAlarm.Builder.create(this, "MyAwesomeCompositeAlarm")
.alarmRule(alarmRule)
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAtLeastThreshold(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAtLeastThreshold(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic AtLeastThresholdCreates a count-based threshold for the AT_LEAST expression.static AtLeastThresholdpercentage(Number percentage) Creates a percentage-based threshold for the AT_LEAST expression.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
-
AtLeastThreshold
protected AtLeastThreshold(software.amazon.jsii.JsiiObjectRef objRef) -
AtLeastThreshold
protected AtLeastThreshold(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AtLeastThreshold
@Stability(Stable) protected AtLeastThreshold()
-
-
Method Details
-
count
Creates a count-based threshold for the AT_LEAST expression.The count must be a positive integer between 1 and the number of operands.
- Parameters:
count- the minimum number of alarms that must be in the specified state. This parameter is required.
-
percentage
Creates a percentage-based threshold for the AT_LEAST expression.The percentage must be an integer between 1 and 100.
- Parameters:
percentage- the minimum percentage of alarms that must be in the specified state. This parameter is required.
-