Interface GlobalSecondaryIndexProps

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

@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)", date="2025-12-18T18:20:08.514Z") @Stability(Stable) public interface GlobalSecondaryIndexProps extends software.amazon.jsii.JsiiSerializable, SecondaryIndexProps, SchemaOptions
Properties for a global secondary index.

Example:

 Table table = Table.Builder.create(this, "Table")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         .contributorInsightsSpecification(ContributorInsightsSpecification.builder() // for a table
                 .enabled(true)
                 .mode(ContributorInsightsMode.THROTTLED_KEYS).build())
         .build();
 table.addGlobalSecondaryIndex(GlobalSecondaryIndexProps.builder()
         .contributorInsightsSpecification(ContributorInsightsSpecification.builder() // for a specific global secondary index
                 .enabled(true).build())
         .indexName("gsi")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         .build());
 
  • Method Details

    • getContributorInsightsEnabled

      @Stability(Deprecated) @Deprecated @Nullable default Boolean getContributorInsightsEnabled()
      Deprecated.
      use contributorInsightsSpecification instead
      (deprecated) Whether CloudWatch contributor insights is enabled for the specified global secondary index.

      Default: false

    • getContributorInsightsSpecification

      @Stability(Stable) @Nullable default ContributorInsightsSpecification getContributorInsightsSpecification()
      Whether CloudWatch contributor insights is enabled and what mode is selected.

      Default: - contributor insights is not enabled

    • getMaxReadRequestUnits

      @Stability(Stable) @Nullable default Number getMaxReadRequestUnits()
      The maximum read request units for the global secondary index.

      Can only be provided if table billingMode is PAY_PER_REQUEST.

      Default: - on-demand throughput is disabled

    • getMaxWriteRequestUnits

      @Stability(Stable) @Nullable default Number getMaxWriteRequestUnits()
      The maximum write request units for the global secondary index.

      Can only be provided if table billingMode is PAY_PER_REQUEST.

      Default: - on-demand throughput is disabled

    • getPartitionKeys

      @Stability(Stable) @Nullable default List<Attribute> getPartitionKeys()
      Multi-attribute partition key.

      If a single field forms the partition key, you can use either partitionKey or partitionKeys to specify the partition key. Exactly one of these must be specified.

      You must use partitionKeys field if the partition key is a multi-attribute key (consists of multiple fields).

      NOTE: although the name of this field makes it sound like it creates multiple keys, it does not. It defines a single key that consists of of multiple fields.

      The order of fields is not important.

      Default: - exactly one of `partitionKey` and `partitionKeys` must be specified.

    • 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

    • getSortKeys

      @Stability(Stable) @Nullable default List<Attribute> getSortKeys()
      Multi-attribute sort key.

      If a single field forms the sort key, you can use either sortKey or sortKeys to specify the sort key. At most one of these may be specified.

      You must use sortKeys field if the sort key is a multi-attribute key (consists of multiple fields).

      NOTE: although the name of this field makes it sound like it creates multiple keys, it does not. It defines a single key that consists of of multiple fields at the same time.

      NOTE: The order of fields is important!

      Default: - no sort key

    • getWarmThroughput

      @Stability(Stable) @Nullable default WarmThroughput getWarmThroughput()
      The warm throughput configuration for the global secondary index.

      Default: - no warm throughput is configured

    • 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