Interface CfnAlarmProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:59.692Z") @Stability(Stable) public interface CfnAlarmProps extends
Properties for defining a CfnAlarm.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 CfnAlarmProps cfnAlarmProps = CfnAlarmProps.builder()
         // the properties below are optional
  • Method Details

    • getAlarmName

      @Stability(Stable) @NotNull String getAlarmName()
      The name of the alarm.
    • getComparisonOperator

      @Stability(Stable) @NotNull String getComparisonOperator()
      The arithmetic operation to use when comparing the specified statistic and threshold.
    • getEvaluationPeriods

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

      @Stability(Stable) @NotNull String getMetricName()
      The name of the metric associated with the alarm.
    • getMonitoredResourceName

      @Stability(Stable) @NotNull String getMonitoredResourceName()
      The name of the Lightsail resource that the alarm monitors.
    • getThreshold

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

      @Stability(Stable) @Nullable default List<String> getContactProtocols()
      The contact protocols for the alarm, such as Email , SMS (text messaging), or both.

      Allowed Values : Email | SMS

    • getDatapointsToAlarm

      @Stability(Stable) @Nullable default Number getDatapointsToAlarm()
      The number of data points within the evaluation periods that must be breaching to cause the alarm to go to the ALARM state.
    • getNotificationEnabled

      @Stability(Stable) @Nullable default Object getNotificationEnabled()
      A Boolean value indicating whether the alarm is enabled.
    • getNotificationTriggers

      @Stability(Stable) @Nullable default List<String> getNotificationTriggers()
      The alarm states that trigger a notification.

      To specify the OK and INSUFFICIENT_DATA values, you must also specify ContactProtocols values. Otherwise, the OK and INSUFFICIENT_DATA values will not take effect and the stack will drift.

      Allowed Values : OK | ALARM | INSUFFICIENT_DATA

    • getTreatMissingData

      @Stability(Stable) @Nullable default String getTreatMissingData()
      Specifies how the alarm handles missing data points.

      An alarm can treat missing data in the following ways:

      • breaching - Assumes the missing data is not within the threshold. Missing data counts towards the number of times that the metric is not within the threshold.
      • notBreaching - Assumes the missing data is within the threshold. Missing data does not count towards the number of times that the metric is not within the threshold.
      • ignore - Ignores the missing data. Maintains the current alarm state.
      • missing - Missing data is treated as missing.
    • builder

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