    # File lib/fog/aws/requests/storage/put_bucket_lifecycle.rb, line 19
            def put_bucket_lifecycle(bucket_name, lifecycle)
              builder = Nokogiri::XML::Builder.new do
                LifecycleConfiguration {
                  lifecycle['Rules'].each do |rule|
                    Rule {
                      ID rule['ID']
                      Prefix rule['Prefix']
                      Status rule['Enabled'] ? 'Enabled' : 'Disabled'
                      Expiration { Days rule['Days'] }
                    }
                  end
                }
              end

              body = builder.to_xml

              request({
                        :body     => body,
                        :expects  => 200,
                        :headers  => {'Content-MD5' => Base64.encode64(Digest::MD5.digest(body)).chomp!,
                          'Content-Type' => 'application/xml'},
                        :host     => "#{bucket_name}.#{@host}",
                        :method   => 'PUT',
                        :query    => {'lifecycle' => nil}
                      })
            end