Class CfnAlarmMixinProps.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.lightsail.CfnAlarmMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAlarmMixinProps>
- Enclosing interface:
CfnAlarmMixinProps
@Stability(Stable)
public static final class CfnAlarmMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAlarmMixinProps>
A builder for
CfnAlarmMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnAlarmMixinProps.getAlarmName()build()Builds the configured instance.comparisonOperator(String comparisonOperator) Sets the value ofCfnAlarmMixinProps.getComparisonOperator()contactProtocols(List<String> contactProtocols) Sets the value ofCfnAlarmMixinProps.getContactProtocols()datapointsToAlarm(Number datapointsToAlarm) Sets the value ofCfnAlarmMixinProps.getDatapointsToAlarm()evaluationPeriods(Number evaluationPeriods) Sets the value ofCfnAlarmMixinProps.getEvaluationPeriods()metricName(String metricName) Sets the value ofCfnAlarmMixinProps.getMetricName()monitoredResourceName(String monitoredResourceName) Sets the value ofCfnAlarmMixinProps.getMonitoredResourceName()notificationEnabled(Boolean notificationEnabled) Sets the value ofCfnAlarmMixinProps.getNotificationEnabled()notificationEnabled(IResolvable notificationEnabled) Sets the value ofCfnAlarmMixinProps.getNotificationEnabled()notificationTriggers(List<String> notificationTriggers) Sets the value ofCfnAlarmMixinProps.getNotificationTriggers()Sets the value ofCfnAlarmMixinProps.getThreshold()treatMissingData(String treatMissingData) Sets the value ofCfnAlarmMixinProps.getTreatMissingData()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alarmName
Sets the value ofCfnAlarmMixinProps.getAlarmName()- Parameters:
alarmName- The name of the alarm.- Returns:
this
-
comparisonOperator
Sets the value ofCfnAlarmMixinProps.getComparisonOperator()- Parameters:
comparisonOperator- The arithmetic operation to use when comparing the specified statistic and threshold.- Returns:
this
-
contactProtocols
@Stability(Stable) public CfnAlarmMixinProps.Builder contactProtocols(List<String> contactProtocols) Sets the value ofCfnAlarmMixinProps.getContactProtocols()- Parameters:
contactProtocols- The contact protocols for the alarm, such asEmail,SMS(text messaging), or both. Allowed Values :Email|SMS- Returns:
this
-
datapointsToAlarm
Sets the value ofCfnAlarmMixinProps.getDatapointsToAlarm()- Parameters:
datapointsToAlarm- The number of data points within the evaluation periods that must be breaching to cause the alarm to go to theALARMstate.- Returns:
this
-
evaluationPeriods
Sets the value ofCfnAlarmMixinProps.getEvaluationPeriods()- Parameters:
evaluationPeriods- The number of periods over which data is compared to the specified threshold.- Returns:
this
-
metricName
Sets the value ofCfnAlarmMixinProps.getMetricName()- Parameters:
metricName- The name of the metric associated with the alarm.- Returns:
this
-
monitoredResourceName
@Stability(Stable) public CfnAlarmMixinProps.Builder monitoredResourceName(String monitoredResourceName) Sets the value ofCfnAlarmMixinProps.getMonitoredResourceName()- Parameters:
monitoredResourceName- The name of the Lightsail resource that the alarm monitors.- Returns:
this
-
notificationEnabled
@Stability(Stable) public CfnAlarmMixinProps.Builder notificationEnabled(Boolean notificationEnabled) Sets the value ofCfnAlarmMixinProps.getNotificationEnabled()- Parameters:
notificationEnabled- A Boolean value indicating whether the alarm is enabled.- Returns:
this
-
notificationEnabled
@Stability(Stable) public CfnAlarmMixinProps.Builder notificationEnabled(IResolvable notificationEnabled) Sets the value ofCfnAlarmMixinProps.getNotificationEnabled()- Parameters:
notificationEnabled- A Boolean value indicating whether the alarm is enabled.- Returns:
this
-
notificationTriggers
@Stability(Stable) public CfnAlarmMixinProps.Builder notificationTriggers(List<String> notificationTriggers) Sets the value ofCfnAlarmMixinProps.getNotificationTriggers()- Parameters:
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- Returns:
this
-
threshold
Sets the value ofCfnAlarmMixinProps.getThreshold()- Parameters:
threshold- The value against which the specified statistic is compared.- Returns:
this
-
treatMissingData
Sets the value ofCfnAlarmMixinProps.getTreatMissingData()- Parameters:
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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAlarmMixinProps>- Returns:
- a new instance of
CfnAlarmMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-