Sha256: 144a9223d6b7450538667dcb46cb36d53ce3ff6ddd304a56d0585c7c31690d66

Contents?: true

Size: 1.3 KB

Versions: 10

Compression:

Stored size: 1.3 KB

Contents

module Fog
  module Storage
    class AWS
      class Real

        require 'fog/aws/parsers/storage/get_bucket_lifecycle'

        # Get bucket lifecycle configuration
        #
        # @param bucket_name [String] name of bucket to get lifecycle configuration for
        #
        # @return [Excon::Response] response:
        #   * body [Hash]:
        #     * Rules - object expire rules [Array]:
        #       * ID [String] - Unique identifier for the rule
        #       * Prefix [String] - Prefix identifying one or more objects to which the rule applies
        #       * Enabled [Boolean] - if rule is currently being applied
        #       * Days [Integer] - lifetime, in days, of the objects that are subject to the rule
        #
        # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlifecycle.html

        def get_bucket_lifecycle(bucket_name)
          request({
                    :expects  => 200,
                    :headers  => {},
                    :host     => "#{bucket_name}.#{@host}",
                    :idempotent => true,
                    :method   => 'GET',
                    :parser   => Fog::Parsers::Storage::AWS::GetBucketLifecycle.new,
                    :query    => {'lifecycle' => nil}
                  })
        end

      end
    end
  end
end

Version data entries

10 entries across 10 versions & 5 rubygems

Version Path
hpfog-0.0.20 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
fog-1.10.1 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
fog-test-me-1.10.0 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
fog-1.10.0 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
fog-1.9.0 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/aws/requests/storage/get_bucket_lifecycle.rb