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

Merge pull request #1436 from westonplatter/master

[docs::aws::storage] reformatted fog/aws/storage/requests delete
This commit is contained in:
Wesley Beary 2013-01-02 09:56:21 -08:00
commit 21dbb3b01a
7 changed files with 48 additions and 71 deletions

View file

@ -5,15 +5,12 @@ module Fog
# Delete an S3 bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to delete
# @param bucket_name [String] name of bucket to delete
#
# ==== Returns
# * response<~Excon::Response>:
# * status<~Integer> - 204
# @return [Excon::Response] response:
# * status [Integer] - 204
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETE.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETE.html
def delete_bucket(bucket_name)
request({

View file

@ -5,15 +5,12 @@ module Fog
# Deletes the cors configuration information set for the bucket.
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to delete cors rules from
# @param bucket_name [String] name of bucket to delete cors rules from
#
# ==== Returns
# * response<~Excon::Response>:
# * status<~Integer> - 204
# @return [Excon::Response] response:
# * status [Integer] 204
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEcors.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEcors.html
def delete_bucket_cors(bucket_name)
request({

View file

@ -5,15 +5,12 @@ module Fog
# Delete lifecycle configuration for a bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to delete lifecycle configuration from
# @param bucket_name [String] name of bucket to delete lifecycle configuration from
#
# ==== Returns
# * response<~Excon::Response>:
# * status<~Integer> - 204
# @return [Excon::Response] response:
# * status [Integer] 204
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETElifecycle.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETElifecycle.html
def delete_bucket_lifecycle(bucket_name)
request({

View file

@ -5,15 +5,12 @@ module Fog
# Delete policy for a bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to delete policy from
# @param bucket_name [String] name of bucket to delete policy from
#
# ==== Returns
# * response<~Excon::Response>:
# * status<~Integer> - 204
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html
# @return [Excon::Response] response:
# * status [Integer] 204
#
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html
def delete_bucket_policy(bucket_name)
request({

View file

@ -5,15 +5,12 @@ module Fog
# Delete website configuration for a bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to delete website configuration from
# @param bucket_name [String] name of bucket to delete website configuration from
#
# ==== Returns
# * response<~Excon::Response>:
# * status<~Integer> - 204
# @return [Excon::Response] response:
# * status [Integer] 204
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEwebsite.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEwebsite.html
def delete_bucket_website(bucket_name)
request({

View file

@ -6,36 +6,31 @@ module Fog
require 'fog/aws/parsers/storage/delete_multiple_objects'
# Delete multiple objects from S3
# @note For versioned deletes, options should include a version_ids hash, which
# maps from filename to an array of versions.
# The semantics are that for each (object_name, version) tuple, the
# caller must insert the object_name and an associated version (if
# desired), so for n versions, the object must be inserted n times.
#
# ==== Parameters
# * bucket_name<~String> - Name of bucket containing object to delete
# * object_names<~Array> - Array of object names to delete
# @param bucket_name [String] Name of bucket containing object to delete
# @param object_names [Array] Array of object names to delete
#
# ==== Returns
# * response<~Excon::Response>:
# * 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
# * '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
# @return [Excon::Response] response:
# * 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
# * 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
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html
# bucket_name -- name of the bucket to use
# object_names -- filename
# For versioned deletes, options should include a version_ids hash, which
# maps from filename to an array of versions.
# The semantics are that for each (object_name, version) tuple, the
# caller must insert the object_name and an associated version (if
# desired), so for n versions, the object must be inserted n times.
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html
def delete_multiple_objects(bucket_name, object_names, options = {})
data = "<Delete>"
data << "<Quiet>true</Quiet>" if options.delete(:quiet)

View file

@ -5,16 +5,13 @@ module Fog
# Delete an object from S3
#
# ==== Parameters
# * bucket_name<~String> - Name of bucket containing object to delete
# * object_name<~String> - Name of object to delete
# @param bucket_name [String] Name of bucket containing object to delete
# @param object_name [String] Name of object to delete
#
# ==== Returns
# * response<~Excon::Response>:
# * status<~Integer> - 204
# @return [Excon::Response] response:
# * status [Integer] 204
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html
def delete_object(bucket_name, object_name, options = {})
if version_id = options.delete('versionId')