public String initiateMultipartUpload(AWSCredentials awsCredentials, String region, String vault, String archiveDescription, long partSize) { try { runtimeCredentialsProvider.setAwsCredentials(awsCredentials); amazonGlacier.setRegion(Region.getRegion(Regions.fromName(region))); InitiateMultipartUploadResult result = amazonGlacier.initiateMultipartUpload(new InitiateMultipartUploadRequest(vault, archiveDescription, Long.toString(partSize))); return result.getUploadId(); } catch (AmazonClientException e) { throw new OmakaseRuntimeException(e); } }
@Override public MultipartUpload initiateMultipartUpload( InitiateMultipartUploadRequest request, ResultCapture<InitiateMultipartUploadResult> extractor) { ActionResult result = resource.performAction("InitiateMultipartUpload", request, extractor); if (result == null) return null; return new MultipartUploadImpl(result.getResource()); }
@Override public MultipartUpload initiateMultipartUpload(String partSize, String archiveDescription, ResultCapture<InitiateMultipartUploadResult> extractor) { InitiateMultipartUploadRequest request = new InitiateMultipartUploadRequest() .withPartSize(partSize) .withArchiveDescription(archiveDescription); return initiateMultipartUpload(request, extractor); }
private String initiateMultipartUpload() { InitiateMultipartUploadRequest request = new InitiateMultipartUploadRequest() .withVaultName(vaultName) .withArchiveDescription(descriptionString) .withPartSize(granularity + ""); LGR.log(Level.INFO, "uploading to vault {1} in region {0}", new Object[]{region, vaultName}); return GlacierFrame.getClient(region) .initiateMultipartUpload(request).getUploadId(); }
@Override public MultipartUpload initiateMultipartUpload( InitiateMultipartUploadRequest request) { return initiateMultipartUpload(request, null); }
/** * Performs the <code>InitiateMultipartUpload</code> action. * * <p> * The following request parameters will be populated from the data of this * <code>Vault</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>VaultName</code></b> * - mapped from the <code>Name</code> identifier. * </li> * <li> * <b><code>AccountId</code></b> * - mapped from the <code>AccountId</code> identifier. * </li> * </ul> * * <p> * * @return The <code>MultipartUpload</code> resource object associated with * the result of this action. * @see InitiateMultipartUploadRequest */ com.amazonaws.resources.glacier.MultipartUpload initiateMultipartUpload( InitiateMultipartUploadRequest request);
/** * Performs the <code>InitiateMultipartUpload</code> action and use a * ResultCapture to retrieve the low-level client response. * * <p> * The following request parameters will be populated from the data of this * <code>Vault</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>VaultName</code></b> * - mapped from the <code>Name</code> identifier. * </li> * <li> * <b><code>AccountId</code></b> * - mapped from the <code>AccountId</code> identifier. * </li> * </ul> * * <p> * * @return The <code>MultipartUpload</code> resource object associated with * the result of this action. * @see InitiateMultipartUploadRequest */ com.amazonaws.resources.glacier.MultipartUpload initiateMultipartUpload( InitiateMultipartUploadRequest request, ResultCapture<InitiateMultipartUploadResult> extractor);