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

[docs::aws::storage] WIP on get requests

This commit is contained in:
Weston Platter 2013-01-02 19:55:08 -06:00
parent 47df9f1b69
commit f02ebbd890
5 changed files with 63 additions and 77 deletions

View file

@ -7,38 +7,35 @@ module Fog
# List information about objects in an S3 bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to list object keys from
# * options<~Hash> - config arguments for list. Defaults to {}.
# * 'delimiter'<~String> - causes keys with the same string between the prefix
# @param bucket_name [String] name of bucket to list object keys from
# @param options [Hash] config arguments for list. Defaults to {}.
# @option options delimiter [String] causes keys with the same string between the prefix
# value and the first occurence of delimiter to be rolled up
# * 'marker'<~String> - limits object keys to only those that appear
# @option options marker [String] limits object keys to only those that appear
# lexicographically after its value.
# * 'max-keys'<~Integer> - limits number of object keys returned
# * 'prefix'<~String> - limits object keys to those beginning with its value.
# @option options max-keys [Integer] limits number of object keys returned
# @option options prefix [String] limits object keys to those beginning with its value.
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'Delimeter'<~String> - Delimiter specified for query
# * 'IsTruncated'<~Boolean> - Whether or not the listing is truncated
# * 'Marker'<~String> - Marker specified for query
# * 'MaxKeys'<~Integer> - Maximum number of keys specified for query
# * 'Name'<~String> - Name of the bucket
# * 'Prefix'<~String> - Prefix specified for query
# * 'CommonPrefixes'<~Array> - Array of strings for common prefixes
# * 'Contents'<~Array>:
# * 'ETag'<~String>: Etag of object
# * 'Key'<~String>: Name of object
# * 'LastModified'<~String>: Timestamp of last modification of object
# * 'Owner'<~Hash>:
# * 'DisplayName'<~String> - Display name of object owner
# * 'ID'<~String> - Id of object owner
# * 'Size'<~Integer> - Size of object
# * 'StorageClass'<~String> - Storage class of object
# @return [Excon::Response] response:
# * body [Hash]:
# * Delimeter [String] - Delimiter specified for query
# * IsTruncated [Boolean] - Whether or not the listing is truncated
# * Marker [String]- Marker specified for query
# * MaxKeys [Integer] - Maximum number of keys specified for query
# * Name [String] - Name of the bucket
# * Prefix [String] - Prefix specified for query
# * CommonPrefixes [Array] - Array of strings for common prefixes
# * Contents [Array]:
# * ETag [String] - Etag of object
# * Key [String] - Name of object
# * LastModified [String] - Timestamp of last modification of object
# * Owner [Hash]:
# * DisplayName [String] - Display name of object owner
# * ID [String] - Id of object owner
# * Size [Integer] - Size of object
# * StorageClass [String] - Storage class of object
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html
def get_bucket(bucket_name, options = {})
unless bucket_name

View file

@ -7,27 +7,24 @@ module Fog
# Get access control list for an S3 bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to get access control list for
# @param bucket_name [String] name of bucket to get access control list for
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'AccessControlPolicy'<~Hash>
# * 'Owner'<~Hash>:
# * 'DisplayName'<~String> - Display name of object owner
# * 'ID'<~String> - Id of object owner
# * 'AccessControlList'<~Array>:
# * 'Grant'<~Hash>:
# * 'Grantee'<~Hash>:
# * 'DisplayName'<~String> - Display name of grantee
# * 'ID'<~String> - Id of grantee
# @return [Excon::Response] response:
# * body [Hash]:
# * AccessControlPolicy [Hash]:
# * Owner [Hash]:
# * DisplayName [String] - Display name of object owner
# * ID [String] - Id of object owner
# * AccessControlList [Array]:
# * Grant [Hash]:
# * Grantee [Hash]:
# * DisplayName [String] - Display name of grantee
# * ID [String] - Id of grantee
# or
# * 'URI'<~String> - URI of group to grant access for
# * 'Permission'<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
# * URI [String] - URI of group to grant access for
# * Permission [String] - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETacl.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETacl.html
def get_bucket_acl(bucket_name)
unless bucket_name

View file

@ -7,23 +7,20 @@ module Fog
# Gets the CORS configuration for an S3 bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to get access control list for
# @param bucket_name [String] name of bucket to get access control list for
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'CORSConfiguration'<~Array>:
# * 'CORSRule'<~Hash>:
# * 'AllowedHeader'<~String> - Which headers are allowed in a pre-flight OPTIONS request through the Access-Control-Request-Headers header.
# * 'AllowedMethod'<~String> - Identifies an HTTP method that the domain/origin specified in the rule is allowed to execute.
# * 'AllowedOrigin'<~String> - One or more response headers that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
# * 'ExposeHeader'<~String> - One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
# * 'ID'<~String> - An optional unique identifier for the rule. The ID value can be up to 255 characters long. The IDs help you find a rule in the configuration.
# * 'MaxAgeSeconds'<~Integer> - The time in seconds that your browser is to cache the preflight response for the specified resource.
# @return [Excon::Response] response:
# * body [Hash]:
# * CORSConfiguration [Array]:
# * CORSRule [Hash]:
# * AllowedHeader [String] - Which headers are allowed in a pre-flight OPTIONS request through the Access-Control-Request-Headers header.
# * AllowedMethod [String] - Identifies an HTTP method that the domain/origin specified in the rule is allowed to execute.
# * AllowedOrigin [String] - One or more response headers that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
# * ExposeHeader [String] - One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
# * ID [String] - An optional unique identifier for the rule. The ID value can be up to 255 characters long. The IDs help you find a rule in the configuration.
# * MaxAgeSeconds [Integer] - The time in seconds that your browser is to cache the preflight response for the specified resource.
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETcors.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETcors.html
def get_bucket_cors(bucket_name)
unless bucket_name

View file

@ -7,20 +7,17 @@ module Fog
# Get bucket lifecycle configuration
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to get lifecycle configuration for
# @param bucket_name [String] name of bucket to get lifecycle configuration for
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'Rules'<~Array> - object expire rules
# * 'ID'<~String> - Unique identifier for the rule
# * 'Prefix'<~String> - Prefix identifying one or more objects to which the rule applies
# * 'Enabled'<~Boolean> - if rule is currently being applied
# * 'Days'<~Integer> - lifetime, in days, of the objects that are subject to the rule
# @return [Excon::Response] response:
# * body [Hash]:
# * Rules - object expire rules [Array]:
# * ID [String] - Unique identifier for the rule
# * Prefix [String] - Prefix identifying one or more objects to which the rule applies
# * Enabled [Boolean] - if rule is currently being applied
# * Days [Integer] - lifetime, in days, of the objects that are subject to the rule
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlifecycle.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlifecycle.html
def get_bucket_lifecycle(bucket_name)
request({

View file

@ -7,11 +7,9 @@ module Fog
# Get location constraint for an S3 bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to get location constraint for
# @param bucket_name [String] - name of bucket to get location constraint for
#
# ==== Returns
# * response<~Excon::Response>:
# @return response [Excon::Response]:
# * body<~Hash>:
# * 'LocationConstraint'<~String> - Location constraint of the bucket
#