Interface CreateAlarmOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
AlarmProps
- All Known Implementing Classes:
AlarmProps.Jsii$Proxy,CreateAlarmOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:00.826Z")
@Stability(Stable)
public interface CreateAlarmOptions
extends software.amazon.jsii.JsiiSerializable
Properties needed to make an alarm from a metric.
Example:
import software.amazon.awscdk.services.cloudwatch.*;
HostedZone myHostedZone;
Certificate certificate = Certificate.Builder.create(this, "Certificate")
.domainName("hello.example.com")
.validation(CertificateValidation.fromDns(myHostedZone))
.build();
certificate.metricDaysToExpiry().createAlarm(this, "Alarm", CreateAlarmOptions.builder()
.comparisonOperator(ComparisonOperator.LESS_THAN_THRESHOLD)
.evaluationPeriods(1)
.threshold(45)
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCreateAlarmOptionsstatic final classAn implementation forCreateAlarmOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic CreateAlarmOptions.Builderbuilder()default BooleanWhether the actions for this alarm are enabled.default StringDescription for the alarm.default StringName of the alarm.default ComparisonOperatorComparison to use to check if metric is breaching.default NumberThe number of datapoints that must be breaching to trigger the alarm.default StringSpecifies whether to evaluate the data and potentially change the alarm state if there are too few data points to be statistically significant.The number of periods over which data is compared to the specified threshold.The value against which the specified statistic is compared.default TreatMissingDataSets how this alarm is to handle missing data points.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEvaluationPeriods
The number of periods over which data is compared to the specified threshold. -
getThreshold
The value against which the specified statistic is compared. -
getActionsEnabled
Whether the actions for this alarm are enabled.Default: true
-
getAlarmDescription
Description for the alarm.Default: No description
-
getAlarmName
Name of the alarm.Default: Automatically generated name
-
getComparisonOperator
Comparison to use to check if metric is breaching.Default: GreaterThanOrEqualToThreshold
-
getDatapointsToAlarm
The number of datapoints that must be breaching to trigger the alarm.This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide.
Default: ``evaluationPeriods``
- See Also:
-
getEvaluateLowSampleCountPercentile
Specifies whether to evaluate the data and potentially change the alarm state if there are too few data points to be statistically significant.Used only for alarms that are based on percentiles.
Default: - Not configured.
-
getTreatMissingData
Sets how this alarm is to handle missing data points.Default: TreatMissingData.Missing
-
builder
- Returns:
- a
CreateAlarmOptions.BuilderofCreateAlarmOptions
-