Interface CfnAlarmProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnAlarmProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:13.021Z")
@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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnAlarmPropsstatic final classAn implementation forCfnAlarmProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnAlarmProps.Builderbuilder()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 NumberThe number of data points within the evaluation periods that must be breaching to cause the alarm to go to theALARMstate.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 ObjectA 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 StringSpecifies 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 theALARMstate.- See Also:
-
getNotificationEnabled
A Boolean value indicating whether the alarm is enabled.Returns union: either
BooleanorIResolvable- See Also:
-
getNotificationTriggers
The alarm states that trigger a notification.To specify the
OKandINSUFFICIENT_DATAvalues, you must also specifyContactProtocolsvalues. Otherwise, theOKandINSUFFICIENT_DATAvalues 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.BuilderofCfnAlarmProps
-