Class SnsDestination
Use an SNS topic as a bucket notification destination.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.S3.Notifications
Assembly: Amazon.CDK.AWS.S3.Notifications.dll
Syntax (csharp)
public class SnsDestination : DeputyBase, IBucketNotificationDestination
Syntax (vb)
Public Class SnsDestination
Inherits DeputyBase
Implements IBucketNotificationDestination
Remarks
ExampleMetadata: infused
Examples
var bucket = new Bucket(this, "MyBucket");
var topic = new Topic(this, "MyTopic");
bucket.AddEventNotification(EventType.OBJECT_CREATED, new SnsDestination(topic));
Synopsis
Constructors
SnsDestination(ITopic) | |
SnsDestination(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SnsDestination(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IBucket) | Registers this resource to receive notifications for the specified bucket. |
Constructors
SnsDestination(ITopic)
SnsDestination(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SnsDestination(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SnsDestination(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SnsDestination(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IBucket)
Registers this resource to receive notifications for the specified bucket.
public virtual IBucketNotificationDestinationConfig Bind(Construct scope, IBucket bucket)
Parameters
Returns
IBucketNotificationDestinationConfig
Remarks
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.