Package com.amazonaws.services.s3.model
Class CopyObjectResult
java.lang.Object
com.amazonaws.services.s3.internal.SSEResultBase
com.amazonaws.services.s3.model.CopyObjectResult
- All Implemented Interfaces:
com.amazonaws.services.s3.internal.ObjectExpirationResult
,com.amazonaws.services.s3.internal.S3RequesterChargedResult
,com.amazonaws.services.s3.internal.S3VersionResult
,com.amazonaws.services.s3.internal.ServerSideEncryptionResult
,Serializable
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetETag()
Gets the ETag value for the new object that was created in the associatedCopyObjectRequest
.Returns the expiration time for this object, or null if it doesn't expire.Returns theBucketLifecycleConfiguration
rule ID for this object's expiration, or null if it doesn't expire.Gets the date the newly copied object was last modified.Gets the version ID of the newly copied object.boolean
Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.void
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 theBucketLifecycleConfiguration
rule ID for this object's expirationvoid
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.Methods inherited from class com.amazonaws.services.s3.internal.SSEResultBase
getServerSideEncryption, getSSEAlgorithm, getSSECustomerAlgorithm, getSSECustomerKeyMd5, setSSEAlgorithm, setSSECustomerAlgorithm, setSSECustomerKeyMd5
-
Constructor Details
-
CopyObjectResult
public CopyObjectResult()
-
-
Method Details
-
getETag
Gets the ETag value for the new object that was created in the associatedCopyObjectRequest
.- Returns:
- The ETag value for the new object.
- See Also:
-
setETag
Sets the ETag value for the new object that was created from the associated copy object request.- Parameters:
etag
- The ETag value for the new object.- See Also:
-
getLastModifiedDate
Gets the date the newly copied object was last modified.- Returns:
- The date the newly copied object was last modified.
- See Also:
-
setLastModifiedDate
Sets the date the newly copied object was last modified.- Parameters:
lastModifiedDate
- The date the new, copied object was last modified.- See Also:
-
getVersionId
Description copied from interface:com.amazonaws.services.s3.internal.S3VersionResult
Gets the version ID of the newly copied object. This field is only present if object versioning has been enabled for the bucket the object was copied to.- Specified by:
getVersionId
in interfacecom.amazonaws.services.s3.internal.S3VersionResult
- Returns:
- The version ID of the newly copied object.
- See Also:
-
setVersionId
Description copied from interface:com.amazonaws.services.s3.internal.S3VersionResult
Sets the version ID of the newly copied object.- Specified by:
setVersionId
in interfacecom.amazonaws.services.s3.internal.S3VersionResult
- Parameters:
versionId
- The version ID of the newly copied object.- See Also:
-
getExpirationTime
Returns the expiration time for this object, or null if it doesn't expire.- Specified by:
getExpirationTime
in interfacecom.amazonaws.services.s3.internal.ObjectExpirationResult
-
setExpirationTime
Sets the expiration time for the object.- Specified by:
setExpirationTime
in interfacecom.amazonaws.services.s3.internal.ObjectExpirationResult
- Parameters:
expirationTime
- The expiration time for the object.
-
getExpirationTimeRuleId
Returns theBucketLifecycleConfiguration
rule ID for this object's expiration, or null if it doesn't expire.- Specified by:
getExpirationTimeRuleId
in interfacecom.amazonaws.services.s3.internal.ObjectExpirationResult
- See Also:
-
setExpirationTimeRuleId
Sets theBucketLifecycleConfiguration
rule ID for this object's expiration- Specified by:
setExpirationTimeRuleId
in interfacecom.amazonaws.services.s3.internal.ObjectExpirationResult
- Parameters:
expirationTimeRuleId
- The rule ID for this object's expiration
-
isRequesterCharged
public boolean isRequesterCharged()Description copied from interface:com.amazonaws.services.s3.internal.S3RequesterChargedResult
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 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
- Specified by:
isRequesterCharged
in interfacecom.amazonaws.services.s3.internal.S3RequesterChargedResult
- Returns:
- true if the user has enabled Requester Pays option for conducting this operation from Requester Pays Bucket.
-
setRequesterCharged
public void setRequesterCharged(boolean isRequesterCharged) Description copied from interface:com.amazonaws.services.s3.internal.S3RequesterChargedResult
Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for conducting the operation from the bucket.If 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.
- Specified by:
setRequesterCharged
in interfacecom.amazonaws.services.s3.internal.S3RequesterChargedResult
- Parameters:
isRequesterCharged
- Indicates requester is charged for this operation.
-