Class InitiateMultipartUploadRequest
- All Implemented Interfaces:
ReadLimitInfo
,SSEAwsKeyManagementParamsProvider
,SSECustomerKeyProvider
,Serializable
,Cloneable
- Direct Known Subclasses:
EncryptedInitiateMultipartUploadRequest
If you are initiating multipart upload for KMS-encrypted objects, you need to specify the correct region of the bucket on your client and configure AWS 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
-
Field Summary
FieldsModifier and TypeFieldDescriptionAdditional information about the new object being created, such as content type, content encoding, user metadata, etc.Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionInitiateMultipartUploadRequest
(String bucketName, String key) Constructs a request to initiate a new multipart upload in the specified bucket, stored by the specified key.InitiateMultipartUploadRequest
(String bucketName, String key, ObjectMetadata objectMetadata) Constructs a request to initiate a new multipart upload in the specified bucket, stored by the specified key, and with the additional specified object metadata. -
Method Summary
Modifier and TypeMethodDescriptionReturns the optional access control list for the new upload.Returns the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.Returns the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.getKey()
Returns the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.Returns the additional information about the new object being created, such as content type, content encoding, user metadata, etc.Gets the optional redirect location for the new object.Returns the AWS Key Management System parameters used to encrypt the object on server side.Returns the optional customer-provided server-side encryption key to use to encrypt the uploaded object.Returns the optional storage class to use when storing this upload's data in S3.boolean
Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.void
setAccessControlList
(AccessControlList accessControlList) Sets the optional access control list for the new upload.void
setBucketName
(String bucketName) Sets the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.void
setCannedACL
(CannedAccessControlList cannedACL) Sets the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.void
Sets the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.void
setObjectMetadata
(ObjectMetadata objectMetadata) Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.void
setRedirectLocation
(String redirectLocation) Sets the optional redirect location for the new object.void
setRequesterPays
(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket.void
Sets the AWS Key Management System parameters used to encrypt the object on server side.void
setSSECustomerKey
(SSECustomerKey sseKey) Sets the optional customer-provided server-side encryption key to use to encrypt the upload being started.void
setStorageClass
(StorageClass storageClass) Sets the optional storage class to use when storing this upload's data in S3.withAccessControlList
(AccessControlList accessControlList) Sets the optional access control list for the new upload.withBucketName
(String bucketName) Sets the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.Sets the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.Sets the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.withObjectMetadata
(ObjectMetadata objectMetadata) Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.withRedirectLocation
(String redirectLocation) Sets the optional redirect location for the new object.withRequesterPays
(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket.withSSEAwsKeyManagementParams
(SSEAwsKeyManagementParams sseAwsKeyManagementParams) Sets the AWS Key Management System parameters used to encrypt the object on server side.withSSECustomerKey
(SSECustomerKey sseKey) Sets the optional customer-provided server-side encryption key to use to encrypt the upload being started, and returns the updated InitiateMultipartUploadRequest so that additional method calls may be chained together.withStorageClass
(StorageClass storageClass) Sets the optional storage class to use when storing this upload's data in S3.withStorageClass
(String storageClass) Methods inherited from class com.amazonaws.AmazonWebServiceRequest
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Field Details
-
objectMetadata
Additional information about the new object being created, such as content type, content encoding, user metadata, etc.
-
-
Constructor Details
-
InitiateMultipartUploadRequest
Constructs a request to initiate a new multipart upload in the specified bucket, stored by the specified key.- Parameters:
bucketName
- The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.key
- The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
-
InitiateMultipartUploadRequest
Constructs a request to initiate a new multipart upload in the specified bucket, stored by the specified key, and with the additional specified object metadata.- Parameters:
bucketName
- The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.key
- The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.objectMetadata
- Additional information about the new object being created, such as content type, content encoding, user metadata, etc.
-
-
Method Details
-
getBucketName
Returns the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.- Returns:
- The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.
-
setBucketName
Sets the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.- Parameters:
bucketName
- The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.
-
withBucketName
Sets the name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
- Parameters:
bucketName
- The name of the bucket in which to create the new multipart upload, and hence, the eventual object created from the multipart upload.- Returns:
- This updated InitiateMultipartUploadRequest object.
-
getKey
Returns the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.- Returns:
- The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
-
setKey
Sets the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.- Parameters:
key
- The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.
-
withKey
Sets the key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
- Parameters:
key
- The key by which to store the new multipart upload, and hence, the eventual object created from the multipart upload.- Returns:
- This updated InitiateMultipartUploadRequest object.
-
getCannedACL
Returns the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.- Returns:
- The optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.
- See Also:
-
setCannedACL
Sets the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.- Parameters:
cannedACL
- The canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.- See Also:
-
withCannedACL
Sets the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
- Parameters:
acl
- The optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.- Returns:
- This updated InitiateMultipartUploadRequest object.
-
getAccessControlList
Returns the optional access control list for the new upload. If specified, cannedAcl will be ignored. -
setAccessControlList
Sets the optional access control list for the new upload. If specified, cannedAcl will be ignored.- Parameters:
accessControlList
- The access control list for the new upload.
-
withAccessControlList
Sets the optional access control list for the new upload. If specified, cannedAcl will be ignored. Returns thisInitiateMultipartUploadRequest
, enabling additional method calls to be chained together.- Parameters:
accessControlList
- The access control list for the new upload.
-
getStorageClass
Returns the optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.If not specified, the default is
StorageClass.Standard
.- Returns:
- The optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.
- See Also:
-
setStorageClass
Sets the optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.If not specified, the default is
StorageClass.Standard
.- Parameters:
storageClass
- The optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.- See Also:
-
withStorageClass
Sets the optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
- Parameters:
storageClass
- The optional storage class to use when storing this upload's data in S3. If not specified, the default storage class is used.- Returns:
- This updated InitiateMultipartUploadRequest object.
-
withStorageClass
-
getObjectMetadata
Returns the additional information about the new object being created, such as content type, content encoding, user metadata, etc.- Returns:
- The additional information about the new object being created, such as content type, content encoding, user metadata, etc.
-
setObjectMetadata
Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.- Parameters:
objectMetadata
- Additional information about the new object being created, such as content type, content encoding, user metadata, etc.
-
withObjectMetadata
Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
- Parameters:
objectMetadata
- Additional information about the new object being created, such as content type, content encoding, user metadata, etc.- Returns:
- This updated InitiateMultipartUploadRequest object.
-
setRedirectLocation
Sets the optional redirect location for the new object.- Parameters:
redirectLocation
- The redirect location for the new object.
-
getRedirectLocation
Gets the optional redirect location for the new object. -
withRedirectLocation
Sets the optional redirect location for the new object. Returns thisInitiateMultipartUploadRequest
, enabling additional method calls to be chained together.- Parameters:
redirectLocation
- The redirect location for the new object.
-
getSSECustomerKey
Description copied from interface:SSECustomerKeyProvider
Returns the optional customer-provided server-side encryption key to use to encrypt the uploaded object.- Specified by:
getSSECustomerKey
in interfaceSSECustomerKeyProvider
- Returns:
- The optional customer-provided server-side encryption key to use to encrypt the uploaded object.
-
setSSECustomerKey
Sets the optional customer-provided server-side encryption key to use to encrypt the upload being started.- Parameters:
sseKey
- The optional customer-provided server-side encryption key to use to encrypt the upload being started.
-
withSSECustomerKey
Sets the optional customer-provided server-side encryption key to use to encrypt the upload being started, and returns the updated InitiateMultipartUploadRequest so that additional method calls may be chained together.- Parameters:
sseKey
- The optional customer-provided server-side encryption key to use to encrypt the upload being started.- Returns:
- The updated request object, so that additional method calls can be chained together.
-
getSSEAwsKeyManagementParams
Returns the AWS Key Management System parameters used to encrypt the object on server side.- Specified by:
getSSEAwsKeyManagementParams
in interfaceSSEAwsKeyManagementParamsProvider
- Returns:
- The optional SSEAwsKeyManagementParams to use to encrypt the uploaded object.
-
setSSEAwsKeyManagementParams
Sets the AWS Key Management System parameters used to encrypt the object on server side. -
withSSEAwsKeyManagementParams
public InitiateMultipartUploadRequest withSSEAwsKeyManagementParams(SSEAwsKeyManagementParams sseAwsKeyManagementParams) Sets the AWS Key Management System parameters used to encrypt the object on server side.- Returns:
- returns the update InitiateMultipartUploadRequest
-
isRequesterPays
public boolean isRequesterPays()Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.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
- Returns:
- true if the user has enabled Requester Pays option for conducting this operation from Requester Pays Bucket.
-
setRequesterPays
public void setRequesterPays(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket.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.
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.
-
withRequesterPays
Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket. It returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.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.
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.- Returns:
- The updated InitiateMultipartUploadRequest object.
-