aws-cdk-lib.aws_cloudwatch.MetricExpressionConfig

interface MetricExpressionConfig

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.MetricExpressionConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#MetricExpressionConfig
Javasoftware.amazon.awscdk.services.cloudwatch.MetricExpressionConfig
Pythonaws_cdk.aws_cloudwatch.MetricExpressionConfig
TypeScript (source)aws-cdk-lib » aws_cloudwatch » MetricExpressionConfig

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 { 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

NameTypeDescription
expressionstringMath expression for the metric.
periodnumberHow many seconds to aggregate over.
usingMetrics{ [string]: IMetric }Metrics used in the math expression.
searchAccount?stringAccount to evaluate search expressions within.
searchRegion?stringRegion to evaluate search expressions within.

expression

Type: string

Math expression for the metric.


period

Type: number

How many seconds to aggregate over.


usingMetrics

Type: { [string]: IMetric }

Metrics used in the math expression.


searchAccount?

Type: string (optional, default: Deployment account.)

Account to evaluate search expressions within.


searchRegion?

Type: string (optional, default: Deployment region.)

Region to evaluate search expressions within.