Interface CommonMetricOptions

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:58.497Z") @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.*;
 import software.amazon.awscdk.services.cloudwatch.*;
 CommonMetricOptions commonMetricOptions = CommonMetricOptions.builder()
         .account("account")
         .color("color")
         .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

    • 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.

      Use the aws_cloudwatch.Stats helper class to construct valid input strings.

      Can be one of the following:

      • "Minimum" | "min"
      • "Maximum" | "max"
      • "Average" | "avg"
      • "Sum" | "sum"
      • "SampleCount | "n"
      • "pNN.NN"
      • "tmNN.NN" | "tm(NN.NN%:NN.NN%)"
      • "iqm"
      • "wmNN.NN" | "wm(NN.NN%:NN.NN%)"
      • "tcNN.NN" | "tc(NN.NN%:NN.NN%)"
      • "tsNN.NN" | "ts(NN.NN%:NN.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