# ConditionProperty

The thresholds that set the alert's state.

Specify at least one of WarningThreshold and CriticalThreshold.

- 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 conditionProperty: cloudwatch.CfnAlert.ConditionProperty = {
  comparator: 'comparator',
  criticalThreshold: 123,
  thresholdField: 'thresholdField',
  thresholdMode: 'thresholdMode',
  warningThreshold: 123,
};
```

## Properties

- `comparator`: string — The comparison operator.

  Valid values: GT, GTE, LT, LTE (greater than, greater than or equal to, less than, less than or equal to).

- `criticalThreshold`: number — The value at which the alert enters the CRITICAL state.

- `thresholdField`: string — The result field to compare against the threshold.

  Required when ThresholdMode is FIELD_VALUE.

- `thresholdMode`: string — How the threshold is applied.

  COUNT_OF_RESULTS compares the number of rows the query returns. FIELD_VALUE compares the value of ThresholdField in each result row; each row is tracked separately.

- `warningThreshold`: number — The value at which the alert enters the WARNING state.
