[Backport 8.1] Update connecting documentation (#1668)

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2022-03-28 12:23:30 +02:00
committed by GitHub
parent 45fab27d8a
commit bc6fcde8f0
25 changed files with 315 additions and 100 deletions

View File

@ -10,7 +10,8 @@ offers.
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'http://localhost:9200',
cloud: { id: '<cloud-id>' },
auth: { apiKey: 'base64EncodedKey' }
maxRetries: 5,
requestTimeout: 60000,
sniffOnStart: true
@ -241,7 +242,7 @@ _Cloud configuration example:_
----
const client = new Client({
cloud: {
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA=='
id: '<cloud-id>'
},
auth: {
username: 'elastic',