# NoDataProperty

How the alert behaves when an evaluation returns no data.

If omitted, the alert reports NODATA.

- Source: Generated at build time
- Type last changed: v2.277.0 · 13 Nov 2026

## Example

TypeScript:

```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 noDataProperty: cloudwatch.CfnAlert.NoDataProperty = {
  treatAs: 'treatAs',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch

no_data_property = cloudwatch.CfnAlert.NoDataProperty(
    treat_as="treatAs"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;

NoDataProperty noDataProperty = NoDataProperty.builder()
        .treatAs("treatAs")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;

var noDataProperty = new NoDataProperty {
    TreatAs = "treatAs"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

noDataProperty := &NoDataProperty{
	TreatAs: jsii.String("treatAs"),
}
```

## Properties

- `treatAs`: string (required) — The state to report when an evaluation returns no data.

  Valid values: OK, WARNING, CRITICAL, NODATA.
