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();
 
  • Method Details

    • getMetricName

      @Stability(Stable) @NotNull String getMetricName()
      Name of the metric.
    • getNamespace

      @Stability(Stable) @NotNull String getNamespace()
      Namespace of the metric.
    • getPeriod

      @Stability(Stable) @NotNull Duration getPeriod()
      How many seconds to aggregate over.
    • getStatistic

      @Stability(Stable) @NotNull String getStatistic()
      Aggregation function to use (can be either simple or a percentile).
    • getAccount

      @Stability(Stable) @Nullable default String getAccount()
      Account which this metric comes from.

      Default: Deployment account.

    • getDimensions

      @Stability(Stable) @Nullable default List<Dimension> getDimensions()
      The dimensions to apply to the alarm.

      Default: []

    • getRegion

      @Stability(Stable) @Nullable default String getRegion()
      Region which this metric comes from.

      Default: Deployment region.

    • getUnitFilter

      @Stability(Stable) @Nullable default Unit 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

      @Stability(Stable) static MetricStatConfig.Builder builder()
      Returns:
      a MetricStatConfig.Builder of MetricStatConfig