Interface CreateAlarmOptions

All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
AlarmProps.Jsii$Proxy, CreateAlarmOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:36.855Z") @Stability(Stable) public interface CreateAlarmOptions extends
Properties needed to make an alarm from a metric.


 Function fn;
 fn.metricErrors().createAlarm(this, "Alarm", CreateAlarmOptions.builder()
  • Method Details

    • getEvaluationPeriods

      @Stability(Stable) @NotNull Number getEvaluationPeriods()
      The number of periods over which data is compared to the specified threshold.
    • getThreshold

      @Stability(Stable) @NotNull Number getThreshold()
      The value against which the specified statistic is compared.
    • getActionsEnabled

      @Stability(Stable) @Nullable default Boolean getActionsEnabled()
      Whether the actions for this alarm are enabled.

      Default: true

    • getAlarmDescription

      @Stability(Stable) @Nullable default String getAlarmDescription()
      Description for the alarm.

      Default: No description

    • getAlarmName

      @Stability(Stable) @Nullable default String getAlarmName()
      Name of the alarm.

      Default: Automatically generated name

    • getComparisonOperator

      @Stability(Stable) @Nullable default ComparisonOperator getComparisonOperator()
      Comparison to use to check if metric is breaching.

      Default: GreaterThanOrEqualToThreshold

    • getDatapointsToAlarm

      @Stability(Stable) @Nullable default Number getDatapointsToAlarm()
      The number of datapoints that must be breaching to trigger the alarm.

      This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide.

      Default: ``evaluationPeriods``

      See Also:
    • getEvaluateLowSampleCountPercentile

      @Stability(Stable) @Nullable default String getEvaluateLowSampleCountPercentile()
      Specifies whether to evaluate the data and potentially change the alarm state if there are too few data points to be statistically significant.

      Used only for alarms that are based on percentiles.

      Default: - Not configured.

    • getPeriod

      @Stability(Deprecated) @Deprecated @Nullable default Duration getPeriod()
      Use metric.with({ period: ... }) to encode the period into the Metric object
      (deprecated) The period over which the specified statistic is applied.

      Cannot be used with MathExpression objects.

      Default: - The period from the metric

    • getStatistic

      @Stability(Deprecated) @Deprecated @Nullable default String getStatistic()
      Use metric.with({ statistic: ... }) to encode the period into the Metric object
      (deprecated) What function to use for aggregating.

      Can be one of the following:

      • "Minimum" | "min"
      • "Maximum" | "max"
      • "Average" | "avg"
      • "Sum" | "sum"
      • "SampleCount | "n"
      • "pNN.NN"

      Cannot be used with MathExpression objects.

      Default: - The statistic from the metric

    • getTreatMissingData

      @Stability(Stable) @Nullable default TreatMissingData getTreatMissingData()
      Sets how this alarm is to handle missing data points.

      Default: TreatMissingData.Missing

    • builder

      @Stability(Stable) static CreateAlarmOptions.Builder builder()
      a CreateAlarmOptions.Builder of CreateAlarmOptions