Interface ReplicaGlobalSecondaryIndexOptions

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:00.046Z") @Stability(Stable) public interface ReplicaGlobalSecondaryIndexOptions extends software.amazon.jsii.JsiiSerializable
Options used to configure global secondary indexes on a replica table.

Example:

 import software.amazon.awscdk.*;
 App app = new App();
 Stack stack = Stack.Builder.create(app, "Stack").env(Environment.builder().region("us-west-2").build()).build();
 TableV2 globalTable = TableV2.Builder.create(stack, "GlobalTable")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         .contributorInsights(true)
         .billing(Billing.provisioned(ThroughputProps.builder()
                 .readCapacity(Capacity.fixed(10))
                 .writeCapacity(Capacity.autoscaled(AutoscaledCapacityOptions.builder().maxCapacity(10).build()))
                 .build()))
         // each global secondary index will inherit contributor insights as true
         .globalSecondaryIndexes(List.of(GlobalSecondaryIndexPropsV2.builder()
                 .indexName("gsi1")
                 .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
                 .readCapacity(Capacity.fixed(15))
                 .build(), GlobalSecondaryIndexPropsV2.builder()
                 .indexName("gsi2")
                 .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
                 .writeCapacity(Capacity.autoscaled(AutoscaledCapacityOptions.builder().minCapacity(5).maxCapacity(20).build()))
                 .build()))
         .replicas(List.of(ReplicaTableProps.builder()
                 .region("us-east-1")
                 .globalSecondaryIndexOptions(Map.of(
                         "gsi1", ReplicaGlobalSecondaryIndexOptions.builder()
                                 .readCapacity(Capacity.autoscaled(AutoscaledCapacityOptions.builder().minCapacity(1).maxCapacity(10).build()))
                                 .build()))
                 .build(), ReplicaTableProps.builder()
                 .region("us-east-2")
                 .globalSecondaryIndexOptions(Map.of(
                         "gsi2", ReplicaGlobalSecondaryIndexOptions.builder()
                                 .contributorInsights(false)
                                 .build()))
                 .build()))
         .build();
 
  • Method Details

    • getContributorInsights

      @Stability(Stable) @Nullable default Boolean getContributorInsights()
      Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table.

      Default: - inherited from the primary table

    • getMaxReadRequestUnits

      @Stability(Stable) @Nullable default Number getMaxReadRequestUnits()
      The maximum read request units for a specific global secondary index on a replica table.

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

      Default: - inherited from the primary table

    • getReadCapacity

      @Stability(Stable) @Nullable default Capacity getReadCapacity()
      The read capacity for a specific global secondary index on a replica table.

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

      Default: - inherited from the primary table

    • builder

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