Interface MetricConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
MetricConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:04.088Z") @Stability(Stable) public interface MetricConfig extends software.amazon.jsii.JsiiSerializable
Properties of a rendered metric.

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.*;
 Metric metric;
 Object renderingProperties;
 Object value;
 MetricConfig metricConfig = MetricConfig.builder()
         .mathExpression(MetricExpressionConfig.builder()
                 .expression("expression")
                 .period(123)
                 .usingMetrics(Map.of(
                         "usingMetricsKey", metric))
                 // the properties below are optional
                 .searchAccount("searchAccount")
                 .searchRegion("searchRegion")
                 .build())
         .metricStat(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())
         .renderingProperties(Map.of(
                 "renderingPropertiesKey", renderingProperties))
         .build();
 
  • Method Details

    • getMathExpression

      @Stability(Stable) @Nullable default MetricExpressionConfig getMathExpression()
      In case the metric is a math expression, the details of the math expression.

      Default: - None

    • getMetricStat

      @Stability(Stable) @Nullable default MetricStatConfig getMetricStat()
      In case the metric represents a query, the details of the query.

      Default: - None

    • getRenderingProperties

      @Stability(Stable) @Nullable default Map<String,Object> getRenderingProperties()
      Additional properties which will be rendered if the metric is used in a dashboard.

      Examples are 'label' and 'color', but any key in here will be added to dashboard graphs.

      Default: - None

    • builder

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