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

View file

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

View file

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

View file

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

View file

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

View file

@ -6,36 +6,31 @@ module Fog
require 'fog/aws/parsers/storage/delete_multiple_objects' require 'fog/aws/parsers/storage/delete_multiple_objects'
# Delete multiple objects from S3 # 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 # @param bucket_name [String] Name of bucket containing object to delete
# * bucket_name<~String> - Name of bucket containing object to delete # @param object_names [Array] Array of object names to delete
# * object_names<~Array> - Array of object names to delete
# #
# ==== Returns # @return [Excon::Response] response:
# * response<~Excon::Response>: # * body [Hash]:
# * body<~Hash>: # * DeleteResult [Array]:
# * 'DeleteResult'<~Array>: # * Deleted [Hash]:
# * 'Deleted'<~Hash>: # * Key [String] Name of the object that was deleted
# * 'Key'<~String> - Name of the object that was deleted # * VersionId [String] ID for the versioned onject in case of a versioned delete
# * 'VersionId'<~String> - ID for the versioned onject in case of a versioned delete # * DeleteMarker [Boolean] Indicates if the request accessed a delete marker
# * 'DeleteMarker'<~Boolean> - Indicates if the request accessed a delete marker # * DeleteMarkerVersionId [String] Version ID of the delete marker accessed
# * 'DeleteMarkerVersionId'<~String> - Version ID of the delete marker accessed # * Error [Hash]:
# * 'Error'<~Hash>: # * Key [String] Name of the object that failed to be deleted
# * 'Key'<~String> - Name of the object that failed to be deleted # * VersionId [String] ID of the versioned object that was attempted 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
# * 'Code'<~String> - Status code for the result of the failed delete # * Message [String] Error description
# * 'Message'<~String> - Error description
# #
# ==== See Also # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html
# 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.
def delete_multiple_objects(bucket_name, object_names, options = {}) def delete_multiple_objects(bucket_name, object_names, options = {})
data = "<Delete>" data = "<Delete>"
data << "<Quiet>true</Quiet>" if options.delete(:quiet) data << "<Quiet>true</Quiet>" if options.delete(:quiet)

View file

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