def alias_create(indices, alias, hosts=None, body=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  result = es.indices.put_alias(index=indices, name=alias, body=body)
  return True
 except elasticsearch.exceptions.NotFoundError:
  return None
 return None

def alias_create ( indices , alias , hosts = None , body = None , profile = None ) : es = _get_instance ( hosts , profile ) try : result = es . indices . put_alias ( index = indices , name = alias , body = body ) return True except elasticsearch . exceptions . NotFoundError : return None return None
create an alias for a specific index/indices cli example:: salt myminion elasticsearch .