2011-02-23 16:57:51 -05:00
|
|
|
module Fog
|
2011-06-15 17:26:43 -04:00
|
|
|
module Storage
|
|
|
|
class AWS
|
2011-02-23 16:57:51 -05:00
|
|
|
class Real
|
|
|
|
|
|
|
|
# Delete policy for a bucket
|
|
|
|
#
|
2012-12-31 21:33:14 -05:00
|
|
|
# @param bucket_name [String] name of bucket to delete policy from
|
2011-02-23 16:57:51 -05:00
|
|
|
#
|
2012-12-31 21:33:14 -05:00
|
|
|
# @return [Excon::Response] response:
|
2013-01-02 20:42:54 -05:00
|
|
|
# * status [Integer] - 204
|
2012-12-31 21:33:14 -05:00
|
|
|
#
|
|
|
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html
|
2011-02-23 16:57:51 -05:00
|
|
|
|
|
|
|
def delete_bucket_policy(bucket_name)
|
|
|
|
request({
|
|
|
|
:expects => 204,
|
|
|
|
:headers => {},
|
|
|
|
:host => "#{bucket_name}.#{@host}",
|
|
|
|
:method => 'DELETE',
|
|
|
|
:query => {'policy' => nil}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|