Class StreamViewType
When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.
Inheritance
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class StreamViewType : Enum
Syntax (vb)
Public NotInheritable Class StreamViewType
Inherits
Enum
Remarks
See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_StreamSpecification.html
ExampleMetadata: infused
Examples
using Amazon.CDK;
using Amazon.CDK.AWS.Kinesis;
var app = new App();
var stack = new Stack(app, "Stack", new StackProps { Env = new Environment { Region = "us-west-2" } });
var globalTable = new TableV2(this, "GlobalTable", new TablePropsV2 {
PartitionKey = new Attribute { Name = "id", Type = AttributeType.STRING },
DynamoStream = StreamViewType.OLD_IMAGE,
// tables in us-west-2, us-east-1, and us-east-2 all have dynamo stream type of OLD_IMAGES
Replicas = new [] { new ReplicaTableProps { Region = "us-east-1" }, new ReplicaTableProps { Region = "us-east-2" } }
});
Synopsis
Fields
KEYS_ONLY | Only the key attributes of the modified item are written to the stream. |
NEW_AND_OLD_IMAGES | Both the new and the old item images of the item are written to the stream. |
NEW_IMAGE | The entire item, as it appears after it was modified, is written to the stream. |
OLD_IMAGE | The entire item, as it appeared before it was modified, is written to the stream. |
value__ |
Fields
KEYS_ONLY
Only the key attributes of the modified item are written to the stream.
public const StreamViewType KEYS_ONLY
Field Value
Type | Description |
---|---|
StreamViewType |
NEW_AND_OLD_IMAGES
Both the new and the old item images of the item are written to the stream.
public const StreamViewType NEW_AND_OLD_IMAGES
Field Value
Type | Description |
---|---|
StreamViewType |
NEW_IMAGE
The entire item, as it appears after it was modified, is written to the stream.
public const StreamViewType NEW_IMAGE
Field Value
Type | Description |
---|---|
StreamViewType |
OLD_IMAGE
The entire item, as it appeared before it was modified, is written to the stream.
public const StreamViewType OLD_IMAGE
Field Value
Type | Description |
---|---|
StreamViewType |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |