@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:04.182Z") @Stability(value=Experimental) public interface AlarmProps extends software.amazon.jsii.JsiiSerializable, CreateAlarmOptions
Example:
import software.amazon.awscdk.core.*;
DeliveryStream deliveryStream;
// Alarm that triggers when the per-second average of incoming bytes exceeds 90% of the current service limit
MathExpression incomingBytesPercentOfLimit = MathExpression.Builder.create()
.expression("incomingBytes / 300 / bytePerSecLimit")
.usingMetrics(Map.of(
"incomingBytes", deliveryStream.metricIncomingBytes(MetricOptions.builder().statistic(Statistic.SUM).build()),
"bytePerSecLimit", deliveryStream.metric("BytesPerSecondLimit")))
.build();
Alarm.Builder.create(this, "Alarm")
.metric(incomingBytesPercentOfLimit)
.threshold(0.9)
.evaluationPeriods(3)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
AlarmProps.Builder
A builder for
AlarmProps |
static class |
AlarmProps.Jsii$Proxy
An implementation for
AlarmProps |
| Modifier and Type | Method and Description |
|---|---|
static AlarmProps.Builder |
builder() |
IMetric |
getMetric()
(experimental) The metric to add the alarm on.
|
getActionsEnabled, getAlarmDescription, getAlarmName, getComparisonOperator, getDatapointsToAlarm, getEvaluateLowSampleCountPercentile, getEvaluationPeriods, getPeriod, getStatistic, getThreshold, getTreatMissingData@Stability(value=Experimental) @NotNull IMetric getMetric()
Metric objects can be obtained from most resources, or you can construct custom Metric objects by instantiating one.
@Stability(value=Experimental) static AlarmProps.Builder builder()
builder in interface CreateAlarmOptionsAlarmProps.Builder of AlarmPropsCopyright © 2022. All rights reserved.