Interface KeySchema

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
KeySchema.Jsii$Proxy

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-20T23:37:18.530Z") @Stability(Stable) public interface KeySchema extends software.amazon.jsii.JsiiSerializable
A description of a key schema of an LSI, GSI or Table.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.dynamodb.*;
 KeySchema keySchema = KeySchema.builder()
         .partitionKeys(List.of(Attribute.builder()
                 .name("name")
                 .type(AttributeType.BINARY)
                 .build()))
         .sortKeys(List.of(Attribute.builder()
                 .name("name")
                 .type(AttributeType.BINARY)
                 .build()))
         .build();
 
  • Method Details

    • getPartitionKeys

      @Stability(Stable) @NotNull List<Attribute> getPartitionKeys()
      Partition key definition.

      This array has at least one, but potentially multiple entries. Together, they form the partition key.

    • getSortKeys

      @Stability(Stable) @NotNull List<Attribute> getSortKeys()
      Sort key definition.

      This array has zero or more entries. Together, they form the sort key.

    • builder

      @Stability(Stable) static KeySchema.Builder builder()
      Returns:
      a KeySchema.Builder of KeySchema