Class NotificationRule.Builder

java.lang.Object
software.amazon.awscdk.services.codestarnotifications.NotificationRule.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<NotificationRule>
Enclosing class:
NotificationRule

@Stability(Stable) public static final class NotificationRule.Builder extends Object implements software.amazon.jsii.Builder<NotificationRule>
A fluent builder for NotificationRule.
  • Method Details

    • create

      @Stability(Stable) public static NotificationRule.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of NotificationRule.Builder.
    • createdBy

      @Stability(Stable) public NotificationRule.Builder createdBy(String 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.

      Default: - No alias provided

      Parameters:
      createdBy - The name or email alias of the person who created the notification rule. This parameter is required.
      Returns:
      this
    • detailType

      @Stability(Stable) public NotificationRule.Builder detailType(DetailType 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.

      Default: DetailType.FULL

      Parameters:
      detailType - The level of detail to include in the notifications for this resource. This parameter is required.
      Returns:
      this
    • enabled

      @Stability(Stable) public NotificationRule.Builder enabled(Boolean enabled)
      The status of the notification rule.

      If the enabled is set to DISABLED, notifications aren't sent for the notification rule.

      Default: true

      Parameters:
      enabled - The status of the notification rule. This parameter is required.
      Returns:
      this
    • notificationRuleName

      @Stability(Stable) public NotificationRule.Builder notificationRuleName(String notificationRuleName)
      The name for the notification rule.

      Notification rule names must be unique in your AWS account.

      Default: - generated from the `id`

      Parameters:
      notificationRuleName - The name for the notification rule. This parameter is required.
      Returns:
      this
    • events

      @Stability(Stable) public NotificationRule.Builder events(List<String> events)
      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.

      Parameters:
      events - A list of event types associated with this notification rule. This parameter is required.
      Returns:
      this
      See Also:
    • source

      @Stability(Stable) public NotificationRule.Builder source(INotificationRuleSource source)
      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.

      Parameters:
      source - The Amazon Resource Name (ARN) of the resource to associate with the notification rule. This parameter is required.
      Returns:
      this
      See Also:
    • targets

      @Stability(Stable) public NotificationRule.Builder targets(List<? extends INotificationRuleTarget> targets)
      The targets to register for the notification destination.

      Default: - No targets are added to the rule. Use `addTarget()` to add a target.

      Parameters:
      targets - The targets to register for the notification destination. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public NotificationRule build()
      Specified by:
      build in interface software.amazon.jsii.Builder<NotificationRule>
      Returns:
      a newly built instance of NotificationRule.