public class CopyObjectResult extends com.amazonaws.services.s3.internal.SSEResultBase implements com.amazonaws.services.s3.internal.ObjectExpirationResult, com.amazonaws.services.s3.internal.S3RequesterChargedResult, com.amazonaws.services.s3.internal.S3VersionResult, Serializable
Contains the data returned by Amazon S3 from the
AmazonS3.copyObject(CopyObjectRequest copyObjectRequest) call.
This result may be ignored if not needed; otherwise, use this result
to access information about the new object created from the copyObject call.
| Constructor and Description |
|---|
CopyObjectResult() |
| Modifier and Type | Method and Description |
|---|---|
String |
getETag()
Gets the ETag value for the new object that was created in the
associated
CopyObjectRequest. |
Date |
getExpirationTime()
Returns the expiration time for this object, or null if it doesn't expire.
|
String |
getExpirationTimeRuleId()
Returns the
BucketLifecycleConfiguration rule ID for this
object's expiration, or null if it doesn't expire. |
Date |
getLastModifiedDate()
Gets the date the newly copied object was last modified.
|
String |
getVersionId()
Gets the version ID of the newly copied object.
|
boolean |
isRequesterCharged()
Returns true if the user has enabled Requester Pays option when
conducting this operation from Requester Pays Bucket; else false.
|
void |
setETag(String etag)
Sets the ETag value for the new object that was created from the
associated copy object request.
|
void |
setExpirationTime(Date expirationTime)
Sets the expiration time for the object.
|
void |
setExpirationTimeRuleId(String expirationTimeRuleId)
Sets the
BucketLifecycleConfiguration rule ID for this object's
expiration |
void |
setLastModifiedDate(Date lastModifiedDate)
Sets the date the newly copied object was last modified.
|
void |
setRequesterCharged(boolean isRequesterCharged)
Used for conducting this operation from a Requester Pays Bucket.
|
void |
setVersionId(String versionId)
Sets the version ID of the newly copied object.
|
getServerSideEncryption, getSSEAlgorithm, getSSECustomerAlgorithm, getSSECustomerKeyMd5, setSSEAlgorithm, setSSECustomerAlgorithm, setSSECustomerKeyMd5public String getETag()
CopyObjectRequest.setETag(String)public void setETag(String etag)
etag - The ETag value for the new object.getETag()public Date getLastModifiedDate()
setLastModifiedDate(Date)public void setLastModifiedDate(Date lastModifiedDate)
lastModifiedDate - The date the new, copied object was last modified.getLastModifiedDate()public String getVersionId()
com.amazonaws.services.s3.internal.S3VersionResultgetVersionId in interface com.amazonaws.services.s3.internal.S3VersionResultsetVersionId(String),
CompleteMultipartUploadResult.getVersionId(),
PutObjectResult.getVersionId()public void setVersionId(String versionId)
com.amazonaws.services.s3.internal.S3VersionResultsetVersionId in interface com.amazonaws.services.s3.internal.S3VersionResultversionId - The version ID of the newly copied object.getVersionId(),
CompleteMultipartUploadResult.getVersionId(),
PutObjectResult.getVersionId()public Date getExpirationTime()
getExpirationTime in interface com.amazonaws.services.s3.internal.ObjectExpirationResultpublic void setExpirationTime(Date expirationTime)
setExpirationTime in interface com.amazonaws.services.s3.internal.ObjectExpirationResultexpirationTime - The expiration time for the object.public String getExpirationTimeRuleId()
BucketLifecycleConfiguration rule ID for this
object's expiration, or null if it doesn't expire.getExpirationTimeRuleId in interface com.amazonaws.services.s3.internal.ObjectExpirationResultBucketLifecycleConfiguration.Rule.getId()public void setExpirationTimeRuleId(String expirationTimeRuleId)
BucketLifecycleConfiguration rule ID for this object's
expirationsetExpirationTimeRuleId in interface com.amazonaws.services.s3.internal.ObjectExpirationResultexpirationTimeRuleId - The rule ID for this object's expirationpublic boolean isRequesterCharged()
com.amazonaws.services.s3.internal.S3RequesterChargedResultIf a bucket is enabled for Requester Pays, then any attempt of operation 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
isRequesterCharged in interface com.amazonaws.services.s3.internal.S3RequesterChargedResultpublic void setRequesterCharged(boolean isRequesterCharged)
com.amazonaws.services.s3.internal.S3RequesterChargedResultIf a bucket is enabled for Requester Pays, then any attempt of operation from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
setRequesterCharged in interface com.amazonaws.services.s3.internal.S3RequesterChargedResultisRequesterCharged - Indicates requester is charged for this operation.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.