Skip to content
v2.275.0

MetricExpressionConfig Struct ​

Properties for a concrete metric.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';

declare const metric: cloudwatch.Metric;
const metricExpressionConfig: cloudwatch.MetricExpressionConfig = {
  expression: 'expression',
  period: 123,
  usingMetrics: {
    usingMetricsKey: metric,
  },

  // the properties below are optional
  searchAccount: 'searchAccount',
  searchRegion: 'searchRegion',
};

Properties ​

expressionstringexpressionstrexpressionStringExpressionstringExpression*stringrequired#
Math expression for the metric.
periodnumberperiodint | floatperiodNumberPerioddoublePeriod*float64required#
How many seconds to aggregate over.
searchAccountoptionalstringsearch_accountoptionalstrsearchAccountoptionalStringSearchAccountoptionalstringSearchAccountoptional*string#
Account to evaluate search expressions within.

Default: Deployment account.

searchRegionoptionalstringsearch_regionoptionalstrsearchRegionoptionalStringSearchRegionoptionalstringSearchRegionoptional*string#
Region to evaluate search expressions within.

Default: Deployment region.

usingMetrics{ [key: string]: IMetric }using_metricstyping.Mapping[str, IMetric]usingMetricsMap<String, IMetric>UsingMetricsIDictionary<string, IMetric>UsingMetrics*map[string]IMetricrequired#
Metrics used in the math expression.