Added cloud configuration example (#880)
* Added cloud configuration example * Used cloud example from auth docs and added link
This commit is contained in:
@ -156,8 +156,19 @@ _Default:_ `elasticsearch-js`
|
|||||||
_Default:_ `{}`
|
_Default:_ `{}`
|
||||||
|
|
||||||
|`cloud`
|
|`cloud`
|
||||||
|`object` - Custom configuration for connecting to https://cloud.elastic.co[Elastic Cloud]. +
|
a|`object` - Custom configuration for connecting to https://cloud.elastic.co[Elastic Cloud]. See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication] for more details. +
|
||||||
_Default:_ `null`
|
_Default:_ `null` +
|
||||||
|
_Cloud configuration example:_
|
||||||
|
[source,js]
|
||||||
|
----
|
||||||
|
const client = new Client({
|
||||||
|
cloud: {
|
||||||
|
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
|
||||||
|
username: 'elastic',
|
||||||
|
password: 'changeme'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
----
|
||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user