Socket
Socket
Sign inDemoInstall

@aws-cdk/aws-codestarnotifications

Package Overview
Dependencies
Maintainers
4
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


Version published
Weekly downloads
118K
increased by26.46%
Maintainers
4
Weekly downloads
 
Created

What is @aws-cdk/aws-codestarnotifications?

@aws-cdk/aws-codestarnotifications is an AWS CDK library that allows you to create and manage AWS CodeStar Notifications. This package helps you set up notifications for various AWS Code services like CodeBuild, CodePipeline, and CodeCommit, enabling you to receive alerts on different events such as build failures, pipeline state changes, and repository updates.

What are @aws-cdk/aws-codestarnotifications's main functionalities?

Create Notification Rule for CodeBuild

{"TypeScript":"import * as cdk from '@aws-cdk/core';\nimport * as codestarnotifications from '@aws-cdk/aws-codestarnotifications';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(app, 'MyStack');\n\nconst project = new codebuild.PipelineProject(stack, 'MyProject');\n\nnew codestarnotifications.NotificationRule(stack, 'MyNotificationRule', {\n  source: project,\n  events: [\n    'codebuild-project-build-state-succeeded',\n    'codebuild-project-build-state-failed'\n  ],\n  targets: [\n    new codestarnotifications.SlackChannelConfiguration(stack, 'MySlackChannel', {\n      slackChannelConfigurationName: 'my-slack-channel',\n      slackWorkspaceId: 'T00000000',\n      slackChannelId: 'C00000000'\n    })\n  ]\n});","description":"This code sample demonstrates how to create a notification rule for an AWS CodeBuild project. The rule triggers notifications for build state changes (succeeded or failed) and sends them to a specified Slack channel."}

Create Notification Rule for CodePipeline

{"TypeScript":"import * as cdk from '@aws-cdk/core';\nimport * as codestarnotifications from '@aws-cdk/aws-codestarnotifications';\nimport * as codepipeline from '@aws-cdk/aws-codepipeline';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(app, 'MyStack');\n\nconst pipeline = new codepipeline.Pipeline(stack, 'MyPipeline');\n\nnew codestarnotifications.NotificationRule(stack, 'MyNotificationRule', {\n  source: pipeline,\n  events: [\n    'codepipeline-pipeline-pipeline-execution-failed',\n    'codepipeline-pipeline-pipeline-execution-succeeded'\n  ],\n  targets: [\n    new codestarnotifications.SlackChannelConfiguration(stack, 'MySlackChannel', {\n      slackChannelConfigurationName: 'my-slack-channel',\n      slackWorkspaceId: 'T00000000',\n      slackChannelId: 'C00000000'\n    })\n  ]\n});","description":"This code sample demonstrates how to create a notification rule for an AWS CodePipeline. The rule triggers notifications for pipeline execution state changes (succeeded or failed) and sends them to a specified Slack channel."}

Create Notification Rule for CodeCommit

{"TypeScript":"import * as cdk from '@aws-cdk/core';\nimport * as codestarnotifications from '@aws-cdk/aws-codestarnotifications';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(app, 'MyStack');\n\nconst repository = new codecommit.Repository(stack, 'MyRepository', {\n  repositoryName: 'my-repo'\n});\n\nnew codestarnotifications.NotificationRule(stack, 'MyNotificationRule', {\n  source: repository,\n  events: [\n    'codecommit-repository-comments-on-commits',\n    'codecommit-repository-pull-request-created'\n  ],\n  targets: [\n    new codestarnotifications.SlackChannelConfiguration(stack, 'MySlackChannel', {\n      slackChannelConfigurationName: 'my-slack-channel',\n      slackWorkspaceId: 'T00000000',\n      slackChannelId: 'C00000000'\n    })\n  ]\n});","description":"This code sample demonstrates how to create a notification rule for an AWS CodeCommit repository. The rule triggers notifications for events such as comments on commits and pull request creation, and sends them to a specified Slack channel."}

Other packages similar to @aws-cdk/aws-codestarnotifications

Keywords

FAQs

Package last updated on 14 Mar 2023

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