Class S3EventSourceProps
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class S3EventSourceProps : Object, IS3EventSourceProps
Syntax (vb)
Public Class S3EventSourceProps
Inherits Object
Implements IS3EventSourceProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.Lambda.EventSources;
Function fn;
var bucket = new Bucket(this, "mybucket");
fn.AddEventSource(new S3EventSource(bucket, new S3EventSourceProps {
Events = new [] { EventType.OBJECT_CREATED, EventType.OBJECT_REMOVED },
Filters = new [] { new NotificationKeyFilter { Prefix = "subdir/" } }
}));
Synopsis
Constructors
S3Event |
Properties
Events | The s3 event types that will trigger the notification. |
Filters | S3 object key filter rules to determine which objects trigger this event. |
Constructors
S3EventSourceProps()
public S3EventSourceProps()
Properties
Events
The s3 event types that will trigger the notification.
public EventType[] Events { get; set; }
Property Value
Filters
S3 object key filter rules to determine which objects trigger this event.
public INotificationKeyFilter[] Filters { get; set; }
Property Value
Remarks
Each filter must include a prefix
and/or suffix
that will be matched
against the s3 object key. Refer to the S3 Developer Guide for details
about allowed filter rules.