Table of Contents

Class DynamoDbDataChangeEvent

Namespace
Excalibur.Cdc.DynamoDb
Assembly
Excalibur.Cdc.DynamoDb.dll

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

DynamoDbDataChangeType

EventId

Gets the unique event identifier.

public string? EventId { get; init; }

Property Value

string

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

DynamoDbCdcPosition

SequenceNumber

Gets the sequence number within the shard.

public string SequenceNumber { get; init; }

Property Value

string

ShardId

Gets the shard ID this change came from.

public string ShardId { get; init; }

Property Value

string

Timestamp

Gets the approximate timestamp when the change occurred.

public DateTimeOffset Timestamp { get; init; }

Property Value

DateTimeOffset

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

position DynamoDbCdcPosition
shardId string
sequenceNumber string
keys Dictionary<string, AttributeValue>
newImage Dictionary<string, AttributeValue>
timestamp DateTimeOffset
eventId string

Returns

DynamoDbDataChangeEvent

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

position DynamoDbCdcPosition
shardId string
sequenceNumber string
keys Dictionary<string, AttributeValue>
newImage Dictionary<string, AttributeValue>
oldImage Dictionary<string, AttributeValue>
timestamp DateTimeOffset
eventId string

Returns

DynamoDbDataChangeEvent

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

position DynamoDbCdcPosition
shardId string
sequenceNumber string
keys Dictionary<string, AttributeValue>
oldImage Dictionary<string, AttributeValue>
timestamp DateTimeOffset
eventId string

Returns

DynamoDbDataChangeEvent