For conceptual information and underlying REST API, go to Deleting an Archive in Amazon Glacier and Delete Archive in the Amazon Glacier Developer Guide .
201202203204205206207208209210211
String sendThis = archiveId.replaceAll("[^\\p{Print}]", ""); String vaultName = deleteVault; // Delete the archive. deleteClient.deleteArchive(new DeleteArchiveRequest() .withVaultName(vaultName) .withArchiveId(sendThis)); JOptionPane.showMessageDialog(null, "Deleted archive successfully.","Success",JOptionPane.INFORMATION_MESSAGE);
7879808182838485
delete((ResultCapture<Void>)null); } @Override public void delete(ResultCapture<Void> extractor) { DeleteArchiveRequest request = new DeleteArchiveRequest(); delete(request, extractor); }
41424344454647484950
} public void delete(final String vaultName, final String archiveId) { log.info("Deleting archive " + archiveId + " from vault " + vaultName + "..."); final DeleteArchiveRequest deleteRequest = new DeleteArchiveRequest(vaultName, archiveId); client.deleteArchive(deleteRequest); log.info("Archive " + archiveId + " deletion started from vault " + vaultName + "."); }