Class CfnAlarmPropsMixin.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.lightsail.CfnAlarmPropsMixin.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAlarmPropsMixin>
- Enclosing class:
CfnAlarmPropsMixin
@Stability(Stable)
public static final class CfnAlarmPropsMixin.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAlarmPropsMixin>
A fluent builder for
CfnAlarmPropsMixin.-
Method Summary
Modifier and TypeMethodDescriptionThe name of the alarm.build()comparisonOperator(String comparisonOperator) The arithmetic operation to use when comparing the specified statistic and threshold.contactProtocols(List<String> contactProtocols) The contact protocols for the alarm, such asEmail,SMS(text messaging), or both.static CfnAlarmPropsMixin.Buildercreate()static CfnAlarmPropsMixin.Buildercreate(CfnPropertyMixinOptions options) datapointsToAlarm(Number datapointsToAlarm) The number of data points within the evaluation periods that must be breaching to cause the alarm to go to theALARMstate.evaluationPeriods(Number evaluationPeriods) The number of periods over which data is compared to the specified threshold.metricName(String metricName) The name of the metric associated with the alarm.monitoredResourceName(String monitoredResourceName) The name of the Lightsail resource that the alarm monitors.notificationEnabled(Boolean notificationEnabled) A Boolean value indicating whether the alarm is enabled.notificationEnabled(IResolvable notificationEnabled) A Boolean value indicating whether the alarm is enabled.notificationTriggers(List<String> notificationTriggers) The alarm states that trigger a notification.The value against which the specified statistic is compared.treatMissingData(String treatMissingData) Specifies how the alarm handles missing data points.
-
Method Details
-
create
- Parameters:
options- Mixin options.- Returns:
- a new instance of
CfnAlarmPropsMixin.Builder.
-
create
- Returns:
- a new instance of
CfnAlarmPropsMixin.Builder.
-
alarmName
The name of the alarm.- Parameters:
alarmName- The name of the alarm. This parameter is required.- Returns:
this- See Also:
-
comparisonOperator
The arithmetic operation to use when comparing the specified statistic and threshold.- Parameters:
comparisonOperator- The arithmetic operation to use when comparing the specified statistic and threshold. This parameter is required.- Returns:
this- See Also:
-
contactProtocols
@Stability(Stable) public CfnAlarmPropsMixin.Builder contactProtocols(List<String> contactProtocols) The contact protocols for the alarm, such asEmail,SMS(text messaging), or both.Allowed Values :
Email|SMS- Parameters:
contactProtocols- The contact protocols for the alarm, such asEmail,SMS(text messaging), or both. This parameter is required.- Returns:
this- See Also:
-
datapointsToAlarm
The number of data points within the evaluation periods that must be breaching to cause the alarm to go to theALARMstate.- Parameters:
datapointsToAlarm- The number of data points within the evaluation periods that must be breaching to cause the alarm to go to theALARMstate. This parameter is required.- Returns:
this- See Also:
-
evaluationPeriods
The number of periods over which data is compared to the specified threshold.- Parameters:
evaluationPeriods- The number of periods over which data is compared to the specified threshold. This parameter is required.- Returns:
this- See Also:
-
metricName
The name of the metric associated with the alarm.- Parameters:
metricName- The name of the metric associated with the alarm. This parameter is required.- Returns:
this- See Also:
-
monitoredResourceName
@Stability(Stable) public CfnAlarmPropsMixin.Builder monitoredResourceName(String monitoredResourceName) The name of the Lightsail resource that the alarm monitors.- Parameters:
monitoredResourceName- The name of the Lightsail resource that the alarm monitors. This parameter is required.- Returns:
this- See Also:
-
notificationEnabled
@Stability(Stable) public CfnAlarmPropsMixin.Builder notificationEnabled(Boolean notificationEnabled) A Boolean value indicating whether the alarm is enabled.- Parameters:
notificationEnabled- A Boolean value indicating whether the alarm is enabled. This parameter is required.- Returns:
this- See Also:
-
notificationEnabled
@Stability(Stable) public CfnAlarmPropsMixin.Builder notificationEnabled(IResolvable notificationEnabled) A Boolean value indicating whether the alarm is enabled.- Parameters:
notificationEnabled- A Boolean value indicating whether the alarm is enabled. This parameter is required.- Returns:
this- See Also:
-
notificationTriggers
@Stability(Stable) public CfnAlarmPropsMixin.Builder notificationTriggers(List<String> notificationTriggers) 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- Parameters:
notificationTriggers- The alarm states that trigger a notification. This parameter is required.- Returns:
this- See Also:
-
threshold
The value against which the specified statistic is compared.- Parameters:
threshold- The value against which the specified statistic is compared. This parameter is required.- Returns:
this- See Also:
-
treatMissingData
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.
- Parameters:
treatMissingData- Specifies how the alarm handles missing data points. This parameter is required.- Returns:
this- See Also:
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAlarmPropsMixin>- Returns:
- a newly built instance of
CfnAlarmPropsMixin.
-