Class DynamoDbDataChangeEvent
Represents a data change event captured from DynamoDB Streams.
public sealed class DynamoDbDataChangeEvent
- Inheritance
-
DynamoDbDataChangeEvent
- Inherited Members
Properties
ChangeType
Gets the type of change (Insert, Modify, Remove).
public DynamoDbDataChangeType ChangeType { get; init; }
Property Value
EventId
Gets the unique event identifier.
public string? EventId { get; init; }
Property Value
Keys
Gets the key attributes of the item.
public Dictionary<string, AttributeValue> Keys { get; init; }
Property Value
- Dictionary<string, AttributeValue>
NewImage
Gets the item as it appeared after the modification (NewImage).
public Dictionary<string, AttributeValue>? NewImage { get; init; }
Property Value
- Dictionary<string, AttributeValue>
Remarks
Available for Insert and Modify events when stream view type includes NewImage.
OldImage
Gets the item as it appeared before the modification (OldImage).
public Dictionary<string, AttributeValue>? OldImage { get; init; }
Property Value
- Dictionary<string, AttributeValue>
Remarks
Available for Modify and Remove events when stream view type includes OldImage.
Position
Gets the position of this change in the stream.
public DynamoDbCdcPosition Position { get; init; }
Property Value
SequenceNumber
Gets the sequence number within the shard.
public string SequenceNumber { get; init; }
Property Value
ShardId
Gets the shard ID this change came from.
public string ShardId { get; init; }
Property Value
Timestamp
Gets the approximate timestamp when the change occurred.
public DateTimeOffset Timestamp { get; init; }
Property Value
Methods
CreateInsert(DynamoDbCdcPosition, string, string, Dictionary<string, AttributeValue>, Dictionary<string, AttributeValue>?, DateTimeOffset, string?)
Creates a new instance for an insert event.
public static DynamoDbDataChangeEvent CreateInsert(DynamoDbCdcPosition position, string shardId, string sequenceNumber, Dictionary<string, AttributeValue> keys, Dictionary<string, AttributeValue>? newImage, DateTimeOffset timestamp, string? eventId)
Parameters
positionDynamoDbCdcPositionshardIdstringsequenceNumberstringkeysDictionary<string, AttributeValue>newImageDictionary<string, AttributeValue>timestampDateTimeOffseteventIdstring
Returns
CreateModify(DynamoDbCdcPosition, string, string, Dictionary<string, AttributeValue>, Dictionary<string, AttributeValue>?, Dictionary<string, AttributeValue>?, DateTimeOffset, string?)
Creates a new instance for a modify event.
public static DynamoDbDataChangeEvent CreateModify(DynamoDbCdcPosition position, string shardId, string sequenceNumber, Dictionary<string, AttributeValue> keys, Dictionary<string, AttributeValue>? newImage, Dictionary<string, AttributeValue>? oldImage, DateTimeOffset timestamp, string? eventId)
Parameters
positionDynamoDbCdcPositionshardIdstringsequenceNumberstringkeysDictionary<string, AttributeValue>newImageDictionary<string, AttributeValue>oldImageDictionary<string, AttributeValue>timestampDateTimeOffseteventIdstring
Returns
CreateRemove(DynamoDbCdcPosition, string, string, Dictionary<string, AttributeValue>, Dictionary<string, AttributeValue>?, DateTimeOffset, string?)
Creates a new instance for a remove event.
public static DynamoDbDataChangeEvent CreateRemove(DynamoDbCdcPosition position, string shardId, string sequenceNumber, Dictionary<string, AttributeValue> keys, Dictionary<string, AttributeValue>? oldImage, DateTimeOffset timestamp, string? eventId)
Parameters
positionDynamoDbCdcPositionshardIdstringsequenceNumberstringkeysDictionary<string, AttributeValue>oldImageDictionary<string, AttributeValue>timestampDateTimeOffseteventIdstring