Skip to content

Commit 1af86b2

Browse files
committed
Fix missing options doc
1 parent 7501620 commit 1af86b2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/guide/connecting.asciidoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ client.info()
4242
Authenticating to Elasticsearch Serverless is done using the API keys provided by Elastic.
4343
Note that you should provide the values of `id` and `api_key` in a tuple.
4444

45-
API keys can be provided to the client constructor or via the per-request `.options()` method:
45+
API keys can be provided to the client constructor, like in the example above, or via the per-request `.options()` method:
46+
47+
[source,python]
48+
----
49+
client.options(api_key=("api-key-id", "api-key-secret")).info()
50+
# {'name': 'instance-0000000000', 'cluster_name': ...}
51+
----
4652

4753
[discrete]
4854
[[connecting-faas]]

0 commit comments

Comments
 (0)