# IMetric

Interface for metrics.

Implemented by: [MathExpression](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.MathExpression.html), [Metric](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Metric.html), [SearchExpression](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.SearchExpression.html)
Used as argument in: [GaugeWidget.addMetric](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.GaugeWidget.html#addmetric), [GraphWidget.addLeftMetric](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.GraphWidget.html#addleftmetric), GraphWidget.addRightMetric, TableWidget.addMetric
Returned by: [ITable.metricSystemErrorsForOperations](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.ITable.html#metricsystemerrorsforoperations), ITable.metricThrottledRequestsForOperations, TableBaseV2.metricThrottledRequestsForOperation

- Source: [`aws-cloudwatch/lib/metric-types.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cloudwatch/lib/metric-types.ts#L6)
- Type last changed: v2.93.0 · 23 Aug 2023

## Properties

- `warnings`: string[] = None — - use warningsV2

  Should be attached to the consuming construct.

- `warningsV2`: { [key: string]: string } = None — Any warnings related to this metric.

  Should be attached to the consuming construct.

## Methods

- `toMetricConfig(): MetricConfig` — Inspect the details of the metric object.
