Enum StreamViewType

java.lang.Object
java.lang.Enum<StreamViewType>
software.amazon.awscdk.services.dynamodb.StreamViewType
All Implemented Interfaces:
Serializable, Comparable<StreamViewType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:00.323Z") @Stability(Stable) public enum StreamViewType extends Enum<StreamViewType>
When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.

Example:

 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.kinesis.*;
 App app = new App();
 Stack stack = Stack.Builder.create(app, "Stack").env(Environment.builder().region("us-west-2").build()).build();
 TableV2 globalTable = TableV2.Builder.create(this, "GlobalTable")
         .partitionKey(Attribute.builder().name("id").type(AttributeType.STRING).build())
         .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(List.of(ReplicaTableProps.builder().region("us-east-1").build(), ReplicaTableProps.builder().region("us-east-2").build()))
         .build();
 

See Also:
  • Enum Constant Details

    • NEW_IMAGE

      @Stability(Stable) public static final StreamViewType NEW_IMAGE
      The entire item, as it appears after it was modified, is written to the stream.
    • OLD_IMAGE

      @Stability(Stable) public static final StreamViewType OLD_IMAGE
      The entire item, as it appeared before it was modified, is written to the stream.
    • NEW_AND_OLD_IMAGES

      @Stability(Stable) public static final StreamViewType NEW_AND_OLD_IMAGES
      Both the new and the old item images of the item are written to the stream.
    • KEYS_ONLY

      @Stability(Stable) public static final StreamViewType KEYS_ONLY
      Only the key attributes of the modified item are written to the stream.
  • Method Details

    • values

      public static StreamViewType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StreamViewType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null