AWS::CodeStarNotifications::NotificationRuleCreates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as Amazon Simple Notification Service topics or clients configured for Slack) where you want to receive them.
import { CfnNotificationRule } from 'aws-cdk-lib/aws-codestarnotifications';Or use the module namespace:
import * as codestarnotifications from 'aws-cdk-lib/aws-codestarnotifications';
// codestarnotifications.CfnNotificationRuleConfiguration passed to the constructor as CfnNotificationRuleProps.
detailTypeRequiredstringThe 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 Amazon 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.
eventTypeIdsRequiredstring[]A list of event types associated with this notification rule. For a complete list of event types and IDs, see [Notification concepts](https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#concepts-api) in the *Developer Tools Console User Guide* .
nameRequiredstringThe name for the notification rule. Notification rule names must be unique in your AWS account .
resourceRequiredstringThe Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
targetsRequiredIResolvable | IResolvable | TargetProperty[]A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule.
createdByOptionalstringThe name or email alias of the person who created the notification rule.
eventTypeIdOptionalstringThe event type associated with this notification rule. For a complete list of event types and IDs, see [Notification concepts](https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#concepts-api) in the *Developer Tools Console User Guide* .
statusOptionalstringThe status of the notification rule. The default value is `ENABLED` . If the status is set to `DISABLED` , notifications aren't sent for the notification rule.
tagsOptional{ [key: string]: string }A list of tags to apply to this notification rule. Key names cannot start with " `aws` ".
targetAddressOptionalstringThe Amazon Resource Name (ARN) of the Amazon topic or client.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-codestarnotificationsAWS::CodeStarNotifications::NotificationRule