# File lib/fog/aws/requests/storage/put_bucket_website.rb, line 15
        def put_bucket_website(bucket_name, options, options_to_be_deprecated = {})
          options ||= {}

          # Method used to be called with the suffix as the second parameter. Warn user that this is not the case any more and move on
          if options.is_a?(String)
            Fog::Logger.deprecation("put_bucket_website with #{options.class} param is deprecated, use put_bucket_website('#{bucket_name}', :IndexDocument => '#{options}') instead [light_black](#{caller.first})[/]")
            options = { :IndexDocument => options }
          end

          # Parameter renamed from "key" to "ErrorDocument"
          if options_to_be_deprecated[:key]
            Fog::Logger.deprecation("put_bucket_website with three parameters is deprecated, use put_bucket_website('#{bucket_name}', :ErrorDocument => '#{options_to_be_deprecated[:key]}') instead [light_black](#{caller.first})[/]")
            options[:ErrorDocument] = options_to_be_deprecated[:key]
          end

          options.merge!(options_to_be_deprecated) { |key, o1, o2| o1 }

          data = "<WebsiteConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\">"

          if options[:RedirectAllRequestsTo]
            # Redirect precludes all other options
            data << "<RedirectAllRequestsTo>\n<HostName>\#{options[:RedirectAllRequestsTo]}</HostName>\n</RedirectAllRequestsTo>\n"
          else

            if options[:IndexDocument]
            data << "<IndexDocument>\n<Suffix>\#{options[:IndexDocument]}</Suffix>\n</IndexDocument>\n"
            end

            if options[:ErrorDocument]
              data << "<ErrorDocument>\n<Key>\#{options[:ErrorDocument]}</Key>\n</ErrorDocument>\n"
            end
          end

          data << '</WebsiteConfiguration>'
          request({
            :body     => data,
            :expects  => 200,
            :headers  => {},
            :bucket_name => bucket_name,
            :method   => 'PUT',
            :query    => {'website' => nil}
          })
        end