.build()) .tableName(table_name) .build();
.writeCapacityUnits(new Long(10)).build()) .tableName(table_name) .build();
.provisionedThroughput(createDynamoDBTableOptions.getProvisionedThroughput()) .attributeDefinitions(attributeDefinitions) .build();
throws ResourceInUseException, LimitExceededException, InternalServerErrorException, AwsServiceException, SdkClientException, DynamoDbException { return createTable(CreateTableRequest.builder().applyMutation(createTableRequest).build());
return createTable(CreateTableRequest.builder().applyMutation(createTableRequest).build());
.writeCapacityUnits(writeCapacity).build(); CreateTableRequest request = CreateTableRequest.builder().tableName(table).keySchema(serializer.getKeySchema()) .attributeDefinitions(serializer.getAttributeDefinitions()).provisionedThroughput(throughput).build();
.writeCapacityUnits(writeCapacity).build(); CreateTableRequest request = CreateTableRequest.builder().tableName(table).keySchema(serializer.getKeySchema()) .attributeDefinitions(serializer.getAttributeDefinitions()).provisionedThroughput(throughput).build();
/** * Creates an orders table in DynamoDB. */ public void createOrdersTable() { try { dynamoDb.createTable(CreateTableRequest.builder() .tableName(tableName) .provisionedThroughput(ProvisionedThroughput.builder() .readCapacityUnits(5L) .writeCapacityUnits(5L) .build()) .keySchema(KeySchemaElement.builder() .attributeName(ORDER_ID) .keyType(KeyType.HASH) .build()) .attributeDefinitions(AttributeDefinition.builder() .attributeName(ORDER_ID) .attributeType(ScalarAttributeType.S) .build()) .build()); } catch (ResourceInUseException e) { throw new TableExistsException("Orders table already exists"); } }