@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:51.312Z") @Stability(value=Stable) public enum Statistic extends Enum<Statistic>
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();
| Enum Constant and Description |
|---|
AVERAGE
The value of Sum / SampleCount during the specified period.
|
MAXIMUM
The highest value observed during the specified period.
|
MINIMUM
The lowest value observed during the specified period.
|
SAMPLE_COUNT
The count (number) of data points used for the statistical calculation.
|
SUM
All values submitted for the matching metric added together.
|
| Modifier and Type | Method and Description |
|---|---|
static Statistic |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Statistic[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final Statistic SAMPLE_COUNT
@Stability(value=Stable) public static final Statistic AVERAGE
@Stability(value=Stable) public static final Statistic SUM
This statistic can be useful for determining the total volume of a metric.
@Stability(value=Stable) public static final Statistic MINIMUM
You can use this value to determine low volumes of activity for your application.
@Stability(value=Stable) public static final Statistic MAXIMUM
You can use this value to determine high volumes of activity for your application.
public static Statistic[] values()
for (Statistic c : Statistic.values()) System.out.println(c);
public static Statistic valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2023. All rights reserved.