# CfnMetricProps

Properties for defining a `CfnMetric`.

Extends: CfnMetricProps
Used as props by: CfnMetric

- Source: Generated code
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_connect as connect } from 'aws-cdk-lib';
const cfnMetricProps: connect.CfnMetricProps = {
  instanceArn: 'instanceArn',
  metricCalculation: {
    calculation: 'calculation',
    calculationComponents: [{
      alias: 'alias',

      // the properties below are optional
      metricFilters: [{
        metricFilterKey: 'metricFilterKey',

        // the properties below are optional
        booleanCondition: {
          comparison: 'comparison',
        },
        negate: false,
        numberCondition: {
          comparison: 'comparison',
          values: [123],
        },
        stringCondition: {
          comparison: 'comparison',
          values: ['values'],
        },
      }],
      metricId: 'metricId',
      metricName: 'metricName',
    }],
  },
  name: 'name',
  status: 'status',
  unit: 'unit',

  // the properties below are optional
  description: 'description',
  positiveTrendIndicator: 'positiveTrendIndicator',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `description`: string — The description of the custom metric.

- `instanceArn`: string (required) — The identifier of the Amazon Connect instance.

- `metricCalculation`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMetric.MetricCalculationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_connect.CfnMetric.MetricCalculationProperty.html) (required) — The calculation configuration for the metric.

- `name`: string (required) — The name of the custom metric.

- `positiveTrendIndicator`: string — Indicates how to classify a positive trend in metric data on the UI.

- `status`: string (required) — The status of the custom metric.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — One or more tags.

- `unit`: string (required) — Display unit for the metric data.
