kibana/docs/development/core/server/kibana-plugin-server.elasticsearchservicesetup.createclient.md
Mikhail Shustov 5c96930b3f
createCluster requires a partial elasticsearch config (#40405) (#40679)
* createCluster created with partial config

* add tests

* re-genereate docs
2019-07-09 22:19:27 +02:00

775 B

Home > kibana-plugin-server > ElasticsearchServiceSetup > createClient

ElasticsearchServiceSetup.createClient property

Create application specific Elasticsearch cluster API client with customized config.

Signature:

readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ClusterClient;

Example

const client = elasticsearch.createCluster('my-app-name', config);
const data = await client.callAsInternalUser();