Class: AWSCDK::CodeStarNotifications::NotificationRuleOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_star_notifications/notification_rule_options.rb

Overview

Standard set of options for notifyOnXxx codestar notification handler on construct.

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) ⇒ NotificationRuleOptions

Returns a new instance of NotificationRuleOptions.

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.



11
12
13
14
15
16
17
18
19
20
# File 'code_star_notifications/notification_rule_options.rb', line 11

def initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil)
  @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?
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)


28
29
30
# File 'code_star_notifications/notification_rule_options.rb', line 28

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.



36
37
38
# File 'code_star_notifications/notification_rule_options.rb', line 36

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)


43
44
45
# File 'code_star_notifications/notification_rule_options.rb', line 43

def enabled
  @enabled
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)


50
51
52
# File 'code_star_notifications/notification_rule_options.rb', line 50

def notification_rule_name
  @notification_rule_name
end

Class Method Details

.jsii_propertiesObject



52
53
54
55
56
57
58
59
# File 'code_star_notifications/notification_rule_options.rb', line 52

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

Instance Method Details

#to_jsiiObject



61
62
63
64
65
66
67
68
69
70
# File 'code_star_notifications/notification_rule_options.rb', line 61

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