Interface MetricExpressionConfig

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:58.530Z") @Stability(Stable) public interface MetricExpressionConfig extends software.amazon.jsii.JsiiSerializable
Properties for a concrete 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.services.cloudwatch.*;
 Metric metric;
 MetricExpressionConfig metricExpressionConfig = MetricExpressionConfig.builder()
         .expression("expression")
         .period(123)
         .usingMetrics(Map.of(
                 "usingMetricsKey", metric))
         // the properties below are optional
         .searchAccount("searchAccount")
         .searchRegion("searchRegion")
         .build();
 
  • Method Details

    • getExpression

      @Stability(Stable) @NotNull String getExpression()
      Math expression for the metric.
    • getPeriod

      @Stability(Stable) @NotNull Number getPeriod()
      How many seconds to aggregate over.
    • getUsingMetrics

      @Stability(Stable) @NotNull Map<String,IMetric> getUsingMetrics()
      Metrics used in the math expression.
    • getSearchAccount

      @Stability(Stable) @Nullable default String getSearchAccount()
      Account to evaluate search expressions within.

      Default: - Deployment account.

    • getSearchRegion

      @Stability(Stable) @Nullable default String getSearchRegion()
      Region to evaluate search expressions within.

      Default: - Deployment region.

    • builder

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