Class: AWSCDK::S3::CfnBucket::LambdaConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::LambdaConfigurationProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
Describes the AWS Lambda functions to invoke and the events for which to invoke them.
Instance Attribute Summary collapse
-
#event ⇒ String
readonly
The Amazon S3 bucket event for which to invoke the AWS Lambda function.
-
#filter ⇒ AWSCDK::IResolvable, ...
readonly
The filtering rules that determine which objects invoke the AWS Lambda function.
-
#function ⇒ String
readonly
The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(event:, function:, filter: nil) ⇒ LambdaConfigurationProperty
constructor
A new instance of LambdaConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event:, function:, filter: nil) ⇒ LambdaConfigurationProperty
Returns a new instance of LambdaConfigurationProperty.
2083 2084 2085 2086 2087 2088 2089 2090 |
# File 's3/cfn_bucket.rb', line 2083 def initialize(event:, function:, filter: nil) @event = event Jsii::Type.check_type(@event, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "event") @function = function Jsii::Type.check_type(@function, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "function") @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 for which to invoke the AWS Lambda function.
For more information, see Supported Event Types in the Amazon S3 User Guide .
2098 2099 2100 |
# File 's3/cfn_bucket.rb', line 2098 def event @event end |
#filter ⇒ AWSCDK::IResolvable, ... (readonly)
The filtering rules that determine which objects invoke the AWS Lambda function.
For example, you can create a filter so that only image files with a .jpg extension invoke the function when they are added to the Amazon S3 bucket.
2110 2111 2112 |
# File 's3/cfn_bucket.rb', line 2110 def filter @filter end |
#function ⇒ String (readonly)
The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3 invokes when the specified event type occurs.
2103 2104 2105 |
# File 's3/cfn_bucket.rb', line 2103 def function @function end |
Class Method Details
.jsii_properties ⇒ Object
2112 2113 2114 2115 2116 2117 2118 |
# File 's3/cfn_bucket.rb', line 2112 def self.jsii_properties { :event => "event", :function => "function", :filter => "filter", } end |
Instance Method Details
#to_jsii ⇒ Object
2120 2121 2122 2123 2124 2125 2126 2127 2128 |
# File 's3/cfn_bucket.rb', line 2120 def to_jsii result = {} result.merge!({ "event" => @event, "function" => @function, "filter" => @filter, }) result.compact end |