Enum AttributeType

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:15.346Z") @Stability(Stable) public enum AttributeType extends Enum<AttributeType>
Data types for attributes within a table.

Example:

 import software.amazon.awscdk.*;
 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(stack, "GlobalTable")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         // applys to all replicas, i.e., us-west-2, us-east-1, us-east-2
         .removalPolicy(RemovalPolicy.DESTROY)
         .replicas(List.of(ReplicaTableProps.builder().region("us-east-1").build(), ReplicaTableProps.builder().region("us-east-2").build()))
         .build();
 

See Also:
  • Enum Constant Details

    • BINARY

      @Stability(Stable) public static final AttributeType BINARY
      Up to 400KiB of binary data (which must be encoded as base64 before sending to DynamoDB).
    • NUMBER

      @Stability(Stable) public static final AttributeType NUMBER
      Numeric values made of up to 38 digits (positive, negative or zero).
    • STRING

      @Stability(Stable) public static final AttributeType STRING
      Up to 400KiB of UTF-8 encoded text.
  • Method Details

    • values

      public static AttributeType[] 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 AttributeType 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