1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #1433 from westonplatter/aws_docs

[docs::aws::storage] fixed some syntax and formatted a request
This commit is contained in:
Wesley Beary 2012-12-31 09:06:48 -08:00
commit 4a5da3a4fb
3 changed files with 22 additions and 23 deletions

View file

@ -101,7 +101,7 @@ module Fog
# required attributes: directory, key # required attributes: directory, key
# #
# @param options [Hash] # @param options [Hash]
# @options versionId [] # @option options versionId []
# @return [Boolean] true if successful # @return [Boolean] true if successful
# #
def destroy(options = {}) def destroy(options = {})

View file

@ -12,7 +12,7 @@ module Fog
# @param [String] upload_id Id of upload to add part to # @param [String] upload_id Id of upload to add part to
# @param [Array<String>] parts Array of etags as Strings for parts # @param [Array<String>] parts Array of etags as Strings for parts
# #
# @return Excon::Response # @return [Excon::Response]
# * headers (Hash) # * headers (Hash)
# * Bucket (String) -- bucket of new object # * Bucket (String) -- bucket of new object
# * ETag (String) -- etag of new object (will be needed to complete upload) # * ETag (String) -- etag of new object (will be needed to complete upload)

View file

@ -7,28 +7,27 @@ module Fog
# Copy an object from one S3 bucket to another # Copy an object from one S3 bucket to another
# #
# ==== Parameters # @param source_bucket_name [String] Name of source bucket
# * source_bucket_name<~String> - Name of source bucket # @param source_object_name [String] Name of source object
# * source_object_name<~String> - Name of source object # @param target_bucket_name [String] Name of bucket to create copy in
# * target_bucket_name<~String> - Name of bucket to create copy in # @param target_object_name [String] Name for new copy of object
# * 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
# #
# ==== Returns # @param options [Hash]:
# * response<~Excon::Response>: # @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']
# * body<~Hash>: # @option options [String] x-amz-copy_source-if-match Copies object if its etag matches this value
# * 'ETag'<~String> - etag of new object # @option options [Time] x-amz-copy_source-if-modified_since Copies object it it has been modified since this time
# * 'LastModified'<~Time> - date object was last modified # @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
#
#
# @return [Excon::Response]
# * body [Hash]:
# * ETag [String] - etag of new object
# * LastModified [Time] - date object was last modified
#
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
# #
# ==== See Also
# 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 = {}) 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) headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{CGI.escape(source_object_name)}" }.merge!(options)
request({ request({