Enum TreatMissingData

java.lang.Object
java.lang.Enum<TreatMissingData>
software.amazon.awscdk.services.cloudwatch.TreatMissingData
All Implemented Interfaces:
Serializable, Comparable<TreatMissingData>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:15.881Z") @Stability(Stable) public enum TreatMissingData extends Enum<TreatMissingData>
Specify how missing data points are treated during alarm evaluation.

Example:

 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.cloudwatch.*;
 Function fn = Function.Builder.create(this, "MyFunction")
         .runtime(Runtime.NODEJS_18_X)
         .handler("index.handler")
         .code(Code.fromAsset(join(__dirname, "lambda-handler")))
         .timeout(Duration.minutes(5))
         .build();
 if (fn.getTimeout()) {
     Alarm.Builder.create(this, "MyAlarm")
             .metric(fn.metricDuration().with(MetricOptions.builder()
                     .statistic("Maximum")
                     .build()))
             .evaluationPeriods(1)
             .datapointsToAlarm(1)
             .threshold(fn.timeout.toMilliseconds())
             .treatMissingData(TreatMissingData.IGNORE)
             .alarmName("My Lambda Timeout")
             .build();
 }
 
  • Enum Constant Details

    • BREACHING

      @Stability(Stable) public static final TreatMissingData BREACHING
      Missing data points are treated as breaching the threshold.
    • NOT_BREACHING

      @Stability(Stable) public static final TreatMissingData NOT_BREACHING
      Missing data points are treated as being within the threshold.
    • IGNORE

      @Stability(Stable) public static final TreatMissingData IGNORE
      The current alarm state is maintained.
    • MISSING

      @Stability(Stable) public static final TreatMissingData MISSING
      The alarm does not consider missing data points when evaluating whether to change state.
  • Method Details

    • values

      public static TreatMissingData[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TreatMissingData valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null