Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-cdk/aws-codestarnotifications

Package Overview
Dependencies
Maintainers
5
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-codestarnotifications

The CDK Construct Library for AWS::CodeStarNotifications

  • 1.159.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
100K
decreased by-5.62%
Maintainers
5
Weekly downloads
 
Created
Source

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 * as notifications from '@aws-cdk/aws-codestarnotifications';
import * as codebuild from '@aws-cdk/aws-codebuild';
import * as sns from '@aws-cdk/aws-sns';
import * as chatbot from '@aws-cdk/aws-chatbot';

const project = new codebuild.PipelineProject(this, 'MyProject');

const topic = new sns.Topic(this, 'MyTopic1');

const slack = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', {
  slackChannelConfigurationName: 'YOUR_CHANNEL_NAME',
  slackWorkspaceId: 'YOUR_SLACK_WORKSPACE_ID',
  slackChannelId: 'YOUR_SLACK_CHANNEL_ID',
});

const rule = new notifications.NotificationRule(this, 'NotificationRule', {
  source: project,
  events: [
    'codebuild-project-build-state-succeeded',
    'codebuild-project-build-state-failed',
  ],
  targets: [topic],
});
rule.addTarget(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:

Keywords

FAQs

Package last updated on 03 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc