Example usage for com.amazonaws.services.dynamodbv2.document DynamoDB listTables

List of usage examples for com.amazonaws.services.dynamodbv2.document DynamoDB listTables

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.document DynamoDB listTables.

Prototype

@Override
    public TableCollection<ListTablesResult> listTables() 

Source Link

Usage

From source file:com.optimalbi.AmazonAccount.java

License:Apache License

private void populateDynamoDB() throws AmazonClientException {
    getRegions().stream().filter(region -> region.isServiceSupported(ServiceAbbreviations.Dynamodb))
            .forEach(region -> {/*from ww  w.j  a  v  a  2s  . c  o m*/
                AmazonDynamoDBClient DDB = new AmazonDynamoDBClient(credentials.getCredentials());
                DDB.setRegion(region);
                DynamoDB dynamoDB = new DynamoDB(DDB);
                TableCollection<ListTablesResult> tables = dynamoDB.listTables();
                tables.forEach(table -> services.add(new LocalDynamoDBService(table.getTableName(), credentials,
                        region, table.describe(), logger)));
            });
}