es_client.Builder
- client
The
Elasticsearch Client <elasticsearch.Elasticsearch>
object is only created after passing all other tests, and ifautoconnect
is True- is_master
Initially set to None, this value is set automatically if
autoconnect
is True. It can otherwise be set by calling~es_client.Builder._find_master
after~es_client.Builder._get_client
has been called first.
- Check to see if elasticsearch key is in the supplied
raw_config
dictionary. Log a warning about using defaults if it is not. - Run
~es_client.Builder._check_config
onraw_config
- Set instance attributes
version_max
andversion_min
with the provided values. - Set instance attribute
master_only
to the value fromraw_config
- Initialize instance attribute
is_master
with a None - Set instance attribute
skip_version_test
to the value fromraw_config
- Set instance attribute
client_args
to the value ofraw_config['elasticsearch']['client']
- Execute
~es_client.Builder._check_basic_auth
to build thebasic_auth
tuple, ifusername
andpassword
are not None. - Execute
~es_client.Builder._check_api_key
to build theapi_key
tuple, if theid
andapi_key
sub-keys are not None. - Execute
~es_client.Builder._check_cloud_id
to ensure the client connects to the definedcloud_id
rather than anything inhosts
. - Execute
~es_client.Builder._check_ssl
to ensure we have at least the certifi signing certificates. If
autoconnect
is `True`:- Execute
~es_client.Builder._get_client
to finally build theElasticsearch Client <elasticsearch8.Elasticsearch>
client object. - Execute
~es_client.Builder._check_version
and~es_client.Builder._check_master
as post-checks. Nothing will happen if these checks are not enabled inraw_config
- Execute