Class: AWSCDK::S3::CfnBucket::QueueConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::CfnBucket::QueueConfigurationProperty
- Defined in:
- s3/cfn_bucket.rb
Overview
Specifies the configuration for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon S3 detects specified events.
Instance Attribute Summary collapse
-
#event ⇒ String
readonly
The Amazon S3 bucket event about which you want to publish messages to Amazon SQS.
-
#filter ⇒ AWSCDK::IResolvable, ...
readonly
The filtering rules that determine which objects trigger notifications.
-
#queue ⇒ String
readonly
The Amazon Resource Name (ARN) of the Amazon SQS queue 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:, queue:, filter: nil) ⇒ QueueConfigurationProperty
constructor
A new instance of QueueConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(event:, queue:, filter: nil) ⇒ QueueConfigurationProperty
Returns a new instance of QueueConfigurationProperty.
3067 3068 3069 3070 3071 3072 3073 3074 |
# File 's3/cfn_bucket.rb', line 3067 def initialize(event:, queue:, filter: nil) @event = event Jsii::Type.check_type(@event, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "event") @queue = queue Jsii::Type.check_type(@queue, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queue") @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 you want to publish messages to Amazon SQS.
For more information, see Supported Event Types in the Amazon S3 User Guide .
3082 3083 3084 |
# File 's3/cfn_bucket.rb', line 3082 def event @event end |
#filter ⇒ AWSCDK::IResolvable, ... (readonly)
The filtering rules that determine which objects trigger 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. For more information, see Configuring event notifications using object key name filtering in the Amazon S3 User Guide .
3096 3097 3098 |
# File 's3/cfn_bucket.rb', line 3096 def filter @filter end |
#queue ⇒ String (readonly)
The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message when it detects events of the specified type.
FIFO queues are not allowed when enabling an SQS queue as the event notification destination.
3089 3090 3091 |
# File 's3/cfn_bucket.rb', line 3089 def queue @queue end |
Class Method Details
.jsii_properties ⇒ Object
3098 3099 3100 3101 3102 3103 3104 |
# File 's3/cfn_bucket.rb', line 3098 def self.jsii_properties { :event => "event", :queue => "queue", :filter => "filter", } end |
Instance Method Details
#to_jsii ⇒ Object
3106 3107 3108 3109 3110 3111 3112 3113 3114 |
# File 's3/cfn_bucket.rb', line 3106 def to_jsii result = {} result.merge!({ "event" => @event, "queue" => @queue, "filter" => @filter, }) result.compact end |