List of usage examples for com.amazonaws.services.glacier AmazonGlacierClient setRegion
@Deprecated public void setRegion(Region region) throws IllegalArgumentException
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); 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);/*from w w w . j a va 2s. c o m*/ } } } }