Class: AWSCDK::S3Notifications::SQSDestination

Inherits:
Jsii::Object
  • Object
show all
Includes:
AWSCDK::S3::IBucketNotificationDestination
Defined in:
s3_notifications/sqs_destination.rb

Overview

Use an SQS queue as a bucket notification destination.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(queue) ⇒ SQSDestination

Returns a new instance of SQSDestination.

Parameters:



10
11
12
13
# File 's3_notifications/sqs_destination.rb', line 10

def initialize(queue)
  Jsii::Type.check_type(queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "queue")
  Jsii::Object.instance_method(:initialize).bind(self).call(queue)
end

Class Method Details

.jsii_overridable_methodsObject



15
16
17
18
19
# File 's3_notifications/sqs_destination.rb', line 15

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(_scope, bucket) ⇒ AWSCDK::S3::BucketNotificationDestinationConfig

Allows using SQS queues as destinations for bucket notifications.

Use bucket.onEvent(event, queue) to subscribe.

Parameters:

Returns:



28
29
30
31
32
# File 's3_notifications/sqs_destination.rb', line 28

def bind(_scope, bucket)
  Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope")
  Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zMy5JQnVja2V0UmVmIn0=")), "bucket")
  jsii_call_method("bind", [_scope, bucket])
end