Class: AWSCDK::CodeStarNotifications::NotificationRuleOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeStarNotifications::NotificationRuleOptions
- Defined in:
- code_star_notifications/notification_rule_options.rb
Overview
Standard set of options for notifyOnXxx codestar notification handler on construct.
Direct Known Subclasses
AWSCDK::CodeBuild::ProjectNotifyOnOptions, NotificationRuleProps, AWSCDK::Codecommit::RepositoryNotifyOnOptions, AWSCDK::Codepipeline::PipelineNotifyOnOptions
Instance Attribute Summary collapse
-
#created_by ⇒ String?
readonly
The name or email alias of the person who created the notification rule.
-
#detail_type ⇒ AWSCDK::CodeStarNotifications::DetailType?
readonly
The level of detail to include in the notifications for this resource.
-
#enabled ⇒ Boolean?
readonly
The status of the notification rule.
-
#notification_rule_name ⇒ String?
readonly
The name for the notification rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil) ⇒ NotificationRuleOptions
constructor
A new instance of NotificationRuleOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil) ⇒ NotificationRuleOptions
Returns a new instance of NotificationRuleOptions.
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_by ⇒ String? (readonly)
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.
28 29 30 |
# File 'code_star_notifications/notification_rule_options.rb', line 28 def created_by @created_by end |
#detail_type ⇒ AWSCDK::CodeStarNotifications::DetailType? (readonly)
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 |
#enabled ⇒ Boolean? (readonly)
Default: true
The status of the notification rule.
If the enabled is set to DISABLED, notifications aren't sent for the notification rule.
43 44 45 |
# File 'code_star_notifications/notification_rule_options.rb', line 43 def enabled @enabled end |
#notification_rule_name ⇒ String? (readonly)
Default: - generated from the id
The name for the notification rule.
Notification rule names must be unique in your AWS account.
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_properties ⇒ Object
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_jsii ⇒ Object
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 |