Interface NotificationRuleProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,NotificationRuleOptions
- All Known Implementing Classes:
NotificationRuleProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:59.034Z")
@Stability(Stable)
public interface NotificationRuleProps
extends software.amazon.jsii.JsiiSerializable, NotificationRuleOptions
Properties for a new notification rule.
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)) .notificationRuleName("MyNotificationRuleName") .enabled(true) // The default is true .detailType(DetailType.FULL) // The default is FULL .createdBy("Jone Doe") .build(); rule.addTarget(slack);
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forNotificationRuleProps
static final class
An implementation forNotificationRuleProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
A list of event types associated with this notification rule.The Amazon Resource Name (ARN) of the resource to associate with the notification rule.default List<INotificationRuleTarget>
The targets to register for the notification destination.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.codestarnotifications.NotificationRuleOptions
getCreatedBy, getDetailType, getEnabled, getNotificationRuleName
-
Method Details
-
getEvents
A list of event types associated with this notification rule.For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.
- See Also:
-
getSource
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.Currently, Supported sources include pipelines in AWS CodePipeline, build projects in AWS CodeBuild, and repositories in AWS CodeCommit in this L2 constructor.
- See Also:
-
getTargets
The targets to register for the notification destination.Default: - No targets are added to the rule. Use `addTarget()` to add a target.
-
builder
- Returns:
- a
NotificationRuleProps.Builder
ofNotificationRuleProps
-