Class DynamoEventSource
Use an Amazon DynamoDB stream as an event source for AWS Lambda.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DynamoEventSource : StreamEventSource, IEventSource
Syntax (vb)
Public Class DynamoEventSource
Inherits StreamEventSource
Implements IEventSource
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda.EventSources;
using Amazon.CDK.AWS.DynamoDB;
Function fn;
var table = new Table(this, "Table", new TableProps {
PartitionKey = new Attribute {
Name = "id",
Type = AttributeType.STRING
},
Stream = StreamViewType.NEW_IMAGE
});
fn.AddEventSource(new DynamoEventSource(table, new DynamoEventSourceProps {
StartingPosition = StartingPosition.LATEST,
Filters = new [] { FilterCriteria.Filter(new Dictionary<string, object> { { "eventName", FilterRule.IsEqual("INSERT") } }) }
}));
Synopsis
Constructors
DynamoEventSource(ITable, IDynamoEventSourceProps) | |
DynamoEventSource(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DynamoEventSource(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
EventSourceMappingArn | The ARN for this EventSourceMapping. |
EventSourceMappingId | The identifier for this EventSourceMapping. |
Methods
Bind(IFunction) | Called by |
Constructors
DynamoEventSource(ITable, IDynamoEventSourceProps)
public DynamoEventSource(ITable table, IDynamoEventSourceProps props)
Parameters
- table ITable
- props IDynamoEventSourceProps
DynamoEventSource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DynamoEventSource(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DynamoEventSource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DynamoEventSource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
EventSourceMappingArn
The ARN for this EventSourceMapping.
public virtual string EventSourceMappingArn { get; }
Property Value
System.String
EventSourceMappingId
The identifier for this EventSourceMapping.
public virtual string EventSourceMappingId { get; }
Property Value
System.String
Methods
Bind(IFunction)
Called by lambda.addEventSource
to allow the event source to bind to this function.
public override void Bind(IFunction target)
Parameters
- target IFunction