Given a valid config, update the website configuration for a bucket.

    Returns {updated: true} if website configuration was updated and returns
    {updated: False} if website configuration was not updated.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_s3_bucket.put_website my_bucket IndexDocument='{"Suffix":"index.html"}'

def put_website(Bucket, ErrorDocument=None, IndexDocument=None,
           RedirectAllRequestsTo=None, RoutingRules=None,
           region=None, key=None, keyid=None, profile=None):
    '''
    Given a valid config, update the website configuration for a bucket.

    Returns {updated: true} if website configuration was updated and returns
    {updated: False} if website configuration was not updated.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_s3_bucket.put_website my_bucket IndexDocument='{"Suffix":"index.html"}'

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        WebsiteConfiguration = {}
        for key in ('ErrorDocument', 'IndexDocument',
                    'RedirectAllRequestsTo', 'RoutingRules'):
            val = locals()[key]
            if val is not None:
                if isinstance(val, six.string_types):
                    WebsiteConfiguration[key] = salt.utils.json.loads(val)
                else:
                    WebsiteConfiguration[key] = val
        conn.put_bucket_website(Bucket=Bucket,
                WebsiteConfiguration=WebsiteConfiguration)
        return {'updated': True, 'name': Bucket}
    except ClientError as e:
        return {'updated': False, 'error': __utils__['boto3.get_error'](e)}