@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-13T01:13:27.565Z") public interface NotificationRuleProps extends NotificationRuleOptions
Example:
import software.amazon.awscdk.services.codestarnotifications.*; import software.amazon.awscdk.services.codebuild.*; import software.amazon.awscdk.services.sns.*; import software.amazon.awscdk.services.chatbot.*; PipelineProject project = new PipelineProject(this, "MyProject"); Topic topic = new Topic(this, "MyTopic1"); SlackChannelConfiguration slack = SlackChannelConfiguration.Builder.create(this, "MySlackChannel") .slackChannelConfigurationName("YOUR_CHANNEL_NAME") .slackWorkspaceId("YOUR_SLACK_WORKSPACE_ID") .slackChannelId("YOUR_SLACK_CHANNEL_ID") .build(); NotificationRule rule = NotificationRule.Builder.create(this, "NotificationRule") .source(project) .events(List.of("codebuild-project-build-state-succeeded", "codebuild-project-build-state-failed")) .targets(List.of(topic)) .build(); rule.addTarget(slack);
Modifier and Type | Interface and Description |
---|---|
static class |
NotificationRuleProps.Builder
A builder for
NotificationRuleProps |
static class |
NotificationRuleProps.Jsii$Proxy
An implementation for
NotificationRuleProps |
Modifier and Type | Method and Description |
---|---|
static NotificationRuleProps.Builder |
builder() |
java.util.List<java.lang.String> |
getEvents()
A list of event types associated with this notification rule.
|
INotificationRuleSource |
getSource()
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.
|
default java.util.List<INotificationRuleTarget> |
getTargets()
The targets to register for the notification destination.
|
getDetailType, getEnabled, getNotificationRuleName
java.util.List<java.lang.String> getEvents()
For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.
https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#concepts-api
INotificationRuleSource getSource()
Currently, Supported sources include pipelines in AWS CodePipeline, build projects in AWS CodeBuild, and repositories in AWS CodeCommit in this L2 constructor.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestarnotifications-notificationrule.html#cfn-codestarnotifications-notificationrule-resource
default java.util.List<INotificationRuleTarget> getTargets()
Default: - No targets are added to the rule. Use `addTarget()` to add a target.
static NotificationRuleProps.Builder builder()
builder
in interface NotificationRuleOptions
NotificationRuleProps.Builder
of NotificationRuleProps