Interface CfnAlarmProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnAlarmProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:04.147Z")
@Stability(Stable)
public interface CfnAlarmProps
extends software.amazon.jsii.JsiiSerializable
Properties for defining a
CfnAlarm
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.lightsail.*; CfnAlarmProps cfnAlarmProps = CfnAlarmProps.builder() .alarmName("alarmName") .comparisonOperator("comparisonOperator") .evaluationPeriods(123) .metricName("metricName") .monitoredResourceName("monitoredResourceName") .threshold(123) // the properties below are optional .contactProtocols(List.of("contactProtocols")) .datapointsToAlarm(123) .notificationEnabled(false) .notificationTriggers(List.of("notificationTriggers")) .treatMissingData("treatMissingData") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnAlarmProps
static final class
An implementation forCfnAlarmProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic CfnAlarmProps.Builder
builder()
The name of the alarm.The arithmetic operation to use when comparing the specified statistic and threshold.The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.default Number
The number of data points within the evaluation periods that must be breaching to cause the alarm to go to theALARM
state.The number of periods over which data is compared to the specified threshold.The name of the metric associated with the alarm.The name of the Lightsail resource that the alarm monitors.default Object
A Boolean value indicating whether the alarm is enabled.The alarm states that trigger a notification.The value against which the specified statistic is compared.default String
Specifies how the alarm handles missing data points.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAlarmName
The name of the alarm.- See Also:
-
getComparisonOperator
The arithmetic operation to use when comparing the specified statistic and threshold.- See Also:
-
getEvaluationPeriods
The number of periods over which data is compared to the specified threshold.- See Also:
-
getMetricName
The name of the metric associated with the alarm.- See Also:
-
getMonitoredResourceName
The name of the Lightsail resource that the alarm monitors.- See Also:
-
getThreshold
The value against which the specified statistic is compared.- See Also:
-
getContactProtocols
The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.Allowed Values :
Email
|SMS
- See Also:
-
getDatapointsToAlarm
The number of data points within the evaluation periods that must be breaching to cause the alarm to go to theALARM
state.- See Also:
-
getNotificationEnabled
A Boolean value indicating whether the alarm is enabled.- See Also:
-
getNotificationTriggers
The alarm states that trigger a notification.To specify the
OK
andINSUFFICIENT_DATA
values, you must also specifyContactProtocols
values. Otherwise, theOK
andINSUFFICIENT_DATA
values will not take effect and the stack will drift.Allowed Values :
OK
|ALARM
|INSUFFICIENT_DATA
- See Also:
-
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.
- See Also:
-
builder
- Returns:
- a
CfnAlarmProps.Builder
ofCfnAlarmProps
-