@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.630Z") @Stability(value=Stable) public interface CfnAlarmProps extends software.amazon.jsii.JsiiSerializable
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnAlarmProps.Builder
A builder for
CfnAlarmProps |
static class |
CfnAlarmProps.Jsii$Proxy
An implementation for
CfnAlarmProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnAlarmProps.Builder |
builder() |
String |
getAlarmName()
The name of the alarm.
|
String |
getComparisonOperator()
The arithmetic operation to use when comparing the specified statistic and threshold.
|
default List<String> |
getContactProtocols()
The contact protocols for the alarm, such as `Email` , `SMS` (text messaging), or both.
|
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.
|
Number |
getEvaluationPeriods()
The number of periods over which data is compared to the specified threshold.
|
String |
getMetricName()
The name of the metric associated with the alarm.
|
String |
getMonitoredResourceName()
The name of the Lightsail resource that the alarm monitors.
|
default Object |
getNotificationEnabled()
A Boolean value indicating whether the alarm is enabled.
|
default List<String> |
getNotificationTriggers()
The alarm states that trigger a notification.
|
Number |
getThreshold()
The value against which the specified statistic is compared.
|
default String |
getTreatMissingData()
Specifies how the alarm handles missing data points.
|
@Stability(value=Stable) @NotNull String getAlarmName()
@Stability(value=Stable) @NotNull String getComparisonOperator()
@Stability(value=Stable) @NotNull Number getEvaluationPeriods()
@Stability(value=Stable) @NotNull String getMetricName()
@Stability(value=Stable) @NotNull String getMonitoredResourceName()
@Stability(value=Stable) @NotNull Number getThreshold()
@Stability(value=Stable) @Nullable default List<String> getContactProtocols()
Allowed Values : Email | SMS
@Stability(value=Stable) @Nullable default Number getDatapointsToAlarm()
@Stability(value=Stable) @Nullable default Object getNotificationEnabled()
@Stability(value=Stable) @Nullable default List<String> getNotificationTriggers()
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
@Stability(value=Stable) @Nullable default String getTreatMissingData()
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.@Stability(value=Stable) static CfnAlarmProps.Builder builder()
CfnAlarmProps.Builder of CfnAlarmPropsCopyright © 2022. All rights reserved.