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.104.0 (build e79254c)",
date="2024-11-22T02:23:58.530Z")
@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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forMetricOptions
static final class
An implementation forMetricOptions
-
Method Summary
Methods inherited from interface software.amazon.awscdk.services.cloudwatch.CommonMetricOptions
getAccount, getColor, getDimensionsMap, getLabel, getPeriod, getRegion, getStatistic, getUnit
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
builder
- Returns:
- a
MetricOptions.Builder
ofMetricOptions
-