Skip to main content

AWS CodeStarNotifications Construct Library

---

cfn-resources: Stable

cfn-resources: Stable


This module is part of the AWS Cloud Development Kit project.

NotificationRule

The NotificationRule construct defines an AWS CodeStarNotifications rule. The rule specifies the events you want notifications about and the targets (such as Amazon SNS topics or AWS Chatbot clients configured for Slack) where you want to receive them. Notification targets are objects that implement the INotificationRuleTarget interface and notification source is object that implement the INotificationRuleSource interface.

Notification Targets

This module includes classes that implement the INotificationRuleTarget interface for SNS and slack in AWS Chatbot.

The following targets are supported:

  • SNS: specify event and notify to SNS topic.
  • AWS Chatbot: specify event and notify to slack channel and only support SlackChannelConfiguration.

Examples

import aws_cdk.aws_codestarnotifications as notifications
import aws_cdk.aws_codebuild as codebuild
import aws_cdk.aws_sns as sns
import aws_cdk.aws_chatbot as chatbot


project = codebuild.PipelineProject(self, "MyProject")

topic = sns.Topic(self, "MyTopic1")

slack = chatbot.SlackChannelConfiguration(self, "MySlackChannel",
    slack_channel_configuration_name="YOUR_CHANNEL_NAME",
    slack_workspace_id="YOUR_SLACK_WORKSPACE_ID",
    slack_channel_id="YOUR_SLACK_CHANNEL_ID"
)

rule = notifications.NotificationRule(self, "NotificationRule",
    source=project,
    events=["codebuild-project-build-state-succeeded", "codebuild-project-build-state-failed"
    ],
    targets=[topic]
)
rule.add_target(slack)

Notification Source

This module includes classes that implement the INotificationRuleSource interface for AWS CodeBuild, AWS CodePipeline and will support AWS CodeCommit, AWS CodeDeploy in future.

The following sources are supported:

  • AWS CodeBuild: support codebuild project to trigger notification when event specified.
  • AWS CodePipeline: support codepipeline to trigger notification when event specified.

Events

For the complete list of supported event types for CodeBuild and CodePipeline, see:

Metadata

Release files for aws-cdk.aws-codestarnotifications 1.194.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-cdk.aws-codestarnotifications 1.194.0
File Size Uploaded Provenance Actions
aws-cdk.aws-codestarnotifications-1.194.0.tar.gz 57.6 kB Without provenance Details for aws-cdk.aws-codestarnotifications-1.194.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aws-cdk.aws-codestarnotifications 1.194.0
File Interpreter ABI Platform Actions
aws_cdk.aws_codestarnotifications-1.194.0-py3-none-any.whl Python 3 none any Details for aws_cdk.aws_codestarnotifications-1.194.0-py3-none-any.whl

Total release size: 114.2 kB

Release files / aws-cdk.aws-codestarnotifications-1.194.0.tar.gz

Download URL aws-cdk.aws-codestarnotifications-1.194.0.tar.gz
Size 57.6 kB
Tags Source
SHA-256 checksum
How to use checksums
55a8f0feb99438750f8ae88c34f15a225e7c7b437f91fa5e88f0b348278e5b72
BLAKE2b-256 checksum
How to use checksums
ad87621232ae314dbe20236d877a6738cfe72e3441d2662b804be37047cdb3b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / aws_cdk.aws_codestarnotifications-1.194.0-py3-none-any.whl

Download URL aws_cdk.aws_codestarnotifications-1.194.0-py3-none-any.whl
Size 56.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
414ae5b9df8473df4735b5822159d1b10ac6021cb0edc6500c6db15e9fd4f3e5
BLAKE2b-256 checksum
How to use checksums
0e5d29f087e428d68f86a1afe34bc8a370be9e0c53c9713c5f2fb8f23b5d4a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for aws-cdk.aws-codestarnotifications 1.194.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.194.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page