@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:04.299Z") @Stability(value=Experimental) public enum Statistic extends Enum<Statistic>
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();
| Enum Constant and Description |
|---|
AVERAGE
(experimental) The value of Sum / SampleCount during the specified period.
|
MAXIMUM
(experimental) The highest value observed during the specified period.
|
MINIMUM
(experimental) The lowest value observed during the specified period.
|
SAMPLE_COUNT
(experimental) The count (number) of data points used for the statistical calculation.
|
SUM
(experimental) 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=Experimental) public static final Statistic SAMPLE_COUNT
@Stability(value=Experimental) public static final Statistic AVERAGE
@Stability(value=Experimental) public static final Statistic SUM
This statistic can be useful for determining the total volume of a metric.
@Stability(value=Experimental) public static final Statistic MINIMUM
You can use this value to determine low volumes of activity for your application.
@Stability(value=Experimental) 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 © 2022. All rights reserved.