@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:59.875Z") public class DynamoEventSource extends StreamEventSource
Example:
import software.amazon.awscdk.services.dynamodb.*; import software.amazon.awscdk.services.lambda.eventsources.DynamoEventSource; import software.amazon.awscdk.services.lambda.eventsources.SqsDlq; Table table; Function fn; Queue deadLetterQueue = new Queue(this, "deadLetterQueue"); fn.addEventSource(DynamoEventSource.Builder.create(table) .startingPosition(StartingPosition.TRIM_HORIZON) .batchSize(5) .bisectBatchOnError(true) .onFailure(new SqsDlq(deadLetterQueue)) .retryAttempts(10) .build());
Modifier and Type | Class and Description |
---|---|
static class |
DynamoEventSource.Builder
A fluent builder for
DynamoEventSource . |
IEventSource.Jsii$Default
Modifier | Constructor and Description |
---|---|
|
DynamoEventSource(ITable table,
DynamoEventSourceProps props) |
protected |
DynamoEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DynamoEventSource(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
void |
bind(IFunction target)
Called by `lambda.addEventSource` to allow the event source to bind to this function.
|
java.lang.String |
getEventSourceMappingId()
The identifier for this EventSourceMapping.
|
enrichMappingOptions, getProps
protected DynamoEventSource(software.amazon.jsii.JsiiObjectRef objRef)
protected DynamoEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public DynamoEventSource(ITable table, DynamoEventSourceProps props)
table
- This parameter is required.props
- This parameter is required.public void bind(IFunction target)
bind
in interface IEventSource
bind
in class StreamEventSource
target
- This parameter is required.public java.lang.String getEventSourceMappingId()