class_docstr: Interact with Elasticsearch through the elasticsearch-dbapi.
  
  This hook uses the Elasticsearch conn_id.
  
  :param elasticsearch_conn_id: The :ref:`ElasticSearch connection id <howto/connection:elasticsearch>`
      used for Elasticsearch credentials.
class_docstr_tok: ["Interact","with","Elasticsearch","through","the","elasticsearch-dbapi",".","This","hook","uses","the","Elasticsearch","conn_id",".",":","param","elasticsearch_conn_id",":","The",":","ref",":","`","ElasticSearch","connection","id","<","howto\/connection",":","elasticsearch",">","`","used","for","Elasticsearch","credentials","."]
docstr: Return an elasticsearch connection object.
docstr_tok: ["Return","an","elasticsearch","connection","object","."]
code: def get_conn(self) -> ESConnection:
      """Return an elasticsearch connection object."""
      conn_id = getattr(self, self.conn_name_attr)
      conn = self.connection or self.get_connection(conn_id)
  
      conn_args = {
          "host": conn.host,
          "port": conn.port,
          "user": conn.login or None,
          "password": conn.password or None,
          "scheme": conn.schema or "http",
      }
  
      if conn.extra_dejson.get("http_compress", False):
          conn_args["http_compress"] = bool(["http_compress"])
  
      if conn.extra_dejson.get("timeout", False):
          conn_args["timeout"] = conn.extra_dejson["timeout"]
  
      return connect(**conn_args)
  
imports: from __future__ import annotations
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Any
  from urllib import parse
  from elasticsearch import Elasticsearch
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
  from airflow.providers.common.sql.hooks.sql import DbApiHook
label_desc: Use image node_id 2 for calling the ElasticsearchSQLHook obj's underlying member method code with example usage: obj.get_conn() and returns: connect