Example usage for com.amazonaws.regions ServiceAbbreviations Glacier

List of usage examples for com.amazonaws.regions ServiceAbbreviations Glacier

Introduction

In this page you can find the example usage for com.amazonaws.regions ServiceAbbreviations Glacier.

Prototype

String Glacier

To view the source code for com.amazonaws.regions ServiceAbbreviations Glacier.

Click Source Link

Usage

From source file:com.optimalbi.AmazonAccount.java

License:Apache License

private void populateGlacier() throws AmazonClientException {
    for (Region r : regions) {
        if (r.isServiceSupported(ServiceAbbreviations.Glacier)) {
            AmazonGlacierClient glacierClient = new AmazonGlacierClient(credentials.getCredentials());
            glacierClient.setRegion(r);/*  ww w.  j  av  a 2 s .  c om*/
            ListVaultsResult result = glacierClient.listVaults(new ListVaultsRequest());
            List<DescribeVaultOutput> vaults = result.getVaultList();
            for (DescribeVaultOutput d : vaults) {
                DescribeVaultResult res = glacierClient
                        .describeVault(new DescribeVaultRequest(d.getVaultName()));
                Service temp = new LocalGlacierService(d.getVaultName(), credentials, r, res, logger);
                services.add(temp);
            }
        }
    }
}