Class: AWSCDK::S3Notifications::SNSDestination
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::S3Notifications::SNSDestination
- Includes:
- AWSCDK::S3::IBucketNotificationDestination
- Defined in:
- s3_notifications/sns_destination.rb
Overview
Use an SNS topic as a bucket notification destination.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(scope, bucket) ⇒ AWSCDK::S3::BucketNotificationDestinationConfig
Registers this resource to receive notifications for the specified bucket.
-
#initialize(topic) ⇒ SNSDestination
constructor
A new instance of SNSDestination.
Constructor Details
#initialize(topic) ⇒ SNSDestination
Returns a new instance of SNSDestination.
10 11 12 13 |
# File 's3_notifications/sns_destination.rb', line 10 def initialize(topic) Jsii::Type.check_type(topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "topic") Jsii::Object.instance_method(:initialize).bind(self).call(topic) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
15 16 17 18 19 |
# File 's3_notifications/sns_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
Registers this resource to receive notifications for the specified bucket.
This method will only be called once for each destination/bucket pair and the result will be cached, so there is no need to implement idempotency in each destination.
30 31 32 33 34 |
# File 's3_notifications/sns_destination.rb', line 30 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 |