Skip to content

Instantly share code, notes, and snippets.

@gdm
Created November 10, 2015 12:35
Show Gist options
  • Select an option

  • Save gdm/56af64936e4e8d306ea4 to your computer and use it in GitHub Desktop.

Select an option

Save gdm/56af64936e4e8d306ea4 to your computer and use it in GitHub Desktop.
get provisioned write capacity units
public int getWriteCapacity(final String tableName) {
DescribeTableResult td = client.describeTable(tableName);
if (td.getTable() != null ) {
return td.getTable().getProvisionedThroughput().getWriteCapacityUnits().intValue();
}
// Indicates error.
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment