Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[docs::aws::storage] reformatted copy_object

  • Loading branch information...
commit bfd45635e84fe74c0f6b68fe39f38a70ae0598ef 1 parent bf8419b
@westonplatter westonplatter authored
Showing with 19 additions and 20 deletions.
  1. +19 −20 lib/fog/aws/requests/storage/copy_object.rb
View
39 lib/fog/aws/requests/storage/copy_object.rb
@@ -7,28 +7,27 @@ class Real
# Copy an object from one S3 bucket to another
#
- # ==== Parameters
- # * source_bucket_name<~String> - Name of source bucket
- # * source_object_name<~String> - Name of source object
- # * target_bucket_name<~String> - Name of bucket to create copy in
- # * target_object_name<~String> - Name for new copy of object
- # * options<~Hash>:
- # * 'x-amz-metadata-directive'<~String> - Specifies whether to copy metadata from source or replace with data in request. Must be in ['COPY', 'REPLACE']
- # * 'x-amz-copy_source-if-match'<~String> - Copies object if its etag matches this value
- # * 'x-amz-copy_source-if-modified_since'<~Time> - Copies object it it has been modified since this time
- # * 'x-amz-copy_source-if-none-match'<~String> - Copies object if its etag does not match this value
- # * 'x-amz-copy_source-if-unmodified-since'<~Time> - Copies object it it has not been modified since this time
- # * 'x-amz-storage-class'<~String> - Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data
+ # @param source_bucket_name [String] Name of source bucket
+ # @param source_object_name [String] Name of source object
+ # @param target_bucket_name [String] Name of bucket to create copy in
+ # @param target_object_name [String] Name for new copy of object
+ #
+ # @param options [Hash]:
+ # @option options [String] x-amz-metadata-directive Specifies whether to copy metadata from source or replace with data in request. Must be in ['COPY', 'REPLACE']
+ # @option options [String] x-amz-copy_source-if-match Copies object if its etag matches this value
+ # @option options [Time] x-amz-copy_source-if-modified_since Copies object it it has been modified since this time
+ # @option options [String] x-amz-copy_source-if-none-match Copies object if its etag does not match this value
+ # @option options [Time] x-amz-copy_source-if-unmodified-since Copies object it it has not been modified since this time
+ # @option options [String] x-amz-storage-class Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data
#
- # ==== Returns
- # * response<~Excon::Response>:
- # * body<~Hash>:
- # * 'ETag'<~String> - etag of new object
- # * 'LastModified'<~Time> - date object was last modified
+ #
+ # @return [Excon::Response]
+ # * body [Hash]:
+ # * ETag [String] - etag of new object
+ # * LastModified [Time] - date object was last modified
#
- # ==== See Also
- # http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
-
+ # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
+ #
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{CGI.escape(source_object_name)}" }.merge!(options)
request({
Please sign in to comment.
Something went wrong with that request. Please try again.