AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::CodeStarNotifications::NotificationRule

CfnNotificationRule

Creates 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

import { CfnNotificationRule } from 'aws-cdk-lib/aws-codestarnotifications';

Or use the module namespace:

import * as codestarnotifications from 'aws-cdk-lib/aws-codestarnotifications';
// codestarnotifications.CfnNotificationRule

Properties

Configuration passed to the constructor as CfnNotificationRuleProps.

detailTypeRequired
string

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

eventTypeIdsRequired
string[]

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

nameRequired
string

The name for the notification rule. Notification rule names must be unique in your AWS account .

resourceRequired
string

The 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 .

targetsRequired
IResolvable | IResolvable | TargetProperty[]

A list of Amazon Resource Names (ARNs) of Amazon topics and clients to associate with the notification rule.

createdByOptional
string

The name or email alias of the person who created the notification rule.

eventTypeIdOptional
string

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

statusOptional
string

The 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` ".

targetAddressOptional
string

The Amazon Resource Name (ARN) of the Amazon topic or client.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-codestarnotifications
CFN TypeAWS::CodeStarNotifications::NotificationRule
Properties10

Related Constructs

External Links