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-06T23:25:07.243Z")
@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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forReplicaGlobalSecondaryIndexOptionsstatic final classAn implementation forReplicaGlobalSecondaryIndexOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanWhether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table.default NumberThe maximum read request units for a specific global secondary index on a replica table.default CapacityThe read capacity for a specific global secondary index on a replica table.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContributorInsights
Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table.Default: - inherited from the primary table
-
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
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
-