Sha256: a358e2c77e352456cb1d65b5e2a4289e6d2034b8de593d64a7318acdaa6b20a5

Contents?: true

Size: 995 Bytes

Versions: 1

Compression:

Stored size: 995 Bytes

Contents

module S3Secure
  class Policy < Command
    class_option :quiet, type: :boolean

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

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

    desc "enforce_ssl BUCKET", "Add enforce ssl bucket policy"
    long_desc Help.text("policy/enforce_ssl")
    def enforce_ssl(bucket)
      Enforce.new(options.merge(bucket: bucket, sid: "ForceSSLOnlyAccess")).run
    end

    desc "unforce_ssl BUCKET", "Remove enforce ssl bucket policy"
    long_desc Help.text("policy/unforce_ssl")
    def unforce_ssl(bucket)
      Unforce.new(options.merge(bucket: bucket, sid: "ForceSSLOnlyAccess")).run
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
s3-secure-0.5.1 lib/s3_secure/policy.rb