Interface CommonMetricOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
MetricOptions, MetricProps, SystemErrorsForOperationsMetricOptions
All Known Implementing Classes:
CommonMetricOptions.Jsii$Proxy, MetricOptions.Jsii$Proxy, MetricProps.Jsii$Proxy, SystemErrorsForOperationsMetricOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:36.850Z") @Stability(Stable) public interface CommonMetricOptions extends software.amazon.jsii.JsiiSerializable
Options shared by most methods accepting metric options.

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 dimensions;
 CommonMetricOptions commonMetricOptions = CommonMetricOptions.builder()
         .account("account")
         .color("color")
         .dimensions(Map.of(
                 "dimensionsKey", dimensions))
         .dimensionsMap(Map.of(
                 "dimensionsMapKey", "dimensionsMap"))
         .label("label")
         .period(Duration.minutes(30))
         .region("region")
         .statistic("statistic")
         .unit(Unit.SECONDS)
         .build();
 
  • Method Details

    • getAccount

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

      Default: - Deployment account.

    • getColor

      @Stability(Stable) @Nullable default String getColor()
      The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here.

      Default: - Automatic color

    • getDimensions

      @Stability(Deprecated) @Deprecated @Nullable default Map<String,Object> getDimensions()
      Deprecated.
      Use 'dimensionsMap' instead.
      (deprecated) Dimensions of the metric.

      Default: - No dimensions.

    • getDimensionsMap

      @Stability(Stable) @Nullable default Map<String,String> getDimensionsMap()
      Dimensions of the metric.

      Default: - No dimensions.

    • getLabel

      @Stability(Stable) @Nullable default String getLabel()
      Label for this metric when added to a Graph in a Dashboard.

      You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:

       [max: ${MAX}] MyMetric
       

      As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend.

      Default: - No label

    • getPeriod

      @Stability(Stable) @Nullable default Duration getPeriod()
      The period over which the specified statistic is applied.

      Default: Duration.minutes(5)

    • getRegion

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

      Default: - Deployment region.

    • getStatistic

      @Stability(Stable) @Nullable default String getStatistic()
      What function to use for aggregating.

      Can be one of the following:

      • "Minimum" | "min"
      • "Maximum" | "max"
      • "Average" | "avg"
      • "Sum" | "sum"
      • "SampleCount | "n"
      • "pNN.NN"

      Default: Average

    • getUnit

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

      The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases.

      CloudWatch does not honor this property for graphs.

      Default: - All metric datums in the given metric stream

    • builder

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