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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:36.907Z") @Stability(Stable) public enum Statistic extends Enum<Statistic>
Statistic to use over the aggregation period.

Example:

 import software.amazon.awscdk.services.cloudwatch.*;
 DeliveryStream deliveryStream;
 // Alarm that triggers when the per-second average of incoming bytes exceeds 90% of the current service limit
 MathExpression incomingBytesPercentOfLimit = MathExpression.Builder.create()
         .expression("incomingBytes / 300 / bytePerSecLimit")
         .usingMetrics(Map.of(
                 "incomingBytes", deliveryStream.metricIncomingBytes(MetricOptions.builder().statistic(Statistic.SUM).build()),
                 "bytePerSecLimit", deliveryStream.metric("BytesPerSecondLimit")))
         .build();
 Alarm.Builder.create(this, "Alarm")
         .metric(incomingBytesPercentOfLimit)
         .threshold(0.9)
         .evaluationPeriods(3)
         .build();
 
  • Enum Constant Details

    • SAMPLE_COUNT

      @Stability(Stable) public static final Statistic SAMPLE_COUNT
      The count (number) of data points used for the statistical calculation.
    • AVERAGE

      @Stability(Stable) public static final Statistic AVERAGE
      The value of Sum / SampleCount during the specified period.
    • SUM

      @Stability(Stable) public static final Statistic SUM
      All values submitted for the matching metric added together.

      This statistic can be useful for determining the total volume of a metric.

    • MINIMUM

      @Stability(Stable) public static final Statistic MINIMUM
      The lowest value observed during the specified period.

      You can use this value to determine low volumes of activity for your application.

    • MAXIMUM

      @Stability(Stable) public static final Statistic MAXIMUM
      The highest value observed during the specified period.

      You can use this value to determine high volumes of activity for your application.

  • Method Details

    • values

      public static Statistic[] 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 Statistic 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