Interface GlobalSecondaryIndexPropsV2

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, SecondaryIndexProps
All Known Implementing Classes:
GlobalSecondaryIndexPropsV2.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:09.310Z") @Stability(Stable) public interface GlobalSecondaryIndexPropsV2 extends software.amazon.jsii.JsiiSerializable, SecondaryIndexProps
Properties used to configure a global secondary index.

Example:

 TableV2 table = TableV2.Builder.create(this, "Table")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         .globalSecondaryIndexes(List.of(GlobalSecondaryIndexPropsV2.builder()
                 .indexName("gsi1")
                 .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
                 .build()))
         .build();
 table.addGlobalSecondaryIndex(GlobalSecondaryIndexPropsV2.builder()
         .indexName("gsi2")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         .build());
 
  • Method Details

    • getPartitionKey

      @Stability(Stable) @NotNull Attribute getPartitionKey()
      Partition key attribute definition.
    • getReadCapacity

      @Stability(Stable) @Nullable default Capacity getReadCapacity()
      The read capacity.

      Note: This can only be configured if the primary table billing is provisioned.

      Default: - inherited from the primary table.

    • getSortKey

      @Stability(Stable) @Nullable default Attribute getSortKey()
      Sort key attribute definition.

      Default: - no sort key

    • getWriteCapacity

      @Stability(Stable) @Nullable default Capacity getWriteCapacity()
      The write capacity.

      Note: This can only be configured if the primary table billing is provisioned.

      Default: - inherited from the primary table.

    • builder

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