Class: AWSCDK::S3::CfnBucket::QueueConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event:, queue:, filter: nil) ⇒ QueueConfigurationProperty

Returns a new instance of QueueConfigurationProperty.

Parameters:

  • event (String)

    The Amazon S3 bucket event about which you want to publish messages to Amazon SQS.

  • queue (String)

    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.

  • filter (AWSCDK::IResolvable, AWSCDK::S3::CfnBucket::NotificationFilterProperty, nil) (defaults to: nil)

    The filtering rules that determine which objects trigger notifications.



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

#eventString (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

#filterAWSCDK::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

#queueString (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_propertiesObject



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_jsiiObject



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