Open
Description
Most of the examples in this repo use Could ID instead of hosts, while chatting with @miguelgrinberg and @joemcelroy we noticed that we should probably update them.
What is in most examples is something like this:
ELASTIC_CLOUD_ID = getpass("Elastic Cloud ID: ")
# https://www.elastic.co/search-labs/tutorials/install-elasticsearch/elastic-cloud#creating-an-api-key
ELASTIC_API_KEY = getpass("Elastic Api Key: ")
A version of this could be:
# Create an Elasticsearch client instance
client = Elasticsearch(
getpass("Host: "), # Securely get the host for the Elasticsearch cluster
api_key=getpass("API Key: "), # Securely get the API key for authentication
)
Metadata
Metadata
Assignees
Labels
No labels