Copies a source object to a new destination in Amazon S3.
By default, all object metadata for the source object will be copied to the new destination object. The Amazon S3 Acccess Control List (ACL) is not copied to the new object; the new object will have the default Amazon S3 ACL, {@link CannedAccessControlList#Private}.
To copy an object, the caller's account must have read access to the source object and write access to the destination bucket
This method only exposes the basic options for copying an Amazon S3 object. Additional options are available by calling the {@link AmazonS3Client#copyObject(CopyObjectRequest)} method, includingconditional constraints for copying objects, setting ACLs, overwriting object metadata, etc.
@param sourceBucketName The name of the bucket containing the source object to copy. @param sourceKey The key in the source bucket under which the source object is stored. @param destinationBucketName The name of the bucket in which the new object will be created. This may be the same name as the source bucket's. @param destinationKey The key in the destination bucket under which the new object will be created. @return A {@link CopyObjectResult} object containing the informationreturned by Amazon S3 for the newly created object. @throws AmazonClientException If any errors are encountered on the client while making the request or handling the response. @throws AmazonServiceException If any errors occurred in Amazon S3 while processing the request. @see {@link AmazonS3Client#copyObject(CopyObjectRequest copyObjectRequest)}This method cannot be performed by anonymous services. You must have read access to the source object and write access to the destination bucket.
An object can be copied over itself, in which case you can update its metadata without making any other changes. @param sourceBucketName the name of the bucket that contains the original object. @param sourceObjectKey the key name of the original object. @param destinationBucketName the name of the destination bucket to which the object will be copied. @param destinationObject the object that will be created by the copy operation. If this item includes an AccessControlList setting the copied object will be assigned that ACL, otherwise the copied object will be assigned the default private ACL setting. @param replaceMetadata If this parameter is true, the copied object will be assigned the metadata values present in the destinationObject. Otherwise, the copied object will have the same metadata as the original object. @param ifModifiedSince a precondition specifying a date after which the object must have been modified, ignored if null. @param ifUnmodifiedSince a precondition specifying a date after which the object must not have been modified, ignored if null. @param ifMatchTags a precondition specifying an MD5 hash the object must match, ignored if null. @param ifNoneMatchTags a precondition specifying an MD5 hash the object must not match, ignored if null. @return a map of the header and result information returned by S3 after the object copy. The map includes the object's MD5 hash value (ETag), its size (Content-Length), and update timestamp (Last-Modified). @throws S3ServiceException
|
|
|
|
|
|
|
|
|
|