Skip to main content

The CDK Construct Library for AWS::CodeStarNotifications

Project description

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:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-cdk.aws-codestarnotifications-1.151.0.tar.gz (54.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file aws-cdk.aws-codestarnotifications-1.151.0.tar.gz.

File metadata

  • Download URL: aws-cdk.aws-codestarnotifications-1.151.0.tar.gz
  • Upload date:
  • Size: 54.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for aws-cdk.aws-codestarnotifications-1.151.0.tar.gz
Algorithm Hash digest
SHA256 9a53641c15e4d33c16de493d6428db6bdb5525a85f1ce247f95734f91dd330cd
MD5 1f9b9e1414a1ca9cac268ac0b53face1
BLAKE2b-256 76b353761016548d4ba7f68578a55c4434290927cc4d00d88e9fa9777244f713

See more details on using hashes here.

File details

Details for the file aws_cdk.aws_codestarnotifications-1.151.0-py3-none-any.whl.

File metadata

  • Download URL: aws_cdk.aws_codestarnotifications-1.151.0-py3-none-any.whl
  • Upload date:
  • Size: 53.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for aws_cdk.aws_codestarnotifications-1.151.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1aadf18a792ee067115fc19e37ce7c3c9fb87c0cdb2800c96f2d48e74991629b
MD5 90d1fb20f8f8d6cc1ed3a27fd3fd9647
BLAKE2b-256 111a2873468337f82bee2d8ca545ade8c42ba36ac1ae670de3d054087c9cf382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page