Interface MetricOptions

All Superinterfaces:
CommonMetricOptions, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
OperationsMetricOptions, SystemErrorsForOperationsMetricOptions
All Known Implementing Classes:
MetricOptions.Jsii$Proxy, OperationsMetricOptions.Jsii$Proxy, SystemErrorsForOperationsMetricOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:07.168Z") @Stability(Stable) public interface MetricOptions extends software.amazon.jsii.JsiiSerializable, CommonMetricOptions
Properties of a metric that can be changed.

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();