# CfnAlertProps

Properties for defining a `CfnAlert`.

Extends: CfnAlertProps
Used as props by: CfnAlert

- Source: Generated code
- Type last changed: v2.277.0 · 13 Nov 2026

## 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';
const cfnAlertProps: cloudwatch.CfnAlertProps = {
  name: 'name',
  profileId: 'profileId',
  rule: {
    telemetryRule: {
      condition: {
        comparator: 'comparator',
        criticalThreshold: 123,
        thresholdField: 'thresholdField',
        thresholdMode: 'thresholdMode',
        warningThreshold: 123,
      },
      evaluation: {
        intervalSeconds: 123,

        // the properties below are optional
        pendingDurationSeconds: 123,
        recoveryDurationSeconds: 123,
      },
      query: {
        expression: 'expression',
        language: 'language',
      },

      // the properties below are optional
      noData: {
        treatAs: 'treatAs',
      },
    },
  },
  spaceId: 'spaceId',

  // the properties below are optional
  description: 'description',
  notificationRules: [{
    target: {
      arn: 'arn',
      type: 'type',

      // the properties below are optional
      metadata: {
        metadataKey: 'metadata',
      },
    },
    trigger: {
      stateValues: ['stateValues'],
    },
  }],
  notificationsEnabled: false,
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `description`: string — A description of the alert.

- `name`: string (required) — The display name of the alert.

  Names don't need to be unique within a space; the alert is identified by AlertId.

- `notificationRules`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlert.NotificationRuleProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnAlert.NotificationRuleProperty.html)[] — The notification rules that determine when and where notifications are sent.

- `notificationsEnabled`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether the alert sends notifications.

  When false, the alert is still evaluated and records its state, but sends nothing. Defaults to true.

- `profileId`: string (required) — The ID of the access profile the alert uses to run its query and send notifications.

- `rule`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlert.RuleProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnAlert.RuleProperty.html) (required) — The rule that defines how the alert is evaluated.

- `spaceId`: string (required) — The ID of the space to create the alert in.

  Changing this value replaces the alert.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.
