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.84.0 (build 5404dcf)",
date="2023-06-19T16:30:36.855Z")
@Stability(Stable)
public interface CreateAlarmOptions
extends software.amazon.jsii.JsiiSerializable
Properties needed to make an alarm from a metric.
Example:
Function fn;
fn.metricErrors().createAlarm(this, "Alarm", CreateAlarmOptions.builder()
.threshold(100)
.evaluationPeriods(2)
.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.default DurationDeprecated.default StringDeprecated.Usemetric.with({ statistic: ...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``
-
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.
-
getPeriod
Deprecated.Usemetric.with({ period: ... })to encode the period into the Metric object(deprecated) The period over which the specified statistic is applied.Cannot be used with
MathExpressionobjects.Default: - The period from the metric
-
getStatistic
Deprecated.Usemetric.with({ statistic: ... })to encode the period into the Metric object(deprecated) What function to use for aggregating.Can be one of the following:
- "Minimum" | "min"
- "Maximum" | "max"
- "Average" | "avg"
- "Sum" | "sum"
- "SampleCount | "n"
- "pNN.NN"
Cannot be used with
MathExpressionobjects.Default: - The statistic from the metric
-
getTreatMissingData
Sets how this alarm is to handle missing data points.Default: TreatMissingData.Missing
-
builder
- Returns:
- a
CreateAlarmOptions.BuilderofCreateAlarmOptions
-
metric.with({ period: ...