Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLambdaDestination_Override ¶
func NewLambdaDestination_Override(l LambdaDestination, fn awslambda.IFunction)
Experimental.
func NewSnsDestination_Override ¶
func NewSnsDestination_Override(s SnsDestination, topic awssns.ITopic)
Experimental.
func NewSqsDestination_Override ¶
func NewSqsDestination_Override(s SqsDestination, queue awssqs.IQueue)
Experimental.
Types ¶
type LambdaDestination ¶
type LambdaDestination interface {
awss3.IBucketNotificationDestination
// 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.
// Experimental.
Bind(_scope awscdk.Construct, bucket awss3.IBucket) *awss3.BucketNotificationDestinationConfig
}
Use a Lambda function as a bucket notification destination.
Example:
var myLambda function
bucket := s3.bucket.fromBucketAttributes(this, jsii.String("ImportedBucket"), &bucketAttributes{
bucketArn: jsii.String("arn:aws:s3:::my-bucket"),
})
// now you can just call methods on the bucket
bucket.addEventNotification(s3.eventType_OBJECT_CREATED, s3n.NewLambdaDestination(myLambda), ¬ificationKeyFilter{
prefix: jsii.String("home/myusername/*"),
})
Experimental.
func NewLambdaDestination ¶
func NewLambdaDestination(fn awslambda.IFunction) LambdaDestination
Experimental.
type SnsDestination ¶
type SnsDestination interface {
awss3.IBucketNotificationDestination
// 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.
// Experimental.
Bind(_scope awscdk.Construct, bucket awss3.IBucket) *awss3.BucketNotificationDestinationConfig
}
Use an SNS topic as a bucket notification destination.
Example:
bucket := s3.NewBucket(this, jsii.String("MyBucket"))
topic := sns.NewTopic(this, jsii.String("MyTopic"))
bucket.addEventNotification(s3.eventType_OBJECT_CREATED, s3n.NewSnsDestination(topic))
Experimental.
type SqsDestination ¶
type SqsDestination interface {
awss3.IBucketNotificationDestination
// Allows using SQS queues as destinations for bucket notifications.
//
// Use `bucket.onEvent(event, queue)` to subscribe.
// Experimental.
Bind(_scope awscdk.Construct, bucket awss3.IBucket) *awss3.BucketNotificationDestinationConfig
}
Use an SQS queue as a bucket notification destination.
Example:
var myQueue queue
bucket := s3.NewBucket(this, jsii.String("MyBucket"))
bucket.addEventNotification(s3.eventType_OBJECT_REMOVED,
s3n.NewSqsDestination(myQueue), ¬ificationKeyFilter{
prefix: jsii.String("foo/"),
suffix: jsii.String(".jpg"),
})
Experimental.
Click to show internal directories.
Click to hide internal directories.