public static final class NotificationRule.Builder
extends java.lang.Object
NotificationRule
.Modifier and Type | Method and Description |
---|---|
NotificationRule |
build() |
static NotificationRule.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
NotificationRule.Builder |
detailType(DetailType detailType)
The level of detail to include in the notifications for this resource.
|
NotificationRule.Builder |
enabled(java.lang.Boolean enabled)
The status of the notification rule.
|
NotificationRule.Builder |
events(java.util.List<java.lang.String> events)
A list of event types associated with this notification rule.
|
NotificationRule.Builder |
notificationRuleName(java.lang.String notificationRuleName)
The name for the notification rule.
|
NotificationRule.Builder |
source(INotificationRuleSource source)
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.
|
NotificationRule.Builder |
targets(java.util.List<? extends INotificationRuleTarget> targets)
The targets to register for the notification destination.
|
public static NotificationRule.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.NotificationRule.Builder
.public NotificationRule.Builder detailType(DetailType detailType)
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.
Default: DetailType.FULL
detailType
- The level of detail to include in the notifications for this resource. This parameter is required.this
public NotificationRule.Builder enabled(java.lang.Boolean enabled)
If the enabled is set to DISABLED, notifications aren't sent for the notification rule.
Default: true
enabled
- The status of the notification rule. This parameter is required.this
public NotificationRule.Builder notificationRuleName(java.lang.String notificationRuleName)
Notification rule names must be unique in your AWS account.
Default: - generated from the `id`
notificationRuleName
- The name for the notification rule. This parameter is required.this
public NotificationRule.Builder events(java.util.List<java.lang.String> events)
For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.
events
- A list of event types associated with this notification rule. This parameter is required.this
public NotificationRule.Builder source(INotificationRuleSource source)
Currently, Supported sources include pipelines in AWS CodePipeline, build projects in AWS CodeBuild, and repositories in AWS CodeCommit in this L2 constructor.
source
- The Amazon Resource Name (ARN) of the resource to associate with the notification rule. This parameter is required.this
public NotificationRule.Builder targets(java.util.List<? extends INotificationRuleTarget> targets)
Default: - No targets are added to the rule. Use `addTarget()` to add a target.
targets
- The targets to register for the notification destination. This parameter is required.this
public NotificationRule build()