public abstract class AbstractPutObjectRequest extends AmazonWebServiceRequest implements Cloneable, SSECustomerKeyProvider, SSEAwsKeyManagementParamsProvider, S3DataSource, Serializable
S3DataSource.Utils
NOOP
Modifier | Constructor and Description |
---|---|
|
AbstractPutObjectRequest(String bucketName,
String key,
File file)
Constructs a new
AbstractPutObjectRequest object to upload a file to the
specified bucket and key. |
protected |
AbstractPutObjectRequest(String bucketName,
String key,
InputStream input,
ObjectMetadata metadata)
Constructs a new
AbstractPutObjectRequest object to upload a stream of data to
the specified bucket and key. |
|
AbstractPutObjectRequest(String bucketName,
String key,
String redirectLocation)
Constructs a new
AbstractPutObjectRequest object with redirect location. |
Modifier and Type | Method and Description |
---|---|
AbstractPutObjectRequest |
clone()
Specifies whether the client should use an S3 Bucket Key for object encryption with server-side encryption using Amazon Web Services KMS
(SSE-KMS).
|
protected <T extends AbstractPutObjectRequest> |
copyPutObjectBaseTo(T target) |
AccessControlList |
getAccessControlList()
Returns the optional access control list for the new object.
|
String |
getBucketName()
The bucket name to which the PUT action was initiated.
|
CannedAccessControlList |
getCannedAcl()
Gets the optional pre-configured access control policy to use for the
new object.
|
File |
getFile()
Gets the path and name of the file
containing the data to be uploaded to Amazon S3.
|
InputStream |
getInputStream()
Gets the input stream containing the data to be uploaded to Amazon S3.
|
String |
getKey()
Gets the key under which to store the new object.
|
ObjectMetadata |
getMetadata()
Gets the optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g.
|
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.
|
ProgressListener |
getProgressListener()
Deprecated.
use
AmazonWebServiceRequest.getGeneralProgressListener() instead. |
String |
getRedirectLocation()
Gets the optional redirect location for the new object.
|
Date |
getRetentionExpirationDate() |
String |
getRetentionLegalHoldId() |
Long |
getRetentionPeriod() |
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.
|
String |
getStorageClass()
Gets the optional Amazon S3 storage class to use when storing the new
object.
|
com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging |
getTagging() |
void |
setAccessControlList(AccessControlList accessControlList)
Sets the optional access control list for the new object.
|
void |
setBucketName(String bucketName)
The bucket name to which the PUT action was initiated.
|
void |
setCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional pre-configured access control policy to use for the new
object.
|
void |
setFile(File file)
Sets the path and name of the file
containing the data to be uploaded to Amazon S3.
|
void |
setInputStream(InputStream inputStream)
Sets the input stream containing the data to be uploaded to Amazon S3.
|
void |
setKey(String key)
Sets the key under which to store the new object.
|
void |
setMetadata(ObjectMetadata metadata)
Sets the optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g.
|
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 |
setProgressListener(ProgressListener progressListener)
Deprecated.
|
void |
setRedirectLocation(String redirectLocation)
Sets the optional redirect location for the new object.
|
void |
setRetentionExpirationDate(Date retentionExpirationDate) |
void |
setRetentionLegalHoldId(String retentionLegalHoldId) |
void |
setRetentionPeriod(long retentionPeriod) |
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 uploaded object.
|
void |
setStorageClass(StorageClass storageClass)
Sets the optional Amazon S3 storage class to use when storing the new
object.
|
void |
setStorageClass(String storageClass)
Sets the optional Amazon S3 storage class to use when storing the new
object.
|
void |
setTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagging) |
<T extends AbstractPutObjectRequest> |
withAccessControlList(AccessControlList accessControlList)
Sets the optional access control list for the new object.
|
<T extends AbstractPutObjectRequest> |
withBucketName(String bucketName)
The bucket name to which the PUT action was initiated.
|
<T extends AbstractPutObjectRequest> |
withCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional pre-configured access control policy to use for the new
object.
|
<T extends AbstractPutObjectRequest> |
withFile(File file)
Sets the file containing the data to be uploaded to Amazon S3.
|
<T extends AbstractPutObjectRequest> |
withInputStream(InputStream inputStream)
Sets the input stream containing the data to be uploaded to Amazon S3.
|
<T extends AbstractPutObjectRequest> |
withKey(String key)
Sets the key under which to store the new object.
|
<T extends AbstractPutObjectRequest> |
withMetadata(ObjectMetadata metadata)
Sets the optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g.
|
<T extends PutObjectRequest> |
withObjectLockLegalHoldStatus(ObjectLockLegalHoldStatus objectLockLegalHoldStatus)
The Legal Hold status that you want to apply to the specified object.
|
<T extends PutObjectRequest> |
withObjectLockLegalHoldStatus(String objectLockLegalHoldStatus)
The Legal Hold status that you want to apply to the specified object.
|
<T extends PutObjectRequest> |
withObjectLockMode(ObjectLockMode objectLockMode)
The Object Lock mode that you want to apply to this object.
|
<T extends PutObjectRequest> |
withObjectLockMode(String objectLockMode)
The Object Lock mode that you want to apply to this object.
|
<T extends PutObjectRequest> |
withObjectLockRetainUntilDate(Date objectLockRetainUntilDate)
The date and time when you want this object's Object Lock to expire.
|
<T extends AbstractPutObjectRequest> |
withProgressListener(ProgressListener progressListener)
Deprecated.
|
<T extends AbstractPutObjectRequest> |
withRedirectLocation(String redirectLocation)
Sets the optional redirect location for the new object.Returns this
AbstractPutObjectRequest , enabling additional method calls to be chained
together. |
<T extends AbstractPutObjectRequest> |
withSSEAwsKeyManagementParams(SSEAwsKeyManagementParams sseAwsKeyManagementParams)
Sets the Amazon Web Services Key Management System parameters used to encrypt the object
on server side.
|
<T extends AbstractPutObjectRequest> |
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.
|
<T extends AbstractPutObjectRequest> |
withStorageClass(StorageClass storageClass)
Sets the optional Amazon S3 storage class to use when storing the new
object.
|
<T extends AbstractPutObjectRequest> |
withStorageClass(String storageClass)
Sets the optional Amazon S3 storage class to use when storing the new
object.
|
<T extends PutObjectRequest> |
withTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagSet) |
addHandlerContext, 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 AbstractPutObjectRequest(String bucketName, String key, File file)
AbstractPutObjectRequest
object to upload a file to the
specified bucket and key. After constructing the request,
users may optionally specify object metadata or a canned ACL as well.
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 an existing bucket to which the new object will be uploaded.
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 under which to store the new object.file
- The path of the file to upload to Amazon S3.public AbstractPutObjectRequest(String bucketName, String key, String redirectLocation)
AbstractPutObjectRequest
object with redirect location.
After constructing the request, users may optionally specify object
metadata or a canned ACL as well.
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 an existing bucket to which the new object will be
uploaded.
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 under which to store the new object.redirectLocation
- The redirect location of this new object.protected AbstractPutObjectRequest(String bucketName, String key, InputStream input, ObjectMetadata metadata)
AbstractPutObjectRequest
object to upload a stream of data to
the specified bucket and key. After constructing the request,
users may optionally specify object metadata or a canned ACL as well.
Content length for the data stream must be specified in the object metadata parameter; Amazon S3 requires it be passed in before the data is uploaded. Failure to specify a content length will cause the entire contents of the input stream to be buffered locally in memory so that the content length can be calculated, which can result in negative performance problems.
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 an existing bucket to which the new object will be
uploaded.
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 under which to store the new object.input
- The stream of data to upload to Amazon S3.metadata
- The object metadata. At minimum this specifies the
content length for the stream of data being uploaded.public String getBucketName()
The bucket name to which the PUT action was initiated.
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.
AbstractPutObjectRequest.setBucketName(String)
,
AbstractPutObjectRequest.withBucketName(String)
public void setBucketName(String bucketName)
The bucket name to which the PUT action was initiated.
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 bucket name to which the PUT action was initiated.
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.
AbstractPutObjectRequest.getBucketName()
,
AbstractPutObjectRequest.withBucketName(String)
public <T extends AbstractPutObjectRequest> T withBucketName(String bucketName)
The bucket name to which the PUT action was initiated.
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 bucket name to which the PUT action was initiated.
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.
AbstractPutObjectRequest
, enabling additional method calls to be
chained together.AbstractPutObjectRequest.getBucketName()
,
AbstractPutObjectRequest.setBucketName(String)
public String getKey()
AbstractPutObjectRequest.setKey(String)
,
AbstractPutObjectRequest.withKey(String)
public void setKey(String key)
key
- The key under which to store the new object.AbstractPutObjectRequest.getKey()
,
AbstractPutObjectRequest.withKey(String)
public <T extends AbstractPutObjectRequest> T withKey(String key)
key
- The key under which to store the new object.AbstractPutObjectRequest
, enabling additional method calls to be
chained together.AbstractPutObjectRequest.getKey()
,
AbstractPutObjectRequest.setKey(String)
public String getStorageClass()
For more information on available Amazon S3 storage classes, see the
StorageClass
enumeration.
AbstractPutObjectRequest.setStorageClass(String)
,
AbstractPutObjectRequest.setStorageClass(StorageClass)
,
AbstractPutObjectRequest.withStorageClass(StorageClass)
,
AbstractPutObjectRequest.withStorageClass(String)
public void setStorageClass(String storageClass)
For more information on Amazon S3 storage classes and available values,
see the StorageClass
enumeration.
storageClass
- The storage class to use when storing the new object.AbstractPutObjectRequest.getStorageClass()
,
AbstractPutObjectRequest.setStorageClass(String)
,
AbstractPutObjectRequest.withStorageClass(StorageClass)
,
AbstractPutObjectRequest.withStorageClass(String)
public <T extends AbstractPutObjectRequest> T withStorageClass(String storageClass)
AbstractPutObjectRequest
, enabling additional method
calls to be chained together. If not specified, the default standard
storage class will be used when storing the object.
For more information on Amazon S3 storage classes and available values,
see the StorageClass
enumeration.
storageClass
- The storage class to use when storing the new object.AbstractPutObjectRequest
, enabling additional method calls to be
chained together.AbstractPutObjectRequest.getStorageClass()
,
AbstractPutObjectRequest.setStorageClass(StorageClass)
,
AbstractPutObjectRequest.setStorageClass(String)
,
AbstractPutObjectRequest.withStorageClass(StorageClass)
public void setStorageClass(StorageClass storageClass)
For more information on Amazon S3 storage classes and available values,
see the StorageClass
enumeration.
storageClass
- The storage class to use when storing the new object.AbstractPutObjectRequest.getStorageClass()
,
AbstractPutObjectRequest.setStorageClass(String)
public <T extends AbstractPutObjectRequest> T withStorageClass(StorageClass storageClass)
AbstractPutObjectRequest
, enabling additional method
calls to be chained together. If not specified, the default standard
storage class will be used when storing the object.
For more information on Amazon S3 storage classes and available values,
see the StorageClass
enumeration.
storageClass
- The storage class to use when storing the new object.AbstractPutObjectRequest
, enabling additional method calls to be
chained together.AbstractPutObjectRequest.getStorageClass()
,
AbstractPutObjectRequest.setStorageClass(StorageClass)
,
AbstractPutObjectRequest.setStorageClass(String)
,
AbstractPutObjectRequest.withStorageClass(String)
public File getFile()
getFile
in interface S3DataSource
AbstractPutObjectRequest.setFile(File)
,
AbstractPutObjectRequest.withFile(File)
,
AbstractPutObjectRequest.setInputStream(InputStream)
,
AbstractPutObjectRequest.withInputStream(InputStream)
public void setFile(File file)
setFile
in interface S3DataSource
file
- The path and name of the
file containing the data to be uploaded to Amazon S3.AbstractPutObjectRequest.getFile()
,
AbstractPutObjectRequest.withFile(File)
,
AbstractPutObjectRequest.getInputStream()
,
AbstractPutObjectRequest.withInputStream(InputStream)
public <T extends AbstractPutObjectRequest> T withFile(File file)
AbstractPutObjectRequest
, enabling additional method
calls to be chained together.
Either specify a file or an input stream containing the data to be uploaded to Amazon S3; both cannot be specified.
file
- The file containing the data to be uploaded to Amazon S3.AbstractPutObjectRequest
, enabling additional method
calls to be chained together.AbstractPutObjectRequest.getFile()
,
AbstractPutObjectRequest.setFile(File)
,
AbstractPutObjectRequest.getInputStream()
,
AbstractPutObjectRequest.setInputStream(InputStream)
public ObjectMetadata getMetadata()
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Amazon S3. This can cause very negative performance impacts.
AbstractPutObjectRequest.setMetadata(ObjectMetadata)
,
AbstractPutObjectRequest.withMetadata(ObjectMetadata)
public void setMetadata(ObjectMetadata metadata)
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Amazon S3. This can cause very negative performance impacts.
metadata
- The optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g. custom user metadata, hooks for specifying
content type, etc.).AbstractPutObjectRequest.getMetadata()
,
AbstractPutObjectRequest.withMetadata(ObjectMetadata)
public <T extends AbstractPutObjectRequest> T withMetadata(ObjectMetadata metadata)
AbstractPutObjectRequest
, enabling additional method
calls to be chained together.
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Amazon S3. This can cause very negative performance impacts.
metadata
- The optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g. custom user metadata, hooks for specifying
content type, etc.).AbstractPutObjectRequest
, enabling additional method
calls to be chained together.AbstractPutObjectRequest.getMetadata()
,
AbstractPutObjectRequest.setMetadata(ObjectMetadata)
public CannedAccessControlList getCannedAcl()
AbstractPutObjectRequest.setCannedAcl(CannedAccessControlList)
,
AbstractPutObjectRequest.withCannedAcl(CannedAccessControlList)
public void setCannedAcl(CannedAccessControlList cannedAcl)
cannedAcl
- The optional pre-configured access control policy to use for
the new object.AbstractPutObjectRequest.getCannedAcl()
,
AbstractPutObjectRequest.withCannedAcl(CannedAccessControlList)
public <T extends AbstractPutObjectRequest> T withCannedAcl(CannedAccessControlList cannedAcl)
AbstractPutObjectRequest
, enabling additional method
calls to be chained together.cannedAcl
- The optional pre-configured access control policy to use for
the new object.AbstractPutObjectRequest
, enabling additional method
calls to be chained together.AbstractPutObjectRequest.getCannedAcl()
,
AbstractPutObjectRequest.setCannedAcl(CannedAccessControlList)
public AccessControlList getAccessControlList()
public void setAccessControlList(AccessControlList accessControlList)
accessControlList
- The access control list for the new object.public <T extends AbstractPutObjectRequest> T withAccessControlList(AccessControlList accessControlList)
AbstractPutObjectRequest
,
enabling additional method calls to be chained together.accessControlList
- The access control list for the new object.public InputStream getInputStream()
getInputStream
in interface S3DataSource
AbstractPutObjectRequest.setInputStream(InputStream)
,
AbstractPutObjectRequest.withInputStream(InputStream)
,
AbstractPutObjectRequest.setFile(File)
,
AbstractPutObjectRequest.withFile(File)
public void setInputStream(InputStream inputStream)
setInputStream
in interface S3DataSource
inputStream
- The input stream containing the data to be uploaded to Amazon
S3. Either specify a file or an input stream containing the
data to be uploaded to Amazon S3, not both.AbstractPutObjectRequest.getInputStream()
,
AbstractPutObjectRequest.withInputStream(InputStream)
,
AbstractPutObjectRequest.getFile()
,
AbstractPutObjectRequest.withFile(File)
public <T extends AbstractPutObjectRequest> T withInputStream(InputStream inputStream)
AbstractPutObjectRequest
, enabling additional method
calls to be chained together.
Either specify a file or an input stream containing the data to be uploaded to Amazon S3; both cannot be specified.
inputStream
- The InputStream containing the data to be uploaded to Amazon
S3.AbstractPutObjectRequest.getInputStream()
,
AbstractPutObjectRequest.setInputStream(InputStream)
,
AbstractPutObjectRequest.getFile()
,
AbstractPutObjectRequest.setFile(File)
public void setRedirectLocation(String redirectLocation)
redirectLocation
- The redirect location for the new object.public String getRedirectLocation()
public <T extends AbstractPutObjectRequest> T withRedirectLocation(String redirectLocation)
AbstractPutObjectRequest
, 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 uploaded object.public <T extends AbstractPutObjectRequest> T withSSECustomerKey(SSECustomerKey sseKey)
sseKey
- The optional customer-provided server-side encryption key to
use to encrypt the uploaded object.public com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging getTagging()
public void setTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagging)
public <T extends PutObjectRequest> T withTagging(com.ibm.cloud.objectstorage.services.s3.model.ObjectTagging tagSet)
public String getObjectLockMode()
public <T extends PutObjectRequest> T withObjectLockMode(String objectLockMode)
public <T extends PutObjectRequest> T withObjectLockMode(ObjectLockMode objectLockMode)
public void setObjectLockMode(String objectLockMode)
public void setObjectLockMode(ObjectLockMode objectLockMode)
public Date getObjectLockRetainUntilDate()
public <T extends PutObjectRequest> T withObjectLockRetainUntilDate(Date objectLockRetainUntilDate)
public void setObjectLockRetainUntilDate(Date objectLockRetainUntilDate)
public String getObjectLockLegalHoldStatus()
public <T extends PutObjectRequest> T withObjectLockLegalHoldStatus(String objectLockLegalHoldStatus)
public <T extends PutObjectRequest> T withObjectLockLegalHoldStatus(ObjectLockLegalHoldStatus objectLockLegalHoldStatus)
public void setObjectLockLegalHoldStatus(String objectLockLegalHoldStatus)
public void setObjectLockLegalHoldStatus(ObjectLockLegalHoldStatus objectLockLegalHoldStatus)
@Deprecated public void setProgressListener(ProgressListener progressListener)
AmazonWebServiceRequest.setGeneralProgressListener(ProgressListener)
instead.progressListener
- The legacy progress listener that is used exclusively for Amazon S3 client.@Deprecated public ProgressListener getProgressListener()
AmazonWebServiceRequest.getGeneralProgressListener()
instead.@Deprecated public <T extends AbstractPutObjectRequest> T withProgressListener(ProgressListener progressListener)
AmazonWebServiceRequest.withGeneralProgressListener(ProgressListener)
instead.progressListener
- The legacy progress listener that is used exclusively for Amazon S3 client.public SSEAwsKeyManagementParams getSSEAwsKeyManagementParams()
getSSEAwsKeyManagementParams
in interface SSEAwsKeyManagementParamsProvider
public void setSSEAwsKeyManagementParams(SSEAwsKeyManagementParams params)
public <T extends AbstractPutObjectRequest> T withSSEAwsKeyManagementParams(SSEAwsKeyManagementParams sseAwsKeyManagementParams)
public AbstractPutObjectRequest clone()
true
causes the client to use an S3 Bucket Key for object encryption with
SSE-KMS.
Specifying this header with a PUT operation doesn't affect bucket-level settings for S3 Bucket Key.
clone
in class AmazonWebServiceRequest
Object.clone()
protected final <T extends AbstractPutObjectRequest> T copyPutObjectBaseTo(T target)
public Date getRetentionExpirationDate()
public void setRetentionExpirationDate(Date retentionExpirationDate)
public String getRetentionLegalHoldId()
public void setRetentionLegalHoldId(String retentionLegalHoldId)
public Long getRetentionPeriod()
public void setRetentionPeriod(long retentionPeriod)
Copyright © 2024. All rights reserved.