# NotificationRuleOptions

Standard set of options for `notifyOnXxx` codestar notification handler on construct.

- Source: [`aws-codestarnotifications/lib/notification-rule.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-codestarnotifications/lib/notification-rule.ts#L29)
- Type last changed: v2.149.0 · 12 Jul 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codestarnotifications as codestarnotifications } from 'aws-cdk-lib';
const notificationRuleOptions: codestarnotifications.NotificationRuleOptions = {
  createdBy: 'createdBy',
  detailType: codestarnotifications.DetailType.BASIC,
  enabled: false,
  notificationRuleName: 'notificationRuleName',
};
```

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_codestarnotifications as codestarnotifications

notification_rule_options = codestarnotifications.NotificationRuleOptions(
    created_by="createdBy",
    detail_type=codestarnotifications.DetailType.BASIC,
    enabled=False,
    notification_rule_name="notificationRuleName"
)
```

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

NotificationRuleOptions notificationRuleOptions = NotificationRuleOptions.builder()
        .createdBy("createdBy")
        .detailType(DetailType.BASIC)
        .enabled(false)
        .notificationRuleName("notificationRuleName")
        .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.CodeStarNotifications;

var notificationRuleOptions = new NotificationRuleOptions {
    CreatedBy = "createdBy",
    DetailType = DetailType.BASIC,
    Enabled = false,
    NotificationRuleName = "notificationRuleName"
};
```

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"

notificationRuleOptions := &NotificationRuleOptions{
	CreatedBy: jsii.String("createdBy"),
	DetailType: awscdk.Aws_codestarnotifications.DetailType_BASIC,
	Enabled: jsii.Boolean(false),
	NotificationRuleName: jsii.String("notificationRuleName"),
}
```

## Properties

- `createdBy`: string — The name or email alias of the person who created the notification rule.

  **Default:** No alias provided

  If not specified, it means that the creator's alias is not provided.

- `detailType`: [DetailType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codestarnotifications.DetailType.html) = DetailType.FULL — The level of detail to include in the notifications for this resource.

  BASIC will include only the contents of the event as it would appear in AWS CloudWatch.
  FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.

- `enabled`: boolean = true — The status of the notification rule.

  If the enabled is set to DISABLED, notifications aren't sent for the notification rule.

- `notificationRuleName`: string — The name for the notification rule.

  **Default:** generated from the `id`

  Notification rule names must be unique in your AWS account.
