Sha256: 7d484675c752733b1ec5999409b3634f7a836331d43d9e1b3255d739f1d48c86

Contents?: true

Size: 554 Bytes

Versions: 6

Compression:

Stored size: 554 Bytes

Contents

class S3Secure::Encryption
  class Disable < Base
    def run
      @s3 = s3_regional_client(@bucket)

      list = S3Secure::Encryption::List.new(@options)
      list.set_s3(@s3)

      rules = list.get_encryption_rules(@bucket)
      if rules
        @s3.delete_bucket_encryption(bucket: @bucket) # returns resp = #<struct Aws::EmptyStructure>
        puts "Bucket #{@bucket} encryption has been removed"
      else
        puts "WARN: Bucket #{@bucket} is not configured with encryption at the bucket level".color(:yellow)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
s3-secure-0.4.2 lib/s3_secure/encryption/disable.rb
s3-secure-0.4.1 lib/s3_secure/encryption/disable.rb
s3-secure-0.4.0 lib/s3_secure/encryption/disable.rb
s3-secure-0.3.0 lib/s3_secure/encryption/disable.rb
s3-secure-0.2.0 lib/s3_secure/encryption/disable.rb
s3-secure-0.1.0 lib/s3_secure/encryption/disable.rb