def set_backend_policy(name, port, policies=None, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 if (not exists(name, region, key, keyid, profile)):
  return True
 if (policies is None):
  policies = []
 try:
  conn.set_lb_policies_of_backend_server(name, port, policies)
  log.info('Set policies {0} on ELB {1} backend server {2}'.format(policies, name, port))
 except boto.exception.BotoServerError as e:
  log.debug(e)
  log.info('Failed to set policy {0} on ELB {1} backend server {2}: {3}'.format(policies, name, port, e.message))
  return False
 return True

def set_backend_policy ( name , port , policies = None , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) if ( not exists ( name , region , key , keyid , profile ) ) : return True if ( policies is None ) : policies = [ ] try : conn . set_lb_policies_of_backend_server ( name , port , policies ) log . info ( 'Set policies {0} on ELB {1} backend server {2}' . format ( policies , name , port ) ) except boto . exception . BotoServerError as e : log . debug ( e ) log . info ( 'Failed to set policy {0} on ELB {1} backend server {2}: {3}' . format ( policies , name , port , e . message ) ) return False return True
set the policies of an elb backend server .