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

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    AtLeastThreshold(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    AtLeastThreshold(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    count(Number count)
    Creates a count-based threshold for the AT_LEAST expression.
    percentage(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, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      @Stability(Stable) @NotNull public static AtLeastThreshold count(@NotNull Number 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

      @Stability(Stable) @NotNull public static AtLeastThreshold percentage(@NotNull Number 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.