# TriggerProperty

The alert states that trigger the notification rule.

- 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 triggerProperty: cloudwatch.CfnAlert.TriggerProperty = {
  stateValues: ['stateValues'],
};
```

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

trigger_property = cloudwatch.CfnAlert.TriggerProperty(
    state_values=["stateValues"]
)
```

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.*;

TriggerProperty triggerProperty = TriggerProperty.builder()
        .stateValues(List.of("stateValues"))
        .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 triggerProperty = new TriggerProperty {
    StateValues = new [] { "stateValues" }
};
```

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"

triggerProperty := &TriggerProperty{
	StateValues: []*string{
		jsii.String("stateValues"),
	},
}
```

## Properties

- `stateValues`: string[] — The alert states that trigger this rule.

  A notification is sent when the alert enters any listed state. If omitted or empty, every state triggers the rule.
