Created
November 10, 2015 12:35
-
-
Save gdm/56af64936e4e8d306ea4 to your computer and use it in GitHub Desktop.
get provisioned write capacity units
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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