use of software.amazon.awssdk.services.dynamodb.model.KeyType in project cas by apereo.
the class DynamoDbTicketRegistryFacilitator method createTicketTables.
/**
* Create ticket tables.
*
* @param deleteTables the delete tables
*/
public void createTicketTables(final boolean deleteTables) {
val metadata = this.ticketCatalog.findAll();
metadata.forEach(Unchecked.consumer(r -> {
DynamoDbTableUtils.createTable(amazonDynamoDBClient, dynamoDbProperties, r.getProperties().getStorageName(), deleteTables, List.of(AttributeDefinition.builder().attributeName(ColumnNames.ID.getColumnName()).attributeType(ScalarAttributeType.S).build()), List.of(KeySchemaElement.builder().attributeName(ColumnNames.ID.getColumnName()).keyType(KeyType.HASH).build()));
}));
}
Aggregations