Class: AWSCDK::LambdaEventSources::S3EventSourceProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::LambdaEventSources::S3EventSourceProps
- Defined in:
- lambda_event_sources/s3_event_source_props.rb
Instance Attribute Summary collapse
-
#events ⇒ Array<AWSCDK::S3::EventType>
readonly
The s3 event types that will trigger the notification.
-
#filters ⇒ Array<AWSCDK::S3::NotificationKeyFilter>?
readonly
S3 object key filter rules to determine which objects trigger this event.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(events:, filters: nil) ⇒ S3EventSourceProps
constructor
A new instance of S3EventSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(events:, filters: nil) ⇒ S3EventSourceProps
Returns a new instance of S3EventSourceProps.
8 9 10 11 12 13 |
# File 'lambda_event_sources/s3_event_source_props.rb', line 8 def initialize(events:, filters: nil) @events = events Jsii::Type.check_type(@events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5FdmVudFR5cGUifSwia2luZCI6ImFycmF5In19")), "events") @filters = filters.is_a?(Array) ? filters.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::S3::NotificationKeyFilter.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : filters Jsii::Type.check_type(@filters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zMy5Ob3RpZmljYXRpb25LZXlGaWx0ZXIifSwia2luZCI6ImFycmF5In19")), "filters") unless @filters.nil? end |
Instance Attribute Details
#events ⇒ Array<AWSCDK::S3::EventType> (readonly)
The s3 event types that will trigger the notification.
18 19 20 |
# File 'lambda_event_sources/s3_event_source_props.rb', line 18 def events @events end |
#filters ⇒ Array<AWSCDK::S3::NotificationKeyFilter>? (readonly)
S3 object key filter rules to determine which objects trigger this event.
Each filter must include a prefix and/or suffix that will be matched
against the s3 object key. Refer to the S3 Developer Guide for details
about allowed filter rules.
26 27 28 |
# File 'lambda_event_sources/s3_event_source_props.rb', line 26 def filters @filters end |
Class Method Details
.jsii_properties ⇒ Object
28 29 30 31 32 33 |
# File 'lambda_event_sources/s3_event_source_props.rb', line 28 def self.jsii_properties { :events => "events", :filters => "filters", } end |
Instance Method Details
#to_jsii ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lambda_event_sources/s3_event_source_props.rb', line 35 def to_jsii result = {} result.merge!({ "events" => @events, "filters" => @filters, }) result.compact end |