@Override public UpdateTableResult updateTable(String tableName, ProvisionedThroughput provisionedThroughput) { return updateTable(new UpdateTableRequest().withTableName(tableName).withProvisionedThroughput(provisionedThroughput)); }
updateTableRequest.setTableName(tableName); updateTableRequest.setProvisionedThroughput(provisionedThroughput); return updateTable(updateTableRequest);
@Override public UpdateTableResult updateTable(String tableName, ProvisionedThroughput provisionedThroughput) { return updateTable(new UpdateTableRequest().withTableName(tableName).withProvisionedThroughput(provisionedThroughput)); }
/** * Updates the table settings (read and write capacities) * @param appid name of the {@link com.erudika.para.core.App} * @param readCapacity read capacity * @param writeCapacity write capacity * @return true if updated */ public static boolean updateTable(String appid, Long readCapacity, Long writeCapacity) { if (StringUtils.isBlank(appid) || StringUtils.containsWhitespace(appid) || existsTable(appid)) { return false; } try { getClient().updateTable(new UpdateTableRequest().withTableName(getTablNameForAppid(appid)). withProvisionedThroughput(new ProvisionedThroughput(readCapacity, writeCapacity))); } catch (Exception e) { logger.error(null, e); return false; } return true; }
static void updateExampleTable() { ProvisionedThroughput provisionedThroughput = new ProvisionedThroughput() .withReadCapacityUnits(6L) .withWriteCapacityUnits(7L); UpdateTableRequest updateTableRequest = new UpdateTableRequest() .withTableName(tableName) .withProvisionedThroughput(provisionedThroughput); client.updateTable(updateTableRequest); waitForTableToBecomeAvailable(tableName); }