enterprise-search-python icon indicating copy to clipboard operation
enterprise-search-python copied to clipboard

Add support to connect with Cloud ID

Open ioanatia opened this issue 11 months ago • 0 comments

The Elasticsearch python client can use the Elastic Cloud ID, but looks like for the Enterprise Search python client this is not supported.

Example from the documentation:

from elasticsearch import Elasticsearch

# Password for the 'elastic' user generated by Elasticsearch
ELASTIC_PASSWORD = "<password>"

# Found in the 'Manage Deployment' page
CLOUD_ID = "deployment-name:dXMtZWFzdDQuZ2Nw..."

# Create the client instance
client = Elasticsearch(
    cloud_id=CLOUD_ID,
    basic_auth=("elastic", ELASTIC_PASSWORD)
)

# Successful response!
client.info()
# {'name': 'instance-0000000000', 'cluster_name': ...}

ioanatia avatar Mar 07 '24 12:03 ioanatia