def put_website(Bucket, ErrorDocument=None, IndexDocument=None, RedirectAllRequestsTo=None, RoutingRules=None, region=None, key=None, keyid=None, profile=None):
 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] = 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)}

def put_website ( Bucket , ErrorDocument = None , IndexDocument = None , RedirectAllRequestsTo = None , RoutingRules = None , region = None , key = None , keyid = None , profile = None ) : 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 ] = 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 ) }
given a valid config .