2009-07-13 22:14:59 -04:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class S3
|
|
|
|
|
|
|
|
# Delete an object from S3
|
2009-07-20 22:47:48 -04:00
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * bucket_name<~String> - Name of bucket containing object to delete
|
|
|
|
# * object_name<~String> - Name of object to delete
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Fog::AWS::Response>:
|
|
|
|
# * status<~Integer> - 204
|
2009-07-13 22:14:59 -04:00
|
|
|
def delete_object(bucket_name, object_name)
|
|
|
|
request({
|
2009-07-14 19:04:39 -04:00
|
|
|
:expects => 204,
|
2009-07-13 22:14:59 -04:00
|
|
|
:headers => {},
|
|
|
|
:host => "#{bucket_name}.#{@host}",
|
|
|
|
:method => 'DELETE',
|
|
|
|
:path => object_name
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|