Enum Class StartingPosition
- All Implemented Interfaces:
Serializable
,Comparable<StartingPosition>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-11-02T10:21:19.864Z")
@Stability(Stable)
public enum StartingPosition
extends Enum<StartingPosition>
The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.
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());
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStart reading from a position defined by a time stamp.Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard. -
Method Summary
Modifier and TypeMethodDescriptionstatic StartingPosition
Returns the enum constant of this class with the specified name.static StartingPosition[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TRIM_HORIZON
Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard. -
LATEST
Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard. -
AT_TIMESTAMP
Start reading from a position defined by a time stamp.Only supported for Amazon Kinesis streams, otherwise an error will occur. If supplied,
startingPositionTimestamp
must also be set.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-