Class: AWSCDK::Codecommit::RepositoryNotifyOnOptions

Inherits:
AWSCDK::CodeStarNotifications::NotificationRuleOptions
  • Object
show all
Defined in:
codecommit/repository_notify_on_options.rb

Overview

Additional options to pass to the notification rule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil, events:) ⇒ RepositoryNotifyOnOptions

Returns a new instance of RepositoryNotifyOnOptions.

Parameters:

  • created_by (String, nil) (defaults to: nil)

    The name or email alias of the person who created the notification rule.

  • detail_type (AWSCDK::CodeStarNotifications::DetailType, nil) (defaults to: nil)

    The level of detail to include in the notifications for this resource.

  • enabled (Boolean, nil) (defaults to: nil)

    The status of the notification rule.

  • notification_rule_name (String, nil) (defaults to: nil)

    The name for the notification rule.

  • events (Array<AWSCDK::Codecommit::RepositoryNotificationEvents>)

    A list of event types associated with this notification rule for CodeCommit repositories.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'codecommit/repository_notify_on_options.rb', line 12

def initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil, events:)
  @created_by = created_by
  Jsii::Type.check_type(@created_by, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "createdBy") unless @created_by.nil?
  @detail_type = detail_type
  Jsii::Type.check_type(@detail_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLkRldGFpbFR5cGUifQ==")), "detailType") unless @detail_type.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil?
  @notification_rule_name = notification_rule_name
  Jsii::Type.check_type(@notification_rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notificationRuleName") unless @notification_rule_name.nil?
  @events = events
  Jsii::Type.check_type(@events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlY29tbWl0LlJlcG9zaXRvcnlOb3RpZmljYXRpb25FdmVudHMifSwia2luZCI6ImFycmF5In19")), "events")
end

Instance Attribute Details

#created_byString? (readonly)

Note:

Default: - No alias provided

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:

  • (String, nil)


31
32
33
# File 'codecommit/repository_notify_on_options.rb', line 31

def created_by
  @created_by
end

#detail_typeAWSCDK::CodeStarNotifications::DetailType? (readonly)

Note:

Default: DetailType.FULL

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.



39
40
41
# File 'codecommit/repository_notify_on_options.rb', line 39

def detail_type
  @detail_type
end

#enabledBoolean? (readonly)

Note:

Default: true

The status of the notification rule.

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

Returns:

  • (Boolean, nil)


46
47
48
# File 'codecommit/repository_notify_on_options.rb', line 46

def enabled
  @enabled
end

#eventsArray<AWSCDK::Codecommit::RepositoryNotificationEvents> (readonly)

A list of event types associated with this notification rule for CodeCommit repositories.

For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.



60
61
62
# File 'codecommit/repository_notify_on_options.rb', line 60

def events
  @events
end

#notification_rule_nameString? (readonly)

Note:

Default: - generated from the id

The name for the notification rule.

Notification rule names must be unique in your AWS account.

Returns:

  • (String, nil)


53
54
55
# File 'codecommit/repository_notify_on_options.rb', line 53

def notification_rule_name
  @notification_rule_name
end

Class Method Details

.jsii_propertiesObject



62
63
64
65
66
67
68
69
70
# File 'codecommit/repository_notify_on_options.rb', line 62

def self.jsii_properties
  {
    :created_by => "createdBy",
    :detail_type => "detailType",
    :enabled => "enabled",
    :notification_rule_name => "notificationRuleName",
    :events => "events",
  }
end

Instance Method Details

#to_jsiiObject



72
73
74
75
76
77
78
79
80
81
82
83
# File 'codecommit/repository_notify_on_options.rb', line 72

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "createdBy" => @created_by,
    "detailType" => @detail_type,
    "enabled" => @enabled,
    "notificationRuleName" => @notification_rule_name,
    "events" => @events,
  })
  result.compact
end