public class InitiateMultipartUploadRequest extends AmazonWebServiceRequest implements SSECustomerKeyProvider, SSEAwsKeyManagementParamsProvider, Serializable
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 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
Modifier and Type | Field and Description |
---|---|
ObjectMetadata |
objectMetadata
Additional information about the new object being created, such as
content type, content encoding, user metadata, etc.
|
NOOP
Constructor and Description |
---|
InitiateMultipartUploadRequest(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.
|
Modifier and Type | Method and Description |
---|---|
AccessControlList |
getAccessControlList()
Returns the optional access control list for the new upload.
|
String |
getBucketName()
The name of the bucket to which to initiate the upload
|
CannedAccessControlList |
getCannedACL()
Returns the optional canned Access Control List (ACL) to set permissions
for the new object created when the multipart upload is completed.
|
String |
getKey()
Returns the key by which to store the new multipart upload, and hence,
the eventual object created from the multipart upload.
|
String |
getObjectLockLegalHoldStatus()
The Legal Hold status that you want to apply to the specified object.
|
String |
getObjectLockMode()
The Object Lock mode that you want to apply to this object.
|
Date |
getObjectLockRetainUntilDate()
The date and time when you want this object's Object Lock to expire.
|
ObjectMetadata |
getObjectMetadata()
Returns the additional information about the new object being created,
such as content type, content encoding, user metadata, etc.
|
String |
getRedirectLocation()
Gets the optional redirect location for the new object.
|
SSEAwsKeyManagementParams |
getSSEAwsKeyManagementParams()
Returns the Amazon Web Services Key Management System parameters used to encrypt the
object on server side.
|
SSECustomerKey |
getSSECustomerKey()
Returns the optional customer-provided server-side encryption key to use
to encrypt the uploaded object.
|
StorageClass |
getStorageClass()
Returns the optional storage class to use when storing this upload's data
in S3.
|
com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging |
getTagging() |
boolean |
isRequesterPays()
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 |
setKey(String key)
Sets the key by which to store the new multipart upload, and hence, the
eventual object created from the multipart upload.
|
void |
setObjectLockLegalHoldStatus(ObjectLockLegalHoldStatus objectLockLegalHoldStatus)
The Legal Hold status that you want to apply to the specified object.
|
void |
setObjectLockLegalHoldStatus(String objectLockLegalHoldStatus)
The Legal Hold status that you want to apply to the specified object.
|
void |
setObjectLockMode(ObjectLockMode objectLockMode)
The Object Lock mode that you want to apply to this object.
|
void |
setObjectLockMode(String objectLockMode)
The Object Lock mode that you want to apply to this object.
|
void |
setObjectLockRetainUntilDate(Date objectLockRetainUntilDate)
The date and time when you want this object's Object Lock to expire.
|
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 |
setSSEAwsKeyManagementParams(SSEAwsKeyManagementParams params)
Sets the Amazon Web Services 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.
|
void |
setTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagging)
Set the tags for this object.
|
InitiateMultipartUploadRequest |
withAccessControlList(AccessControlList accessControlList)
Sets the optional access control list for the new upload.
|
InitiateMultipartUploadRequest |
withBucketName(String bucketName)
The name of the bucket to which to initiate the upload
|
InitiateMultipartUploadRequest |
withCannedACL(CannedAccessControlList acl)
Sets the optional canned Access Control List (ACL) to set permissions for
the new object created when the multipart upload is completed.
|
InitiateMultipartUploadRequest |
withKey(String key)
Sets the key by which to store the new multipart upload, and hence, the
eventual object created from the multipart upload.
|
InitiateMultipartUploadRequest |
withObjectLockLegalHoldStatus(ObjectLockLegalHoldStatus objectLockLegalHoldStatus)
The Legal Hold status that you want to apply to the specified object.
|
InitiateMultipartUploadRequest |
withObjectLockLegalHoldStatus(String objectLockLegalHoldStatus)
The Legal Hold status that you want to apply to the specified object.
|
InitiateMultipartUploadRequest |
withObjectLockMode(ObjectLockMode objectLockMode)
The Object Lock mode that you want to apply to this object.
|
InitiateMultipartUploadRequest |
withObjectLockMode(String objectLockMode)
The Object Lock mode that you want to apply to this object.
|
InitiateMultipartUploadRequest |
withObjectLockRetainUntilDate(Date objectLockRetainUntilDate)
The date and time when you want this object's Object Lock to expire.
|
InitiateMultipartUploadRequest |
withObjectMetadata(ObjectMetadata objectMetadata)
Sets the additional information about the new object being created, such
as content type, content encoding, user metadata, etc.
|
InitiateMultipartUploadRequest |
withRedirectLocation(String redirectLocation)
Sets the optional redirect location for the new object.
|
InitiateMultipartUploadRequest |
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
InitiateMultipartUploadRequest |
withSSEAwsKeyManagementParams(SSEAwsKeyManagementParams sseAwsKeyManagementParams)
Sets the Amazon Web Services Key Management System parameters used to encrypt the object
on server side.
|
InitiateMultipartUploadRequest |
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.
|
InitiateMultipartUploadRequest |
withStorageClass(StorageClass storageClass)
Sets the optional storage class to use when storing this upload's data in
S3.
|
InitiateMultipartUploadRequest |
withStorageClass(String storageClass) |
InitiateMultipartUploadRequest |
withTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagging)
Set the tags for this object.
|
addHandlerContext, clone, copyBaseTo, 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 ObjectMetadata objectMetadata
public InitiateMultipartUploadRequest(String bucketName, String key)
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 using 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, or access point ARN, in which to create the new multipart
upload, and hence, the eventual object created from the
multipart upload.
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 using 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.
key
- The key by which to store the new multipart upload, and hence,
the eventual object created from the multipart upload.public InitiateMultipartUploadRequest(String bucketName, String key, ObjectMetadata objectMetadata)
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 using 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, or access point ARN, in which to create the new multipart
upload, and hence, the eventual object created from the
multipart upload.
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 using 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.
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.public String getBucketName()
The name of the bucket to which to initiate the upload
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 using 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.
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 using 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 using 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, or access point ARN, in which to create the new multipart
upload, and hence, the eventual object created from the
multipart upload.
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 using 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 InitiateMultipartUploadRequest withBucketName(String bucketName)
The name of the bucket to which to initiate the upload
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 using 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 to which to initiate the upload
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 using 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 String getKey()
public void setKey(String key)
key
- The key by which to store the new multipart upload, and hence,
the eventual object created from the multipart upload.public InitiateMultipartUploadRequest withKey(String key)
Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
key
- The key by which to store the new multipart upload, and hence,
the eventual object created from the multipart upload.public CannedAccessControlList getCannedACL()
CannedAccessControlList
public void setCannedACL(CannedAccessControlList cannedACL)
cannedACL
- The canned Access Control List (ACL) to set permissions for
the new object created when the multipart upload is completed.CannedAccessControlList
public InitiateMultipartUploadRequest withCannedACL(CannedAccessControlList acl)
Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
acl
- The optional canned Access Control List (ACL) to set
permissions for the new object created when the multipart
upload is completed.public AccessControlList getAccessControlList()
public void setAccessControlList(AccessControlList accessControlList)
accessControlList
- The access control list for the new upload.public InitiateMultipartUploadRequest withAccessControlList(AccessControlList accessControlList)
InitiateMultipartUploadRequest
,
enabling additional method calls to be chained together.accessControlList
- The access control list for the new upload.public StorageClass getStorageClass()
If not specified, the default is StorageClass.Standard
.
StorageClass
public void setStorageClass(StorageClass storageClass)
If not specified, the default is StorageClass.Standard
.
storageClass
- The optional storage class to use when storing this upload's
data in S3. If not specified, the default storage class is
used.StorageClass
public InitiateMultipartUploadRequest withStorageClass(StorageClass storageClass)
Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
storageClass
- The optional storage class to use when storing this upload's
data in S3. If not specified, the default storage class is
used.public InitiateMultipartUploadRequest withStorageClass(String storageClass)
public ObjectMetadata getObjectMetadata()
public void setObjectMetadata(ObjectMetadata objectMetadata)
objectMetadata
- Additional information about the new object being created,
such as content type, content encoding, user metadata, etc.public InitiateMultipartUploadRequest withObjectMetadata(ObjectMetadata objectMetadata)
Returns this updated InitiateMultipartUploadRequest object so that additional method calls can be chained together.
objectMetadata
- Additional information about the new object being created,
such as content type, content encoding, user metadata, etc.public void setRedirectLocation(String redirectLocation)
redirectLocation
- The redirect location for the new object.public String getRedirectLocation()
public InitiateMultipartUploadRequest withRedirectLocation(String redirectLocation)
InitiateMultipartUploadRequest
, enabling additional method calls to be chained
together.redirectLocation
- The redirect location for the new object.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 upload being started.public InitiateMultipartUploadRequest withSSECustomerKey(SSECustomerKey sseKey)
sseKey
- The optional customer-provided server-side encryption key to
use to encrypt the upload being started.public SSEAwsKeyManagementParams getSSEAwsKeyManagementParams()
getSSEAwsKeyManagementParams
in interface SSEAwsKeyManagementParamsProvider
public void setSSEAwsKeyManagementParams(SSEAwsKeyManagementParams params)
public InitiateMultipartUploadRequest withSSEAwsKeyManagementParams(SSEAwsKeyManagementParams sseAwsKeyManagementParams)
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 InitiateMultipartUploadRequest 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 com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging getTagging()
public void setTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagging)
tagging
- The tags for this object.public InitiateMultipartUploadRequest withTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagging)
tagging
- The tags for this object.public String getObjectLockMode()
public InitiateMultipartUploadRequest withObjectLockMode(String objectLockMode)
public InitiateMultipartUploadRequest withObjectLockMode(ObjectLockMode objectLockMode)
public void setObjectLockMode(String objectLockMode)
public void setObjectLockMode(ObjectLockMode objectLockMode)
public Date getObjectLockRetainUntilDate()
public InitiateMultipartUploadRequest withObjectLockRetainUntilDate(Date objectLockRetainUntilDate)
public void setObjectLockRetainUntilDate(Date objectLockRetainUntilDate)
public String getObjectLockLegalHoldStatus()
public InitiateMultipartUploadRequest withObjectLockLegalHoldStatus(String objectLockLegalHoldStatus)
public InitiateMultipartUploadRequest withObjectLockLegalHoldStatus(ObjectLockLegalHoldStatus objectLockLegalHoldStatus)
public void setObjectLockLegalHoldStatus(String objectLockLegalHoldStatus)
public void setObjectLockLegalHoldStatus(ObjectLockLegalHoldStatus objectLockLegalHoldStatus)
Copyright © 2024. All rights reserved.