List of usage examples for com.amazonaws.services.glacier AmazonGlacierClient describeVault
@Override
public DescribeVaultResult describeVault(DescribeVaultRequest request)
This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created, the number of archives it contains, and the total size of all the archives in the vault.
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);/* w w w. ja v a 2 s . com*/ 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 source file:opendap.aws.glacier.Vault.java
License:Open Source License
public String describeVault(String vaultName, AWSCredentials credentials) { DescribeVaultResult dvo;/*from w w w . java 2 s. c o m*/ AmazonGlacierClient client = new AmazonGlacierClient(credentials); client.setEndpoint(getEndpoint()); DescribeVaultRequest dvr = new DescribeVaultRequest(vaultName); dvo = client.describeVault(dvr); StringBuilder sb = new StringBuilder(); sb.append("================================================================================\n"); sb.append("Found Vault: ").append(dvo.getVaultName()).append("\n"); sb.append(" getCreationDateString(): ").append(dvo.getCreationDate()).append("\n"); sb.append(" getLastInventoryDate(): ").append(dvo.getLastInventoryDate()).append("\n"); sb.append(" getNumberOfArchives(): ").append(dvo.getNumberOfArchives()).append("\n"); sb.append(" getSizeInBytes(): ").append(dvo.getSizeInBytes()).append("\n"); sb.append(" getVaultARN(): ").append(dvo.getVaultARN()).append("\n"); sb.append(" toString(): ").append(dvo.toString()).append("\n"); return sb.toString(); }