use of software.amazon.awssdk.enhanced.dynamodb.model.CreateTableEnhancedRequest in project serve by pytorch.
the class DDBSnapshotSerializerTest method createTable.
private void createTable() {
ProvisionedThroughput provThroughput = ProvisionedThroughput.builder().readCapacityUnits(10L).writeCapacityUnits(5L).build();
Projection projectAll = Projection.builder().projectionType(ProjectionType.ALL).build();
EnhancedGlobalSecondaryIndex gsi = EnhancedGlobalSecondaryIndex.builder().indexName("createdOnMonth-index").projection(projectAll).provisionedThroughput(provThroughput).build();
CreateTableEnhancedRequest createTableReq = CreateTableEnhancedRequest.builder().globalSecondaryIndices(Arrays.asList(gsi)).build();
snapshotTable.createTable(createTableReq);
}
Aggregations