Sha256: 9d47e363c669d8b735da3ba986b6d67de49791e1f11fabb701698d58162726de
Contents?: true
Size: 946 Bytes
Versions: 11
Compression:
Stored size: 946 Bytes
Contents
module Fog module AWS module S3 class Real # Change versioning status for an S3 bucket # # ==== Parameters # * bucket_name<~String> - name of bucket to modify # * status<~String> - Status to change to in ['Enabled', 'Suspended'] def put_bucket_versioning(bucket_name, status) data = <<-DATA <VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Status>#{status}</Status> </VersioningConfiguration> DATA request({ :body => data, :expects => 200, :headers => {}, :host => "#{bucket_name}.#{@host}", :method => 'PUT', :query => 'versioning' }) end end class Mock def put_bucket_versioning(bucket_name, status) raise MockNotImplemented.new("Contributions welcome!") end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems