# RuleProperty

The rule that defines how the alert is evaluated.

- 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 ruleProperty: cloudwatch.CfnAlert.RuleProperty = {
  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',
    },
  },
};
```

## Properties

- `telemetryRule`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlert.TelemetryRuleProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnAlert.TelemetryRuleProperty.html) (required) — A rule that queries telemetry, evaluates the result against a condition, and sets how missing data is handled.
