mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1443 from westonplatter/master
[docs::aws::storage] rdoc to yard formatted all get requests
This commit is contained in:
commit
d9d72c3aeb
25 changed files with 237 additions and 292 deletions
|
@ -13,11 +13,11 @@ module Fog
|
|||
# @param [Array<String>] parts Array of etags as Strings for parts
|
||||
#
|
||||
# @return [Excon::Response]
|
||||
# * headers (Hash)
|
||||
# * Bucket (String) -- bucket of new object
|
||||
# * ETag (String) -- etag of new object (will be needed to complete upload)
|
||||
# * Key (String) -- key of new object
|
||||
# * Location (String) -- location of new object
|
||||
# * headers [Hash]:
|
||||
# * Bucket [String] - bucket of new object
|
||||
# * ETag [String] - etag of new object (will be needed to complete upload)
|
||||
# * Key [String] - key of new object
|
||||
# * Location [String] - location of new object
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadComplete.html
|
||||
#
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# @param bucket_name [String] name of bucket to delete cors rules from
|
||||
#
|
||||
# @return [Excon::Response] response:
|
||||
# * status [Integer] 204
|
||||
# * status [Integer] - 204
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEcors.html
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# @param bucket_name [String] name of bucket to delete lifecycle configuration from
|
||||
#
|
||||
# @return [Excon::Response] response:
|
||||
# * status [Integer] 204
|
||||
# * status [Integer] - 204
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETElifecycle.html
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# @param bucket_name [String] name of bucket to delete policy from
|
||||
#
|
||||
# @return [Excon::Response] response:
|
||||
# * status [Integer] 204
|
||||
# * status [Integer] - 204
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Fog
|
|||
# @param bucket_name [String] name of bucket to delete website configuration from
|
||||
#
|
||||
# @return [Excon::Response] response:
|
||||
# * status [Integer] 204
|
||||
# * status [Integer] - 204
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEwebsite.html
|
||||
|
||||
|
|
|
@ -19,15 +19,15 @@ module Fog
|
|||
# * body [Hash]:
|
||||
# * DeleteResult [Array]:
|
||||
# * Deleted [Hash]:
|
||||
# * Key [String] Name of the object that was deleted
|
||||
# * VersionId [String] ID for the versioned onject in case of a versioned delete
|
||||
# * DeleteMarker [Boolean] Indicates if the request accessed a delete marker
|
||||
# * DeleteMarkerVersionId [String] Version ID of the delete marker accessed
|
||||
# * Key [String] - Name of the object that was deleted
|
||||
# * VersionId [String] - ID for the versioned onject in case of a versioned delete
|
||||
# * DeleteMarker [Boolean] - Indicates if the request accessed a delete marker
|
||||
# * DeleteMarkerVersionId [String] - Version ID of the delete marker accessed
|
||||
# * Error [Hash]:
|
||||
# * Key [String] Name of the object that failed to be deleted
|
||||
# * VersionId [String] ID of the versioned object that was attempted to be deleted
|
||||
# * Code [String] Status code for the result of the failed delete
|
||||
# * Message [String] Error description
|
||||
# * Key [String] - Name of the object that failed to be deleted
|
||||
# * VersionId [String] - ID of the versioned object that was attempted to be deleted
|
||||
# * Code [String] - Status code for the result of the failed delete
|
||||
# * Message [String] - Error description
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ module Fog
|
|||
# @param object_name [String] Name of object to delete
|
||||
#
|
||||
# @return [Excon::Response] response:
|
||||
# * status [Integer] 204
|
||||
# * status [Integer] - 204
|
||||
#
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -7,16 +7,13 @@ 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>:
|
||||
# * body<~Hash>:
|
||||
# * 'LocationConstraint'<~String> - Location constraint of the bucket
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * LocationConstraint [String] - Location constraint of the bucket
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlocation.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlocation.html
|
||||
|
||||
def get_bucket_location(bucket_name)
|
||||
request({
|
||||
|
|
|
@ -7,27 +7,24 @@ module Fog
|
|||
|
||||
# Get logging status for an S3 bucket
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - name of bucket to get logging status for
|
||||
# @param bucket_name [String] name of bucket to get logging status for
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# * 'BucketLoggingStatus'<~Hash>: (will be empty if logging is disabled)
|
||||
# * 'LoggingEnabled'<~Hash>:
|
||||
# * 'TargetBucket'<~String> - bucket where logs are stored
|
||||
# * 'TargetPrefix'<~String> - prefix logs are stored with
|
||||
# * 'TargetGrants'<~Array>:
|
||||
# * 'Grant'<~Hash>:
|
||||
# * 'Grantee'<~Hash>:
|
||||
# * 'DisplayName'<~String> - Display name of grantee
|
||||
# * 'ID'<~String> - Id of grantee
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * BucketLoggingStatus (will be empty if logging is disabled) [Hash]:
|
||||
# * LoggingEnabled [Hash]:
|
||||
# * TargetBucket [String] - bucket where logs are stored
|
||||
# * TargetPrefix [String] - prefix logs are stored with
|
||||
# * TargetGrants [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/RESTBucketGETlogging.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlogging.html
|
||||
|
||||
def get_bucket_logging(bucket_name)
|
||||
unless bucket_name
|
||||
|
|
|
@ -7,52 +7,46 @@ module Fog
|
|||
|
||||
# List information about object versions 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
|
||||
# value and the first occurence of delimiter to be rolled up
|
||||
# * 'key-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.
|
||||
# * 'version-id-marker'<~String> - limits object versions to only those that
|
||||
# appear lexicographically after its value
|
||||
# @param bucket_name [String] name of bucket to list object keys from
|
||||
# @param options [Hash] config arguments for list
|
||||
# @option options delimiter [String] causes keys with the same string between the prefix value and the first occurence of delimiter to be rolled up
|
||||
# @option options key-marker [String] limits object keys to only those that appear lexicographically after 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.
|
||||
# @option options version-id-marker [String] limits object versions to only those that appear lexicographically after its value
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# * 'Delimeter'<~String> - Delimiter specified for query
|
||||
# * 'KeyMarker'<~String> - Key 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
|
||||
# * 'VersionIdMarker'<~String> - Version id marker specified for query
|
||||
# * 'IsTruncated'<~Boolean> - Whether or not this is the totality of the bucket
|
||||
# * 'Versions'<~Array>:
|
||||
# * 'DeleteMarker'<~Hash>:
|
||||
# * 'IsLatest'<~Boolean> - Whether or not this is the latest version
|
||||
# * '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
|
||||
# * 'VersionId'<~String> - The id of this version
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * Delimeter [String] - Delimiter specified for query
|
||||
# * KeyMarker [String] - Key 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
|
||||
# * VersionIdMarker [String] - Version id marker specified for query
|
||||
# * IsTruncated [Boolean] - Whether or not this is the totality of the bucket
|
||||
# * Versions [Array]:
|
||||
# * DeleteMarker [Hash]:
|
||||
# * IsLatest [Boolean] - Whether or not this is the latest version
|
||||
# * 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
|
||||
# * VersionId [String] - The id of this version
|
||||
# or
|
||||
# * 'Version'<~Hash>:
|
||||
# * 'ETag'<~String>: Etag of object
|
||||
# * 'IsLatest'<~Boolean> - Whether or not this is the latest version
|
||||
# * '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
|
||||
# * 'VersionId'<~String> - The id of this version
|
||||
# * Version [Hash]:
|
||||
# * ETag [String]: Etag of object
|
||||
# * IsLatest [Boolean] - Whether or not this is the latest version
|
||||
# * 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
|
||||
# * VersionId [String] - The id of this version
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETVersion.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETVersion.html
|
||||
|
||||
def get_bucket_object_versions(bucket_name, options = {})
|
||||
unless bucket_name
|
||||
|
|
|
@ -5,15 +5,12 @@ module Fog
|
|||
|
||||
# Get bucket policy for an S3 bucket
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - name of bucket to get policy for
|
||||
# @param bucket_name [String] name of bucket to get policy for
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash> - policy document
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash] - policy document
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETpolicy.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETpolicy.html
|
||||
|
||||
def get_bucket_policy(bucket_name)
|
||||
unless bucket_name
|
||||
|
|
|
@ -7,17 +7,14 @@ module Fog
|
|||
|
||||
# Get versioning status for an S3 bucket
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - name of bucket to get versioning status for
|
||||
# @param bucket_name [String] name of bucket to get versioning status for
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# * 'VersioningConfiguration'<~Hash>
|
||||
# * Status<~String>: Versioning status in ['Enabled', 'Suspended', nil]
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * VersioningConfiguration [Hash]:
|
||||
# * Status [String] - Versioning status in ['Enabled', 'Suspended', nil]
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETversioningStatus.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETversioningStatus.html
|
||||
|
||||
def get_bucket_versioning(bucket_name)
|
||||
unless bucket_name
|
||||
|
|
|
@ -7,19 +7,17 @@ module Fog
|
|||
|
||||
# Get website configuration for an S3 bucket
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - name of bucket to get website configuration for
|
||||
#
|
||||
# @param bucket_name [String] name of bucket to get website configuration for
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# * IndexDocument<~Hash>
|
||||
# * Suffix<~String> - Suffix appended when directory is requested
|
||||
# * ErrorDocument<~Hash>
|
||||
# * Key<~String> - Object key to return for 4XX class errors
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * IndexDocument [Hash]:
|
||||
# * Suffix [String] - Suffix appended when directory is requested
|
||||
# * ErrorDocument [Hash]:
|
||||
# * Key [String] - Object key to return for 4XX class errors
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETwebsite.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETwebsite.html
|
||||
|
||||
def get_bucket_website(bucket_name)
|
||||
unless bucket_name
|
||||
|
|
|
@ -5,28 +5,25 @@ module Fog
|
|||
|
||||
# Get an object from S3
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - Name of bucket to read from
|
||||
# * object_name<~String> - Name of object to read
|
||||
# * options<~Hash>:
|
||||
# * 'If-Match'<~String> - Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed).
|
||||
# * 'If-Modified-Since'<~Time> - Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified).
|
||||
# * 'If-None-Match'<~String> - Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified)
|
||||
# * 'If-Unmodified-Since'<~Time> - Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed).
|
||||
# * 'Range'<~String> - Range of object to download
|
||||
# * 'versionId'<~String> - specify a particular version to retrieve
|
||||
# @param bucket_name [String] Name of bucket to read from
|
||||
# @param object_name [String] Name of object to read
|
||||
# @param options [Hash]
|
||||
# @option options If-Match [String] Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed).
|
||||
# @option options If-Modified-Since [Time] Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified).
|
||||
# @option options If-None-Match [String] Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified)
|
||||
# @option options If-Unmodified-Since [Time] Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed).
|
||||
# @option options Range [String] Range of object to download
|
||||
# @option options versionId [String] specify a particular version to retrieve
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~String> - Contents of object
|
||||
# * headers<~Hash>:
|
||||
# * 'Content-Length'<~String> - Size of object contents
|
||||
# * 'Content-Type'<~String> - MIME type of object
|
||||
# * 'ETag'<~String> - Etag of object
|
||||
# * 'Last-Modified'<~String> - Last modified timestamp for object
|
||||
# @return [Excon::Response] response:
|
||||
# * body [String]- Contents of object
|
||||
# * headers [Hash]:
|
||||
# * Content-Length [String] - Size of object contents
|
||||
# * Content-Type [String] - MIME type of object
|
||||
# * ETag [String] - Etag of object
|
||||
# * Last-Modified [String] - Last modified timestamp for object
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGET.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGET.html
|
||||
|
||||
def get_object(bucket_name, object_name, options = {}, &block)
|
||||
unless bucket_name
|
||||
|
|
|
@ -7,30 +7,27 @@ module Fog
|
|||
|
||||
# Get access control list for an S3 object
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - name of bucket containing object
|
||||
# * object_name<~String> - name of object to get access control list for
|
||||
# * options<~Hash>:
|
||||
# * 'versionId'<~String> - specify a particular version to retrieve
|
||||
# @param bucket_name [String] name of bucket containing object
|
||||
# @param object_name [String] name of object to get access control list for
|
||||
# @param options [Hash]
|
||||
# @option options versionId [String] specify a particular version to retrieve
|
||||
#
|
||||
# ==== 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/RESTObjectGETacl.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGETacl.html
|
||||
|
||||
def get_object_acl(bucket_name, object_name, options = {})
|
||||
unless bucket_name
|
||||
|
|
|
@ -32,17 +32,14 @@ module Fog
|
|||
|
||||
# Get an expiring object http url from S3
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - Name of bucket containing object
|
||||
# * object_name<~String> - Name of object to get expiring url for
|
||||
# * expires<~Time> - An expiry time for this url
|
||||
# @param bucket_name [String] Name of bucket containing object
|
||||
# @param object_name [String] Name of object to get expiring url for
|
||||
# @param expires [Time] An expiry time for this url
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~String> - url for object
|
||||
# @return [Excon::Response] response:
|
||||
# * body [String] - url for object
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
||||
|
||||
include GetObjectHttpUrl
|
||||
|
||||
|
|
|
@ -14,17 +14,14 @@ module Fog
|
|||
|
||||
# Get an expiring object https url from S3
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - Name of bucket containing object
|
||||
# * object_name<~String> - Name of object to get expiring url for
|
||||
# * expires<~Time> - An expiry time for this url
|
||||
# @param bucket_name [String] Name of bucket containing object
|
||||
# @param object_name [String] Name of object to get expiring url for
|
||||
# @param expires [Time] An expiry time for this url
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~String> - url for object
|
||||
# @return [Excon::Response] response:
|
||||
# * body [String] - url for object
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
||||
|
||||
include GetObjectHttpsUrl
|
||||
|
||||
|
|
|
@ -5,26 +5,23 @@ module Fog
|
|||
|
||||
# Get torrent for an S3 object
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - name of bucket containing object
|
||||
# * object_name<~String> - name of object to get torrent for
|
||||
# @param bucket_name [String] name of bucket containing object
|
||||
# @param object_name [String] name of object to get torrent 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
|
||||
# * 'Permission'<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
||||
# @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
|
||||
# * Permission [String] - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGETtorrent.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGETtorrent.html
|
||||
|
||||
def get_object_torrent(bucket_name, object_name)
|
||||
unless bucket_name
|
||||
|
|
|
@ -32,17 +32,14 @@ module Fog
|
|||
|
||||
# Get an expiring object url from S3
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - Name of bucket containing object
|
||||
# * object_name<~String> - Name of object to get expiring url for
|
||||
# * expires<~Time> - An expiry time for this url
|
||||
# @param bucket_name [String] Name of bucket containing object
|
||||
# @param object_name [String] Name of object to get expiring url for
|
||||
# @param expires [Time] An expiry time for this url
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~String> - url for object
|
||||
# @return [Excon::Response] response:
|
||||
# * body [String] - url for object
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
|
||||
|
||||
include GetObjectUrl
|
||||
|
||||
|
|
|
@ -7,16 +7,13 @@ module Fog
|
|||
|
||||
# Get configured payer for an S3 bucket
|
||||
#
|
||||
# ==== Parameters
|
||||
# * bucket_name<~String> - name of bucket to get payer for
|
||||
# @param bucket_name [String] name of bucket to get payer for
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# * 'Payer'<~String> - Specifies who pays for download and requests
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * Payer [String] - Specifies who pays for download and requests
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentGET.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentGET.html
|
||||
|
||||
def get_request_payment(bucket_name)
|
||||
request({
|
||||
|
|
|
@ -7,18 +7,16 @@ module Fog
|
|||
|
||||
# List information about S3 buckets for authorized user
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# * 'Buckets'<~Hash>:
|
||||
# * 'Name'<~String> - Name of bucket
|
||||
# * 'CreationTime'<~Time> - Timestamp of bucket creation
|
||||
# * 'Owner'<~Hash>:
|
||||
# * 'DisplayName'<~String> - Display name of bucket owner
|
||||
# * 'ID'<~String> - Id of bucket owner
|
||||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * Buckets [Hash]:
|
||||
# * Name [String] - Name of bucket
|
||||
# * CreationTime [Time] - Timestamp of bucket creation
|
||||
# * Owner [Hash]:
|
||||
# * DisplayName [String] - Display name of bucket owner
|
||||
# * ID [String] - Id of bucket owner
|
||||
#
|
||||
# ==== See Also
|
||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTServiceGET.html
|
||||
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTServiceGET.html
|
||||
#
|
||||
def get_service
|
||||
request({
|
||||
|
|
Loading…
Add table
Reference in a new issue