Interface MetricStatConfig
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
MetricStatConfig.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:36.901Z")
@Stability(Stable)
public interface MetricStatConfig
extends software.amazon.jsii.JsiiSerializable
Properties for a concrete metric.
NOTE: unit
is no longer on this object since it is only used for Alarms
, and doesn't mean what one
would expect it to mean there anyway. It is most likely to be misused.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.cloudwatch.*; import software.amazon.awscdk.core.*; Object value; MetricStatConfig metricStatConfig = MetricStatConfig.builder() .metricName("metricName") .namespace("namespace") .period(Duration.minutes(30)) .statistic("statistic") // the properties below are optional .account("account") .dimensions(List.of(Dimension.builder() .name("name") .value(value) .build())) .region("region") .unitFilter(Unit.SECONDS) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forMetricStatConfig
static final class
An implementation forMetricStatConfig
-
Method Summary
Modifier and TypeMethodDescriptionstatic MetricStatConfig.Builder
builder()
default String
Account which this metric comes from.The dimensions to apply to the alarm.Name of the metric.Namespace of the metric.How many seconds to aggregate over.default String
Region which this metric comes from.Aggregation function to use (can be either simple or a percentile).default Unit
Unit used to filter the metric stream.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMetricName
Name of the metric. -
getNamespace
Namespace of the metric. -
getPeriod
How many seconds to aggregate over. -
getStatistic
Aggregation function to use (can be either simple or a percentile). -
getAccount
Account which this metric comes from.Default: Deployment account.
-
getDimensions
The dimensions to apply to the alarm.Default: []
-
getRegion
Region which this metric comes from.Default: Deployment region.
-
getUnitFilter
Unit used to filter the metric stream.Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units.
This field has been renamed from plain
unit
to clearly communicate its purpose.Default: - Refer to all metric datums
-
builder
- Returns:
- a
MetricStatConfig.Builder
ofMetricStatConfig
-