Enum StreamViewType
- All Implemented Interfaces:
Serializable
,Comparable<StreamViewType>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-12T12:32:01.151Z")
@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.services.lambda.eventsources.*; import software.amazon.awscdk.services.dynamodb.*; Function fn; Table table = Table.Builder.create(this, "Table") .partitionKey(Attribute.builder() .name("id") .type(AttributeType.STRING) .build()) .stream(StreamViewType.NEW_IMAGE) .build(); fn.addEventSource(DynamoEventSource.Builder.create(table) .startingPosition(StartingPosition.LATEST) .metricsConfig(MetricsConfig.builder() .metrics(List.of(MetricType.EVENT_COUNT)) .build()) .build());
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOnly the key attributes of the modified item are written to the stream.Both the new and the old item images of the item are written to the stream.The entire item, as it appears after it was modified, is written to the stream.The entire item, as it appeared before it was modified, is written to the stream. -
Method Summary
Modifier and TypeMethodDescriptionstatic StreamViewType
Returns the enum constant of this type with the specified name.static StreamViewType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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. -
NEW_AND_OLD_IMAGES
Both the new and the old item images of the item are written to the stream. -
KEYS_ONLY
Only the key attributes of the modified item are written to the stream.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-