Interface GlobalSecondaryIndexProps

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:15.407Z") @Stability(Stable) public interface GlobalSecondaryIndexProps extends software.amazon.jsii.JsiiSerializable, SecondaryIndexProps, SchemaOptions
Properties for a global secondary index.

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.*;
 GlobalSecondaryIndexProps globalSecondaryIndexProps = GlobalSecondaryIndexProps.builder()
         .indexName("indexName")
         .partitionKey(Attribute.builder()
                 .name("name")
                 .type(AttributeType.BINARY)
                 .build())
         // the properties below are optional
         .nonKeyAttributes(List.of("nonKeyAttributes"))
         .projectionType(ProjectionType.KEYS_ONLY)
         .readCapacity(123)
         .sortKey(Attribute.builder()
                 .name("name")
                 .type(AttributeType.BINARY)
                 .build())
         .writeCapacity(123)
         .build();
 
  • Method Details

    • getReadCapacity

      @Stability(Stable) @Nullable default Number getReadCapacity()
      The read capacity for the global secondary index.

      Can only be provided if table billingMode is Provisioned or undefined.

      Default: 5

    • getWriteCapacity

      @Stability(Stable) @Nullable default Number getWriteCapacity()
      The write capacity for the global secondary index.

      Can only be provided if table billingMode is Provisioned or undefined.

      Default: 5

    • builder

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