Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.glacier.model
Class CompleteMultipartUploadRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.glacier.model.CompleteMultipartUploadRequest

public class CompleteMultipartUploadRequest
extends AmazonWebServiceRequest

Container for the parameters to the CompleteMultipartUpload operation.

You call this operation to inform Amazon Glacier that all the archive parts have been uploaded and that Amazon Glacier can now assemble the archive from the uploaded parts. After assembling and saving the archive to the vault, Amazon Glacier returns the URI path of the newly created archive resource. Using the URI path, you can then access the archive. After you upload an archive, you should save the archive ID returned to retrieve the archive at a later point. You can also get the vault inventory to obtain a list of archive IDs in a vault. For more information, see InitiateJob.

In the request, you must include the computed SHA256 tree hash of the entire archive you have uploaded. For information about computing a SHA256 tree hash, see Computing Checksums . On the server side, Amazon Glacier also constructs the SHA256 tree hash of the assembled archive. If the values match, Amazon Glacier saves the archive to the vault; otherwise, it returns an error, and the operation fails. The ListParts operation returns a list of parts uploaded for a specific multipart upload. It includes checksum information for each uploaded part that can be used to debug a bad checksum issue.

Additionally, Amazon Glacier also checks for any missing content ranges when assembling the archive, if missing content ranges are found, Amazon Glacier returns an error and the operation fails.

Complete Multipart Upload is an idempotent operation. After your first successful complete multipart upload, if you call the operation again within a short period, the operation will succeed and return the same archive ID. This is useful in the event you experience a network issue that causes an aborted connection or receive a 500 server error, in which case you can repeat your Complete Multipart Upload request and get the same archive ID without creating duplicate archives. Note, however, that after the multipart upload completes, you cannot call the List Parts operation and the multipart upload will not appear in List Multipart Uploads response, even if idempotent complete is possible.

An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM) .

For conceptual information and underlying REST API, go to Uploading Large Archives in Parts (Multipart Upload) and Complete Multipart Upload in the Amazon Glacier Developer Guide .

See Also:
AmazonGlacier.completeMultipartUpload(CompleteMultipartUploadRequest)

Constructor Summary
CompleteMultipartUploadRequest()
          Default constructor for a new CompleteMultipartUploadRequest object.
CompleteMultipartUploadRequest(java.lang.String vaultName, java.lang.String uploadId, java.lang.String archiveSize, java.lang.String checksum)
          Constructs a new CompleteMultipartUploadRequest object.
CompleteMultipartUploadRequest(java.lang.String accountId, java.lang.String vaultName, java.lang.String uploadId, java.lang.String archiveSize, java.lang.String checksum)
          Constructs a new CompleteMultipartUploadRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAccountId()
          The AccountId is the AWS Account ID.
 java.lang.String getArchiveSize()
          The total size, in bytes, of the entire archive.
 java.lang.String getChecksum()
          The SHA256 tree hash of the entire archive.
 java.lang.String getUploadId()
          The upload ID of the multipart upload.
 java.lang.String getVaultName()
          The name of the vault.
 int hashCode()
           
 void setAccountId(java.lang.String accountId)
          The AccountId is the AWS Account ID.
 void setArchiveSize(java.lang.String archiveSize)
          The total size, in bytes, of the entire archive.
 void setChecksum(java.lang.String checksum)
          The SHA256 tree hash of the entire archive.
 void setUploadId(java.lang.String uploadId)
          The upload ID of the multipart upload.
 void setVaultName(java.lang.String vaultName)
          The name of the vault.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CompleteMultipartUploadRequest withAccountId(java.lang.String accountId)
          The AccountId is the AWS Account ID.
 CompleteMultipartUploadRequest withArchiveSize(java.lang.String archiveSize)
          The total size, in bytes, of the entire archive.
 CompleteMultipartUploadRequest withChecksum(java.lang.String checksum)
          The SHA256 tree hash of the entire archive.
 CompleteMultipartUploadRequest withUploadId(java.lang.String uploadId)
          The upload ID of the multipart upload.
 CompleteMultipartUploadRequest withVaultName(java.lang.String vaultName)
          The name of the vault.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompleteMultipartUploadRequest

public CompleteMultipartUploadRequest()
Default constructor for a new CompleteMultipartUploadRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


CompleteMultipartUploadRequest

public CompleteMultipartUploadRequest(java.lang.String vaultName,
                                      java.lang.String uploadId,
                                      java.lang.String archiveSize,
                                      java.lang.String checksum)
Constructs a new CompleteMultipartUploadRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
vaultName - The name of the vault.
uploadId - The upload ID of the multipart upload.
archiveSize - The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.
checksum - The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.

CompleteMultipartUploadRequest

public CompleteMultipartUploadRequest(java.lang.String accountId,
                                      java.lang.String vaultName,
                                      java.lang.String uploadId,
                                      java.lang.String archiveSize,
                                      java.lang.String checksum)
Constructs a new CompleteMultipartUploadRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
accountId - The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.
vaultName - The name of the vault.
uploadId - The upload ID of the multipart upload.
archiveSize - The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.
checksum - The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.
Method Detail

getAccountId

public java.lang.String getAccountId()
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

Returns:
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

setAccountId

public void setAccountId(java.lang.String accountId)
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

Parameters:
accountId - The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

withAccountId

public CompleteMultipartUploadRequest withAccountId(java.lang.String accountId)
The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.

Returns a reference to this object so that method calls can be chained together.

Parameters:
accountId - The AccountId is the AWS Account ID. You can specify either the AWS Account ID or optionally a '-', in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include hyphens in it.
Returns:
A reference to this updated object so that method calls can be chained together.

getVaultName

public java.lang.String getVaultName()
The name of the vault.

Returns:
The name of the vault.

setVaultName

public void setVaultName(java.lang.String vaultName)
The name of the vault.

Parameters:
vaultName - The name of the vault.

withVaultName

public CompleteMultipartUploadRequest withVaultName(java.lang.String vaultName)
The name of the vault.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vaultName - The name of the vault.
Returns:
A reference to this updated object so that method calls can be chained together.

getUploadId

public java.lang.String getUploadId()
The upload ID of the multipart upload.

Returns:
The upload ID of the multipart upload.

setUploadId

public void setUploadId(java.lang.String uploadId)
The upload ID of the multipart upload.

Parameters:
uploadId - The upload ID of the multipart upload.

withUploadId

public CompleteMultipartUploadRequest withUploadId(java.lang.String uploadId)
The upload ID of the multipart upload.

Returns a reference to this object so that method calls can be chained together.

Parameters:
uploadId - The upload ID of the multipart upload.
Returns:
A reference to this updated object so that method calls can be chained together.

getArchiveSize

public java.lang.String getArchiveSize()
The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.

Returns:
The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.

setArchiveSize

public void setArchiveSize(java.lang.String archiveSize)
The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.

Parameters:
archiveSize - The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.

withArchiveSize

public CompleteMultipartUploadRequest withArchiveSize(java.lang.String archiveSize)
The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.

Returns a reference to this object so that method calls can be chained together.

Parameters:
archiveSize - The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.
Returns:
A reference to this updated object so that method calls can be chained together.

getChecksum

public java.lang.String getChecksum()
The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.

Returns:
The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.

setChecksum

public void setChecksum(java.lang.String checksum)
The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.

Parameters:
checksum - The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.

withChecksum

public CompleteMultipartUploadRequest withChecksum(java.lang.String checksum)
The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.

Returns a reference to this object so that method calls can be chained together.

Parameters:
checksum - The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.