def alias_exists(aliases, indices=None, hosts=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  if es.indices.exists_alias(name=aliases, index=indices):
   return True
  else:
   return False
 except elasticsearch.exceptions.NotFoundError:
  return None
 except elasticsearch.exceptions.ConnectionError:
  return None
 return None

def alias_exists ( aliases , indices = None , hosts = None , profile = None ) : es = _get_instance ( hosts , profile ) try : if es . indices . exists_alias ( name = aliases , index = indices ) : return True else : return False except elasticsearch . exceptions . NotFoundError : return None except elasticsearch . exceptions . ConnectionError : return None return None
return a boolean indicating whether given alias exists cli example:: salt myminion elasticsearch .