Sha256: f0163afaa2202130ff295dc853a44dd813e0a0e8e29be88277be53904d4842ec

Contents?: true

Size: 1.75 KB

Versions: 38

Compression:

Stored size: 1.75 KB

Contents

module Fog
  module Storage
    class AWS
      class Real

        require 'fog/aws/parsers/storage/get_bucket_logging'

        # Get logging status for an S3 bucket
        #
        # ==== Parameters
        # * bucket_name<~String> - name of bucket to get logging status for
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'BucketLoggingStatus'<~Hash>: (will be empty if logging is disabled)
        #       * 'LoggingEnabled'<~Hash>:
        #         * 'TargetBucket'<~String> - bucket where logs are stored
        #         * 'TargetPrefix'<~String> - prefix logs are stored with
        #         * 'TargetGrants'<~Array>:
        #           * 'Grant'<~Hash>:
        #             * 'Grantee'<~Hash>:
        #                 * 'DisplayName'<~String> - Display name of grantee
        #                 * 'ID'<~String> - Id of grantee
        #               or
        #                 * 'URI'<~String> - URI of group to grant access for
        #             * 'Permission'<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlogging.html

        def get_bucket_logging(bucket_name)
          unless bucket_name
            raise ArgumentError.new('bucket_name is required')
          end
          request({
            :expects    => 200,
            :headers    => {},
            :host       => "#{bucket_name}.#{@host}",
            :idempotent => true,
            :method     => 'GET',
            :parser     => Fog::Parsers::Storage::AWS::GetBucketLogging.new,
            :query      => {'logging' => nil}
          })
        end

      end
    end
  end
end

Version data entries

38 entries across 38 versions & 13 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-nirvanix-1.8.1 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-parser-fix-1.6.1 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-test-again-1.6.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-parser-fix-1.6.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-sgonyea-1.8.1 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-1.8.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-1.7.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-1.6.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-1.5.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-1.4.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_logging.rb
michiels-fog-1.3.1 lib/fog/aws/requests/storage/get_bucket_logging.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/aws/requests/storage/get_bucket_logging.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-1.3.1 lib/fog/aws/requests/storage/get_bucket_logging.rb
fog-1.3.0 lib/fog/aws/requests/storage/get_bucket_logging.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/storage/get_bucket_logging.rb