mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[docs::aws::storage] requests finished changing RDoc to Yard
This commit is contained in:
parent
f9f2ebc8f3
commit
db0310f474
5 changed files with 56 additions and 69 deletions
|
@ -5,30 +5,27 @@ module Fog
|
||||||
|
|
||||||
# Create an object in an S3 bucket
|
# Create an object in an S3 bucket
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# @param bucket_name [String] Name of bucket to create object in
|
||||||
# * bucket_name<~String> - Name of bucket to create object in
|
# @param object_name [String] Name of object to create
|
||||||
# * object_name<~String> - Name of object to create
|
# @param data [File||String] File or String to create object from
|
||||||
# * data<~File||String> - File or String to create object from
|
# @param options [Hash]
|
||||||
# * options<~Hash>:
|
# @option options Cache-Control [String] Caching behaviour
|
||||||
# * 'Cache-Control'<~String> - Caching behaviour
|
# @option options Content-Disposition [String] Presentational information for the object
|
||||||
# * 'Content-Disposition'<~String> - Presentational information for the object
|
# @option options Content-Encoding [String] Encoding of object data
|
||||||
# * 'Content-Encoding'<~String> - Encoding of object data
|
# @option options Content-Length [String] Size of object in bytes (defaults to object.read.length)
|
||||||
# * 'Content-Length'<~String> - Size of object in bytes (defaults to object.read.length)
|
# @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message
|
||||||
# * 'Content-MD5'<~String> - Base64 encoded 128-bit MD5 digest of message
|
# @option options Content-Type [String] Standard MIME type describing contents (defaults to MIME::Types.of.first)
|
||||||
# * 'Content-Type'<~String> - Standard MIME type describing contents (defaults to MIME::Types.of.first)
|
# @option options Expires [String] Cache expiry
|
||||||
# * 'Expires'<~String> - Cache expiry
|
# @option options x-amz-acl [String] Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
||||||
# * 'x-amz-acl'<~String> - Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
# @option options x-amz-storage-class [String] Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data
|
||||||
# * 'x-amz-storage-class'<~String> - Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data
|
# @option options x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB.
|
||||||
# * "x-amz-meta-#{name}" - Headers to be returned with object, note total size of request without body must be less than 8 KB.
|
|
||||||
#
|
#
|
||||||
# ==== Returns
|
# @return [Excon::Response] response:
|
||||||
# * response<~Excon::Response>:
|
# * headers [Hash]:
|
||||||
# * headers<~Hash>:
|
# * ETag [String] etag of new object
|
||||||
# * 'ETag'<~String> - etag of new object
|
|
||||||
#
|
|
||||||
# ==== See Also
|
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html
|
|
||||||
#
|
#
|
||||||
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html
|
||||||
|
|
||||||
def put_object(bucket_name, object_name, data, options = {})
|
def put_object(bucket_name, object_name, data, options = {})
|
||||||
data = Fog::Storage.parse_data(data)
|
data = Fog::Storage.parse_data(data)
|
||||||
headers = data[:headers].merge!(options)
|
headers = data[:headers].merge!(options)
|
||||||
|
|
|
@ -7,28 +7,26 @@ module Fog
|
||||||
|
|
||||||
# Change access control list for an S3 object
|
# Change access control list for an S3 object
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# @param bucket_name [String] name of bucket to modify
|
||||||
# * bucket_name<~String> - name of bucket to modify
|
# @param object_name [String] name of object to get access control list for
|
||||||
# * object_name<~String> - name of object to get access control list for
|
# @param acl [Hash]:
|
||||||
# * acl<~Hash>:
|
# * Owner [Hash]
|
||||||
# * Owner<~Hash>:
|
# * ID [String] id of owner
|
||||||
# * ID<~String>: id of owner
|
# * DisplayName [String] display name of owner
|
||||||
# * DisplayName<~String>: display name of owner
|
# * AccessControlList [Array]
|
||||||
# * AccessControlList<~Array>:
|
# * Grantee [Hash]
|
||||||
# * Grantee<~Hash>:
|
# * DisplayName [String] Display name of grantee
|
||||||
# * 'DisplayName'<~String> - Display name of grantee
|
# * ID [String] Id of grantee
|
||||||
# * 'ID'<~String> - Id of grantee
|
|
||||||
# or
|
# or
|
||||||
# * 'EmailAddress'<~String> - Email address of grantee
|
# * EmailAddress [String] Email address of grantee
|
||||||
# or
|
# or
|
||||||
# * 'URI'<~String> - URI of group to grant access for
|
# * URI [String] URI of group to grant access for
|
||||||
# * Permission<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
# * Permission [String] Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
||||||
# * acl<~String> - Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
# @param acl [String] Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
||||||
# * options<~Hash>:
|
# @param options [Hash]
|
||||||
# * 'versionId'<~String> - specify a particular version to retrieve
|
# @option options versionId [String] specify a particular version to retrieve
|
||||||
#
|
#
|
||||||
# ==== See Also
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUTacl.html
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUTacl.html
|
|
||||||
|
|
||||||
def put_object_acl(bucket_name, object_name, acl, options = {})
|
def put_object_acl(bucket_name, object_name, acl, options = {})
|
||||||
query = {'acl' => nil}
|
query = {'acl' => nil}
|
||||||
|
|
|
@ -25,17 +25,14 @@ module Fog
|
||||||
|
|
||||||
# Get an expiring object url from S3 for putting an object
|
# Get an expiring object url from S3 for putting an object
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# @param bucket_name [String] Name of bucket containing object
|
||||||
# * bucket_name<~String> - Name of bucket containing object
|
# @param object_name [String] Name of object to get expiring url for
|
||||||
# * object_name<~String> - Name of object to get expiring url for
|
# @param expires [Time] An expiry time for this url
|
||||||
# * expires<~Time> - An expiry time for this url
|
|
||||||
#
|
#
|
||||||
# ==== Returns
|
# @return [Excon::Response] response:
|
||||||
# * response<~Excon::Response>:
|
# * body [String] url for object
|
||||||
# * body<~String> - url for object
|
|
||||||
#
|
#
|
||||||
# ==== See Also
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
|
||||||
|
|
||||||
include PutObjectUrl
|
include PutObjectUrl
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,10 @@ module Fog
|
||||||
|
|
||||||
# Change who pays for requests to an S3 bucket
|
# Change who pays for requests to an S3 bucket
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# @param bucket_name [String] name of bucket to modify
|
||||||
# * bucket_name<~String> - name of bucket to modify
|
# @param payer [String] valid values are BucketOwner or Requester
|
||||||
# * payer<~String> - valid values are BucketOwner or Requester
|
|
||||||
#
|
#
|
||||||
# ==== See Also
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html
|
|
||||||
|
|
||||||
def put_request_payment(bucket_name, payer)
|
def put_request_payment(bucket_name, payer)
|
||||||
data =
|
data =
|
||||||
|
|
|
@ -5,22 +5,19 @@ module Fog
|
||||||
|
|
||||||
# Upload a part for a multipart upload
|
# Upload a part for a multipart upload
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# @param bucket_name [String] Name of bucket to add part to
|
||||||
# * bucket_name<~String> - Name of bucket to add part to
|
# @param object_name [String] Name of object to add part to
|
||||||
# * object_name<~String> - Name of object to add part to
|
# @param upload_id [String] Id of upload to add part to
|
||||||
# * upload_id<~String> - Id of upload to add part to
|
# @param part_number [String] Index of part in upload
|
||||||
# * part_number<~String> - Index of part in upload
|
# @param data [File||String] Content for part
|
||||||
# * data<~File||String> - Content for part
|
# @param options [Hash]
|
||||||
# * options<~Hash>:
|
# @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message
|
||||||
# * 'Content-MD5'<~String> - Base64 encoded 128-bit MD5 digest of message
|
|
||||||
#
|
#
|
||||||
# ==== Returns
|
# @return [Excon::Response] response
|
||||||
# * response<~Excon::Response>:
|
# * headers [Hash]:
|
||||||
# * headers<~Hash>:
|
# * ETag [String] etag of new object (will be needed to complete upload)
|
||||||
# * 'ETag'<~String> - etag of new object (will be needed to complete upload)
|
|
||||||
#
|
#
|
||||||
# ==== See Also
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html
|
|
||||||
#
|
#
|
||||||
def upload_part(bucket_name, object_name, upload_id, part_number, data, options = {})
|
def upload_part(bucket_name, object_name, upload_id, part_number, data, options = {})
|
||||||
data = Fog::Storage.parse_data(data)
|
data = Fog::Storage.parse_data(data)
|
||||||
|
|
Loading…
Reference in a new issue