Class: AWSCDK::S3::CfnBucket::TopicConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::TopicConfigurationProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.
Instance Attribute Summary collapse
-
#event ⇒ String
readonly
The Amazon S3 bucket event about which to send notifications.
-
#filter ⇒ AWSCDK::IResolvable, ...
readonly
The filtering rules that determine for which objects to send notifications.
-
#topic ⇒ String
readonly
The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event:, topic:, filter: nil) ⇒ TopicConfigurationProperty
constructor
A new instance of TopicConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event:, topic:, filter: nil) ⇒ TopicConfigurationProperty
Returns a new instance of TopicConfigurationProperty.
4615 4616 4617 4618 4619 4620 4621 4622 |
# File 's3/cfn_bucket.rb', line 4615 def initialize(event:, topic:, filter: nil) @event = event Jsii::Type.check_type(@event, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "event") @topic = topic Jsii::Type.check_type(@topic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topic") @filter = filter.is_a?(Hash) ? ::AWSCDK::S3::CfnBucket::NotificationFilterProperty.new(**filter.transform_keys(&:to_sym)) : filter Jsii::Type.check_type(@filter, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5DZm5CdWNrZXQuTm90aWZpY2F0aW9uRmlsdGVyUHJvcGVydHkifV19fQ==")), "filter") unless @filter.nil? end |
Instance Attribute Details
#event ⇒ String (readonly)
The Amazon S3 bucket event about which to send notifications.
For more information, see Supported Event Types in the Amazon S3 User Guide .
4630 4631 4632 |
# File 's3/cfn_bucket.rb', line 4630 def event @event end |
#filter ⇒ AWSCDK::IResolvable, ... (readonly)
The filtering rules that determine for which objects to send notifications.
For example, you can create a filter so that Amazon S3 sends notifications only when image files with a .jpg extension are added to the bucket.
4642 4643 4644 |
# File 's3/cfn_bucket.rb', line 4642 def filter @filter end |
#topic ⇒ String (readonly)
The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.
4635 4636 4637 |
# File 's3/cfn_bucket.rb', line 4635 def topic @topic end |
Class Method Details
.jsii_properties ⇒ Object
4644 4645 4646 4647 4648 4649 4650 |
# File 's3/cfn_bucket.rb', line 4644 def self.jsii_properties { :event => "event", :topic => "topic", :filter => "filter", } end |
Instance Method Details
#to_jsii ⇒ Object
4652 4653 4654 4655 4656 4657 4658 4659 4660 |
# File 's3/cfn_bucket.rb', line 4652 def to_jsii result = {} result.merge!({ "event" => @event, "topic" => @topic, "filter" => @filter, }) result.compact end |