@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-22T10:27:16.352Z") @Stability(value=Stable) public interface AlarmProps extends software.amazon.jsii.JsiiSerializable, CreateAlarmOptions
Example:
import software.amazon.awscdk.services.cloudwatch.*;
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()
The metric to add the alarm on.
|
getActionsEnabled, getAlarmDescription, getAlarmName, getComparisonOperator, getDatapointsToAlarm, getEvaluateLowSampleCountPercentile, getEvaluationPeriods, getThreshold, getTreatMissingData@Stability(value=Stable) @NotNull IMetric getMetric()
Metric objects can be obtained from most resources, or you can construct custom Metric objects by instantiating one.
@Stability(value=Stable) static AlarmProps.Builder builder()
builder in interface CreateAlarmOptionsAlarmProps.Builder of AlarmPropsCopyright © 2021. All rights reserved.