Sha256: 974a4f929e752b4dea7d1d17b702bd7ff0487211343d6597811f99e2b788fca4
Contents?: true
Size: 931 Bytes
Versions: 20
Compression:
Stored size: 931 Bytes
Contents
module Fog module Storage class AWS 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'] # # ==== See Also # http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html 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' => nil} }) end end end end end
Version data entries
20 entries across 20 versions & 5 rubygems