Skip to content

Commit 6707a86

Browse files
JonKelley88delvedor
authored andcommitted
Added cloud configuration example (#880)
* Added cloud configuration example * Used cloud example from auth docs and added link
1 parent a38e89a commit 6707a86

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

docs/configuration.asciidoc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,19 @@ _Default:_ `elasticsearch-js`
156156
_Default:_ `{}`
157157

158158
|`cloud`
159-
|`object` - Custom configuration for connecting to https://cloud.elastic.co[Elastic Cloud]. +
160-
_Default:_ `null`
159+
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. +
160+
_Default:_ `null` +
161+
_Cloud configuration example:_
162+
[source,js]
163+
----
164+
const client = new Client({
165+
cloud: {
166+
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
167+
username: 'elastic',
168+
password: 'changeme'
169+
}
170+
})
171+
----
161172

162173
|===
163174

0 commit comments

Comments
 (0)