public class UploadMultipartPartRequest extends AmazonWebServiceRequest implements Serializable
UploadMultipartPart operation
.
This operation uploads a part of an archive. You can upload archive parts in any order. You can also upload them in parallel. You can upload up to 10,000 parts for a multipart upload.
Amazon Glacier rejects your upload part request if any of the following conditions is true:
SHA256 tree hash does not match To ensure that part data is not corrupted in transmission, you compute a SHA256 tree hash of the part and include it in your request. Upon receiving the part data, Amazon Glacier also computes a SHA256 tree hash. If these hash values don't match, the operation fails. For information about computing a SHA256 tree hash, see Computing Checksums .
Part size does not match The size of each part except the last must match the size specified in the corresponding InitiateMultipartUpload request. The size of the last part must be the same size as, or smaller than, the specified size.
NOTE: If you upload a part whose size is smaller than the part size you specified in your initiate multipart upload request and that part is not the last part, then the upload part request will succeed. However, the subsequent Complete Multipart Upload request will fail.
This operation is idempotent. If you upload the same part multiple times, the data included in the most recent request overwrites the previously uploaded data.
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 Upload Part in the Amazon Glacier Developer Guide .
Constructor and Description |
---|
UploadMultipartPartRequest()
Default constructor for a new UploadMultipartPartRequest object.
|
UploadMultipartPartRequest(String vaultName,
String uploadId,
String checksum,
String range,
InputStream body)
Constructs a new UploadMultipartPartRequest object.
|
UploadMultipartPartRequest(String accountId,
String vaultName,
String uploadId,
String checksum,
String range,
InputStream body)
Constructs a new UploadMultipartPartRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAccountId()
The
AccountId is the AWS Account ID. |
InputStream |
getBody()
The data to upload.
|
String |
getChecksum()
The SHA256 tree hash of the data being uploaded.
|
String |
getRange()
Identifies the range of bytes in the assembled archive that will be
uploaded in this part.
|
String |
getUploadId()
The upload ID of the multipart upload.
|
String |
getVaultName()
The name of the vault.
|
int |
hashCode() |
void |
setAccountId(String accountId)
The
AccountId is the AWS Account ID. |
void |
setBody(InputStream body)
The data to upload.
|
void |
setChecksum(String checksum)
The SHA256 tree hash of the data being uploaded.
|
void |
setRange(String range)
Identifies the range of bytes in the assembled archive that will be
uploaded in this part.
|
void |
setUploadId(String uploadId)
The upload ID of the multipart upload.
|
void |
setVaultName(String vaultName)
The name of the vault.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
UploadMultipartPartRequest |
withAccountId(String accountId)
The
AccountId is the AWS Account ID. |
UploadMultipartPartRequest |
withBody(InputStream body)
The data to upload.
|
UploadMultipartPartRequest |
withChecksum(String checksum)
The SHA256 tree hash of the data being uploaded.
|
UploadMultipartPartRequest |
withRange(String range)
Identifies the range of bytes in the assembled archive that will be
uploaded in this part.
|
UploadMultipartPartRequest |
withUploadId(String uploadId)
The upload ID of the multipart upload.
|
UploadMultipartPartRequest |
withVaultName(String vaultName)
The name of the vault.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public UploadMultipartPartRequest()
public UploadMultipartPartRequest(String vaultName, String uploadId, String checksum, String range, InputStream body)
vaultName
- The name of the vault.uploadId
- The upload ID of the multipart upload.checksum
- The SHA256 tree hash of the data being uploaded.range
- Identifies the range of bytes in the assembled archive
that will be uploaded in this part. Amazon Glacier uses this
information to assemble the archive in the proper sequence. The format
of this header follows RFC 2616. An example header is
Content-Range:bytes 0-4194303/*.body
- The data to upload.public UploadMultipartPartRequest(String accountId, String vaultName, String uploadId, String checksum, String range, InputStream body)
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.checksum
- The SHA256 tree hash of the data being uploaded.range
- Identifies the range of bytes in the assembled archive
that will be uploaded in this part. Amazon Glacier uses this
information to assemble the archive in the proper sequence. The format
of this header follows RFC 2616. An example header is
Content-Range:bytes 0-4194303/*.body
- The data to upload.public 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(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 UploadMultipartPartRequest withAccountId(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 String getVaultName()
public void setVaultName(String vaultName)
vaultName
- The name of the vault.public UploadMultipartPartRequest withVaultName(String vaultName)
Returns a reference to this object so that method calls can be chained together.
vaultName
- The name of the vault.public String getUploadId()
public void setUploadId(String uploadId)
uploadId
- The upload ID of the multipart upload.public UploadMultipartPartRequest withUploadId(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 String getChecksum()
public void setChecksum(String checksum)
checksum
- The SHA256 tree hash of the data being uploaded.public UploadMultipartPartRequest withChecksum(String checksum)
Returns a reference to this object so that method calls can be chained together.
checksum
- The SHA256 tree hash of the data being uploaded.public String getRange()
public void setRange(String range)
range
- Identifies the range of bytes in the assembled archive that will be
uploaded in this part. Amazon Glacier uses this information to
assemble the archive in the proper sequence. The format of this header
follows RFC 2616. An example header is Content-Range:bytes
0-4194303/*.public UploadMultipartPartRequest withRange(String range)
Returns a reference to this object so that method calls can be chained together.
range
- Identifies the range of bytes in the assembled archive that will be
uploaded in this part. Amazon Glacier uses this information to
assemble the archive in the proper sequence. The format of this header
follows RFC 2616. An example header is Content-Range:bytes
0-4194303/*.public InputStream getBody()
public void setBody(InputStream body)
body
- The data to upload.public UploadMultipartPartRequest withBody(InputStream body)
Returns a reference to this object so that method calls can be chained together.
body
- The data to upload.public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.