public String put(String resourceId, File uploadFile) throws FileNotFoundException { AmazonGlacierClient client = new AmazonGlacierClient(getCredentials()); client.setEndpoint(getEndpoint()); ArchiveTransferManager atm = new ArchiveTransferManager(client, getCredentials()); _log.info("Transferring cache file content to Glacier. vault: " + getVaultName() + " description: " + resourceId); UploadResult uploadResult = atm.upload(getVaultName(), resourceId, uploadFile); String archiveId = uploadResult.getArchiveId(); _log.info("Upload Successful. archiveId: {} resourceId: {}",archiveId,resourceId); return archiveId; }
private ArchiveTransferManager getATM(){ return new ArchiveTransferManager(GlacierFrame.getClient(), Main.frame); }
public ArchiveUploadHighLevel(String region, String account, String vault) { super (region, account, vault); this.atm = new ArchiveTransferManager(this.awsClient, this.credentialsProvider); }