Sha256: bb569fa882d3c46b5c224e73b6bdbd5ff3c428986f20732fcde5ec2dd24f477b

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 KB

Contents

class S3Secure::CLI
  class Encryption < S3Secure::Command
    class_option :quiet, type: :boolean

    desc "list", "List bucket encryptions"
    long_desc Help.text("encryption/list")
    option :format, desc: "Format options: #{CliFormat.formats.join(', ')}"
    option :encryption, type: :boolean, desc: "Filter for encryption: all, true, false"
    def list
      S3Secure::Encryption::List.new(options).run
    end

    desc "show BUCKET", "show bucket encryption"
    long_desc Help.text("encryption/show")
    def show(bucket)
      S3Secure::Encryption::Show.new(options.merge(bucket: bucket)).run
    end

    desc "enable BUCKET", "enable bucket encryption"
    long_desc Help.text("encryption/enable")
    option :kms_key, desc: "KMS Key Id. If this is set will use sse_algorithm=aws:kms Otherwise will use sse_algorithm=AES256"
    def enable(bucket)
      S3Secure::Encryption::Enable.new(options.merge(bucket: bucket)).run
    end

    desc "disable BUCKET", "disable bucket encryption"
    long_desc Help.text("encryption/disable")
    def disable(bucket)
      S3Secure::Encryption::Disable.new(options.merge(bucket: bucket)).run
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
s3-secure-0.7.0 lib/s3_secure/cli/encryption.rb
s3-secure-0.6.1 lib/s3_secure/cli/encryption.rb
s3-secure-0.6.0 lib/s3_secure/cli/encryption.rb