Class: AWSCDK::CodeStarNotifications::NotificationRuleProps
- Inherits:
-
NotificationRuleOptions
- Object
- NotificationRuleOptions
- AWSCDK::CodeStarNotifications::NotificationRuleProps
- Defined in:
- code_star_notifications/notification_rule_props.rb
Overview
Properties for a new notification rule.
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.
-
#events ⇒ Array<String>
readonly
A list of event types associated with this notification rule.
-
#notification_rule_name ⇒ String?
readonly
The name for the notification rule.
-
#source ⇒ AWSCDK::CodeStarNotifications::INotificationRuleSource
readonly
The Amazon Resource Name (ARN) of the resource to associate with the notification rule.
-
#targets ⇒ Array<AWSCDK::CodeStarNotifications::INotificationRuleTarget>?
readonly
The targets to register for the notification destination.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil, events:, source:, targets: nil) ⇒ NotificationRuleProps
constructor
A new instance of NotificationRuleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil, events:, source:, targets: nil) ⇒ NotificationRuleProps
Returns a new instance of NotificationRuleProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'code_star_notifications/notification_rule_props.rb', line 14 def initialize(created_by: nil, detail_type: nil, enabled: nil, notification_rule_name: nil, events:, source:, targets: 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? @events = events Jsii::Type.check_type(@events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "events") @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZXN0YXJub3RpZmljYXRpb25zLklOb3RpZmljYXRpb25SdWxlU291cmNlIn0=")), "source") @targets = targets Jsii::Type.check_type(@targets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2Rlc3Rhcm5vdGlmaWNhdGlvbnMuSU5vdGlmaWNhdGlvblJ1bGVUYXJnZXQifSwia2luZCI6ImFycmF5In19")), "targets") unless @targets.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.
37 38 39 |
# File 'code_star_notifications/notification_rule_props.rb', line 37 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.
45 46 47 |
# File 'code_star_notifications/notification_rule_props.rb', line 45 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.
52 53 54 |
# File 'code_star_notifications/notification_rule_props.rb', line 52 def enabled @enabled end |
#events ⇒ Array<String> (readonly)
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.
66 67 68 |
# File 'code_star_notifications/notification_rule_props.rb', line 66 def events @events 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.
59 60 61 |
# File 'code_star_notifications/notification_rule_props.rb', line 59 def notification_rule_name @notification_rule_name end |
#source ⇒ AWSCDK::CodeStarNotifications::INotificationRuleSource (readonly)
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.
73 74 75 |
# File 'code_star_notifications/notification_rule_props.rb', line 73 def source @source end |
#targets ⇒ Array<AWSCDK::CodeStarNotifications::INotificationRuleTarget>? (readonly)
Default: - No targets are added to the rule. Use addTarget() to add a target.
The targets to register for the notification destination.
78 79 80 |
# File 'code_star_notifications/notification_rule_props.rb', line 78 def targets @targets end |
Class Method Details
.jsii_properties ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 |
# File 'code_star_notifications/notification_rule_props.rb', line 80 def self.jsii_properties { :created_by => "createdBy", :detail_type => "detailType", :enabled => "enabled", :notification_rule_name => "notificationRuleName", :events => "events", :source => "source", :targets => "targets", } end |
Instance Method Details
#to_jsii ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'code_star_notifications/notification_rule_props.rb', line 92 def to_jsii result = {} result.merge!(super) result.merge!({ "createdBy" => @created_by, "detailType" => @detail_type, "enabled" => @enabled, "notificationRuleName" => @notification_rule_name, "events" => @events, "source" => @source, "targets" => @targets, }) result.compact end |