def update_assume_role_policy(role_name, policy_document, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 if isinstance(policy_document, six.string_types):
  policy_document = json.loads(policy_document, object_pairs_hook=odict.OrderedDict)
 try:
  _policy_document = json.dumps(policy_document)
  conn.update_assume_role_policy(role_name, _policy_document)
  msg = 'Successfully updated assume role policy for role {0}.'
  log.info(msg.format(role_name))
  return True
 except boto.exception.BotoServerError as e:
  log.error(e)
  msg = 'Failed to update assume role policy for role {0}.'
  log.error(msg.format(role_name))
  return False

def update_assume_role_policy ( role_name , policy_document , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) if isinstance ( policy_document , six . string_types ) : policy_document = json . loads ( policy_document , object_pairs_hook = odict . OrderedDict ) try : _policy_document = json . dumps ( policy_document ) conn . update_assume_role_policy ( role_name , _policy_document ) msg = 'Successfully updated assume role policy for role {0}.' log . info ( msg . format ( role_name ) ) return True except boto . exception . BotoServerError as e : log . error ( e ) msg = 'Failed to update assume role policy for role {0}.' log . error ( msg . format ( role_name ) ) return False
update an assume role policy for a role .