Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLambdaDestination_Override ¶
func NewLambdaDestination_Override(l LambdaDestination, fn awslambda.IFunction)
func NewSnsDestination_Override ¶
func NewSnsDestination_Override(s SnsDestination, topic awssns.ITopic)
func NewSqsDestination_Override ¶
func NewSqsDestination_Override(s SqsDestination, queue awssqs.IQueue)
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.
Bind(scope constructs.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:::amzn-s3-demo-bucket"),
})
// now you can just call methods on the bucket
bucket.AddEventNotification(s3.EventType_OBJECT_CREATED, s3n.NewLambdaDestination(myLambda), &NotificationKeyFilter{
Prefix: jsii.String("home/myusername/*"),
})
func NewLambdaDestination ¶
func NewLambdaDestination(fn awslambda.IFunction) LambdaDestination
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.
Bind(scope constructs.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))
func NewSnsDestination ¶
func NewSnsDestination(topic awssns.ITopic) SnsDestination
type SqsDestination ¶
type SqsDestination interface {
awss3.IBucketNotificationDestination
// Allows using SQS queues as destinations for bucket notifications.
//
// Use `bucket.onEvent(event, queue)` to subscribe.
Bind(_scope constructs.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"), &BucketProps{
NotificationsSkipDestinationValidation: jsii.Boolean(true),
})
bucket.AddEventNotification(s3.EventType_OBJECT_REMOVED, s3n.NewSqsDestination(myQueue))
func NewSqsDestination ¶
func NewSqsDestination(queue awssqs.IQueue) SqsDestination
Source Files
¶
Click to show internal directories.
Click to hide internal directories.