Class NotificationRuleProps.Builder
java.lang.Object
software.amazon.awscdk.services.codestarnotifications.NotificationRuleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<NotificationRuleProps>
- Enclosing interface:
NotificationRuleProps
@Stability(Stable)
public static final class NotificationRuleProps.Builder
extends Object
implements software.amazon.jsii.Builder<NotificationRuleProps>
A builder for
NotificationRuleProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofNotificationRuleOptions.getCreatedBy()
detailType
(DetailType detailType) Sets the value ofNotificationRuleOptions.getDetailType()
Sets the value ofNotificationRuleOptions.getEnabled()
Sets the value ofNotificationRuleProps.getEvents()
notificationRuleName
(String notificationRuleName) Sets the value ofNotificationRuleOptions.getNotificationRuleName()
source
(INotificationRuleSource source) Sets the value ofNotificationRuleProps.getSource()
targets
(List<? extends INotificationRuleTarget> targets) Sets the value ofNotificationRuleProps.getTargets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
events
Sets the value ofNotificationRuleProps.getEvents()
- Parameters:
events
- A list of event types associated with this notification rule. This parameter is required. For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.- Returns:
this
-
source
Sets the value ofNotificationRuleProps.getSource()
- Parameters:
source
- The Amazon Resource Name (ARN) of the resource to associate with the notification rule. This parameter is required. Currently, Supported sources include pipelines in AWS CodePipeline, build projects in AWS CodeBuild, and repositories in AWS CodeCommit in this L2 constructor.- Returns:
this
-
targets
@Stability(Stable) public NotificationRuleProps.Builder targets(List<? extends INotificationRuleTarget> targets) Sets the value ofNotificationRuleProps.getTargets()
- Parameters:
targets
- The targets to register for the notification destination.- Returns:
this
-
createdBy
Sets the value ofNotificationRuleOptions.getCreatedBy()
- Parameters:
createdBy
- The name or email alias of the person who created the notification rule. If not specified, it means that the creator's alias is not provided.- Returns:
this
-
detailType
Sets the value ofNotificationRuleOptions.getDetailType()
- Parameters:
detailType
- The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.- Returns:
this
-
enabled
Sets the value ofNotificationRuleOptions.getEnabled()
- Parameters:
enabled
- The status of the notification rule. If the enabled is set to DISABLED, notifications aren't sent for the notification rule.- Returns:
this
-
notificationRuleName
@Stability(Stable) public NotificationRuleProps.Builder notificationRuleName(String notificationRuleName) Sets the value ofNotificationRuleOptions.getNotificationRuleName()
- Parameters:
notificationRuleName
- The name for the notification rule. Notification rule names must be unique in your AWS account.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<NotificationRuleProps>
- Returns:
- a new instance of
NotificationRuleProps
- Throws:
NullPointerException
- if any required attribute was not provided
-