public class CompleteMultipartUploadRequest extends AmazonWebServiceRequest implements Serializable, ExpectedBucketOwnerRequest, SSECustomerKeyProvider
If you are performing a complete multipart upload for KMS-encrypted objects, you need to specify the correct region of the bucket on your client and configure Amazon Web Services Signature Version 4 for added security. For more information on how to do this, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify -signature-version
Required Parameters: BucketName, Key, UploadId, PartETags
NOOP
Constructor and Description |
---|
CompleteMultipartUploadRequest() |
CompleteMultipartUploadRequest(String bucketName,
String key,
String uploadId,
List<PartETag> partETags)
Constructs a new request to complete a multipart upload.
|
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
Returns the name of the bucket containing the multipart upload to
complete.
|
String |
getExpectedBucketOwner()
Returns he account id of the expected bucket owner.
|
String |
getIfNoneMatch()
Returns the value for the header If-None-Match.
|
String |
getKey()
Returns the key under which the multipart upload to complete is stored.
|
List<PartETag> |
getPartETags()
Returns the list of part numbers and ETags that identify the individual
parts of the multipart upload to complete.
|
SSECustomerKey |
getSSECustomerKey()
Returns the optional customer-provided server-side encryption key to use
to encrypt the uploaded object.
|
String |
getUploadId()
Returns the ID of the multipart upload to complete.
|
CompleteMultipartUploadRequest |
ifNoneMatch(String eTag)
Uploads the object only if the object key name does not already exist in the bucket specified.
|
boolean |
isRequesterPays()
Returns true if the user has enabled Requester Pays option when
conducting this operation from Requester Pays Bucket; else false.
|
void |
setBucketName(String bucketName)
Sets the name of the bucket containing the multipart upload to complete.
|
void |
setExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
void |
setIfNoneMatch(String eTag)
Uploads the object only if the object key name does not already exist in the bucket specified.
|
void |
setKey(String key)
Sets the key under which the multipart upload to complete is stored.
|
void |
setPartETags(List<PartETag> partETags)
Sets the list of part numbers and ETags that identify the individual
parts of the multipart upload to complete.
|
void |
setRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
void |
setSSECustomerKey(SSECustomerKey sseKey)
Sets the optional customer-provided server-side encryption key to use to
encrypt the uploaded object.
|
void |
setUploadId(String uploadId)
Sets the ID of the multipart upload to complete.
|
CompleteMultipartUploadRequest |
withBucketName(String bucketName)
Sets the name of the bucket containing the multipart upload to complete,
and returns this updated CompleteMultipartUploadRequest so that
additional method calls can be chained together.
|
CompleteMultipartUploadRequest |
withExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
CompleteMultipartUploadRequest |
withKey(String key)
Sets the key under which the multipart upload to complete is stored, and
returns this updated CompleteMultipartUploadRequest object so that
additional method calls can be chained together.
|
CompleteMultipartUploadRequest |
withPartETags(Collection<UploadPartResult> uploadPartResultsCollection)
Sets the list of part numbers and ETags that identify the individual
parts of the multipart upload to complete based on the specified results
from part uploads.
|
CompleteMultipartUploadRequest |
withPartETags(List<PartETag> partETags)
Sets the list of part numbers and ETags that identify the individual
parts of the multipart upload to complete, and returns this updated
CompleteMultipartUploadRequest object so that additional method calls can be chained.
|
CompleteMultipartUploadRequest |
withPartETags(UploadPartResult... uploadPartResults)
Sets the list of part numbers and ETags that identify the individual
parts of the multipart upload to complete based on the specified results
from part uploads.
|
CompleteMultipartUploadRequest |
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
CompleteMultipartUploadRequest |
withSSECustomerKey(SSECustomerKey sseKey)
Sets the optional customer-provided server-side encryption key to use to
encrypt the uploaded object, and returns the updated request object so
that additional method calls can be chained together.
|
CompleteMultipartUploadRequest |
withUploadId(String uploadId)
Sets the ID of the multipart upload to complete, and returns this updated
CompleteMultipartUploadRequest object so that additional method calls can
be chained together.
|
addHandlerContext, clone, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public CompleteMultipartUploadRequest()
public CompleteMultipartUploadRequest(String bucketName, String key, String uploadId, List<PartETag> partETags)
bucketName
- The name of the bucket containing the multipart upload to
complete.key
- The key of the multipart upload to complete.uploadId
- The ID of the multipart upload to complete.partETags
- The list of part numbers and ETags to use when completing the
multipart upload.public String getExpectedBucketOwner()
ExpectedBucketOwnerRequest
403 (Access Denied)
error.getExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public CompleteMultipartUploadRequest withExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.withExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public void setExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.setExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public String getBucketName()
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts in the
Amazon S3 User Guide.
public void setBucketName(String bucketName)
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts in the
Amazon S3 User Guide.
bucketName
- The name of the bucket containing the multipart upload to
complete.public CompleteMultipartUploadRequest withBucketName(String bucketName)
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts in the
Amazon S3 User Guide.
bucketName
- The name of the bucket containing the multipart upload to
complete.public String getKey()
public void setKey(String key)
key
- The key under which the multipart upload to complete is
stored.public CompleteMultipartUploadRequest withKey(String key)
key
- The key under which the multipart upload to complete is
stored.public String getUploadId()
public void setUploadId(String uploadId)
uploadId
- The ID of the multipart upload to complete.public CompleteMultipartUploadRequest withUploadId(String uploadId)
uploadId
- The ID of the multipart upload to complete.public List<PartETag> getPartETags()
public void setPartETags(List<PartETag> partETags)
partETags
- The list of part numbers and ETags that identify the
individual parts of the multipart upload to complete.public CompleteMultipartUploadRequest withPartETags(List<PartETag> partETags)
partETags
- The list of part numbers and ETags that identify the
individual parts of the multipart upload to complete.public CompleteMultipartUploadRequest withPartETags(UploadPartResult... uploadPartResults)
uploadPartResults
- The list of results from the individual part uploads in the
multipart upload to complete.public CompleteMultipartUploadRequest withPartETags(Collection<UploadPartResult> uploadPartResultsCollection)
uploadPartResultsCollection
- The list of results from the individual part uploads in the
multipart upload to complete.public boolean isRequesterPays()
If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket
public void setRequesterPays(boolean isRequesterPays)
If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket.
isRequesterPays
- Enable Requester Pays option for the operation.public CompleteMultipartUploadRequest withRequesterPays(boolean isRequesterPays)
If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket.
isRequesterPays
- Enable Requester Pays option for the operation.public SSECustomerKey getSSECustomerKey()
SSECustomerKeyProvider
getSSECustomerKey
in interface SSECustomerKeyProvider
public void setSSECustomerKey(SSECustomerKey sseKey)
sseKey
- The optional customer-provided server-side encryption key to
use to encrypt the uploaded object.public CompleteMultipartUploadRequest withSSECustomerKey(SSECustomerKey sseKey)
sseKey
- The optional customer-provided server-side encryption key to
use to encrypt the uploaded object.public String getIfNoneMatch()
public void setIfNoneMatch(String eTag)
Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise,
S3 returns a 412 Precondition Failed
error.
If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict
response. On a 409 failure you should re-initiate the multipart upload with CreateMultipartUpload
and re-upload each part.
Expects the '*' (asterisk) character.
For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.
eTag
- public CompleteMultipartUploadRequest ifNoneMatch(String eTag)
Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise,
S3 returns a 412 Precondition Failed
error.
If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict
response. On a 409 failure you should re-initiate the multipart upload with CreateMultipartUpload
and re-upload each part.
Expects the '*' (asterisk) character.
For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.
eTag
-