|
Did this page help you?Yes No Tell us about it... |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.glacier.model.CompleteMultipartUploadRequest
public class CompleteMultipartUploadRequest
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 .
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 |
---|
public CompleteMultipartUploadRequest()
public CompleteMultipartUploadRequest(java.lang.String vaultName, java.lang.String uploadId, java.lang.String archiveSize, java.lang.String checksum)
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.public CompleteMultipartUploadRequest(java.lang.String accountId, java.lang.String vaultName, java.lang.String uploadId, java.lang.String archiveSize, java.lang.String checksum)
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 |
---|
public java.lang.String getAccountId()
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.
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.public void setAccountId(java.lang.String accountId)
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.
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.public CompleteMultipartUploadRequest withAccountId(java.lang.String accountId)
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.
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.
public java.lang.String getVaultName()
public void setVaultName(java.lang.String vaultName)
vaultName
- The name of the vault.public CompleteMultipartUploadRequest withVaultName(java.lang.String vaultName)
Returns a reference to this object so that method calls can be chained together.
vaultName
- The name of the vault.
public java.lang.String getUploadId()
public void setUploadId(java.lang.String uploadId)
uploadId
- The upload ID of the multipart upload.public CompleteMultipartUploadRequest withUploadId(java.lang.String uploadId)
Returns a reference to this object so that method calls can be chained together.
uploadId
- The upload ID of the multipart upload.
public java.lang.String getArchiveSize()
public void setArchiveSize(java.lang.String archiveSize)
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.public CompleteMultipartUploadRequest withArchiveSize(java.lang.String archiveSize)
Returns a reference to this object so that method calls can be chained together.
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.
public java.lang.String getChecksum()
public void setChecksum(java.lang.String checksum)
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.public CompleteMultipartUploadRequest withChecksum(java.lang.String checksum)
Returns a reference to this object so that method calls can be chained together.
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.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |