Interface GlobalSecondaryIndexPropsV2

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-06T14:43:17.316Z") @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.
    • getMaxReadRequestUnits

      @Stability(Stable) @Nullable default Number getMaxReadRequestUnits()
      The maximum read request units.

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

      Default: - inherited from the primary table.

    • getMaxWriteRequestUnits

      @Stability(Stable) @Nullable default Number getMaxWriteRequestUnits()
      The maximum write request units.

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

      Default: - inherited from the primary table.

    • 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