elasticsearch 8.16.0__py3-none-any.whl → 8.17.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +234 -96
- elasticsearch/_async/client/async_search.py +12 -22
- elasticsearch/_async/client/autoscaling.py +39 -4
- elasticsearch/_async/client/cat.py +90 -221
- elasticsearch/_async/client/ccr.py +85 -35
- elasticsearch/_async/client/cluster.py +160 -68
- elasticsearch/_async/client/connector.py +362 -25
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +6 -6
- elasticsearch/_async/client/eql.py +13 -11
- elasticsearch/_async/client/esql.py +3 -2
- elasticsearch/_async/client/features.py +27 -5
- elasticsearch/_async/client/fleet.py +1 -1
- elasticsearch/_async/client/graph.py +9 -3
- elasticsearch/_async/client/ilm.py +74 -39
- elasticsearch/_async/client/indices.py +633 -152
- elasticsearch/_async/client/inference.py +99 -16
- elasticsearch/_async/client/ingest.py +201 -23
- elasticsearch/_async/client/license.py +38 -22
- elasticsearch/_async/client/logstash.py +12 -9
- elasticsearch/_async/client/migration.py +17 -8
- elasticsearch/_async/client/ml.py +137 -79
- elasticsearch/_async/client/monitoring.py +3 -2
- elasticsearch/_async/client/nodes.py +37 -23
- elasticsearch/_async/client/query_rules.py +47 -25
- elasticsearch/_async/client/rollup.py +96 -21
- elasticsearch/_async/client/search_application.py +138 -9
- elasticsearch/_async/client/searchable_snapshots.py +33 -24
- elasticsearch/_async/client/security.py +751 -123
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +147 -28
- elasticsearch/_async/client/snapshot.py +309 -25
- elasticsearch/_async/client/sql.py +79 -58
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +52 -29
- elasticsearch/_async/client/tasks.py +71 -31
- elasticsearch/_async/client/text_structure.py +468 -48
- elasticsearch/_async/client/transform.py +21 -14
- elasticsearch/_async/client/watcher.py +226 -60
- elasticsearch/_async/client/xpack.py +13 -8
- elasticsearch/_sync/client/__init__.py +234 -96
- elasticsearch/_sync/client/async_search.py +12 -22
- elasticsearch/_sync/client/autoscaling.py +39 -4
- elasticsearch/_sync/client/cat.py +90 -221
- elasticsearch/_sync/client/ccr.py +85 -35
- elasticsearch/_sync/client/cluster.py +160 -68
- elasticsearch/_sync/client/connector.py +362 -25
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +6 -6
- elasticsearch/_sync/client/eql.py +13 -11
- elasticsearch/_sync/client/esql.py +3 -2
- elasticsearch/_sync/client/features.py +27 -5
- elasticsearch/_sync/client/fleet.py +1 -1
- elasticsearch/_sync/client/graph.py +9 -3
- elasticsearch/_sync/client/ilm.py +74 -39
- elasticsearch/_sync/client/indices.py +633 -152
- elasticsearch/_sync/client/inference.py +99 -16
- elasticsearch/_sync/client/ingest.py +201 -23
- elasticsearch/_sync/client/license.py +38 -22
- elasticsearch/_sync/client/logstash.py +12 -9
- elasticsearch/_sync/client/migration.py +17 -8
- elasticsearch/_sync/client/ml.py +137 -79
- elasticsearch/_sync/client/monitoring.py +3 -2
- elasticsearch/_sync/client/nodes.py +37 -23
- elasticsearch/_sync/client/query_rules.py +47 -25
- elasticsearch/_sync/client/rollup.py +96 -21
- elasticsearch/_sync/client/search_application.py +138 -9
- elasticsearch/_sync/client/searchable_snapshots.py +33 -24
- elasticsearch/_sync/client/security.py +751 -123
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +147 -28
- elasticsearch/_sync/client/snapshot.py +309 -25
- elasticsearch/_sync/client/sql.py +79 -58
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +52 -29
- elasticsearch/_sync/client/tasks.py +71 -31
- elasticsearch/_sync/client/text_structure.py +468 -48
- elasticsearch/_sync/client/transform.py +21 -14
- elasticsearch/_sync/client/watcher.py +226 -60
- elasticsearch/_sync/client/xpack.py +13 -8
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.16.0.dist-info/RECORD +0 -117
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -46,7 +46,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
46
46
|
Delete a search application. Remove a search application and its associated alias.
|
|
47
47
|
Indices attached to the search application are not removed.
|
|
48
48
|
|
|
49
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
49
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-search-application.html>`_
|
|
50
50
|
|
|
51
51
|
:param name: The name of the search application to delete
|
|
52
52
|
"""
|
|
@@ -88,7 +88,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
88
88
|
Delete a behavioral analytics collection. The associated data stream is also
|
|
89
89
|
deleted.
|
|
90
90
|
|
|
91
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
91
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-analytics-collection.html>`_
|
|
92
92
|
|
|
93
93
|
:param name: The name of the analytics collection to be deleted
|
|
94
94
|
"""
|
|
@@ -129,7 +129,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
129
129
|
"""
|
|
130
130
|
Get search application details.
|
|
131
131
|
|
|
132
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
132
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-search-application.html>`_
|
|
133
133
|
|
|
134
134
|
:param name: The name of the search application
|
|
135
135
|
"""
|
|
@@ -170,7 +170,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
170
170
|
"""
|
|
171
171
|
Get behavioral analytics collections.
|
|
172
172
|
|
|
173
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
173
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-analytics-collection.html>`_
|
|
174
174
|
|
|
175
175
|
:param name: A list of analytics collections to limit the returned information
|
|
176
176
|
"""
|
|
@@ -216,9 +216,9 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
216
216
|
size: t.Optional[int] = None,
|
|
217
217
|
) -> ObjectApiResponse[t.Any]:
|
|
218
218
|
"""
|
|
219
|
-
|
|
219
|
+
Get search applications. Get information about search applications.
|
|
220
220
|
|
|
221
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
221
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-search-applications.html>`_
|
|
222
222
|
|
|
223
223
|
:param from_: Starting offset.
|
|
224
224
|
:param q: Query in the Lucene query string syntax.
|
|
@@ -251,6 +251,71 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
251
251
|
path_parts=__path_parts,
|
|
252
252
|
)
|
|
253
253
|
|
|
254
|
+
@_rewrite_parameters(
|
|
255
|
+
body_name="payload",
|
|
256
|
+
)
|
|
257
|
+
@_stability_warning(Stability.EXPERIMENTAL)
|
|
258
|
+
def post_behavioral_analytics_event(
|
|
259
|
+
self,
|
|
260
|
+
*,
|
|
261
|
+
collection_name: str,
|
|
262
|
+
event_type: t.Union[str, t.Literal["page_view", "search", "search_click"]],
|
|
263
|
+
payload: t.Optional[t.Any] = None,
|
|
264
|
+
body: t.Optional[t.Any] = None,
|
|
265
|
+
debug: t.Optional[bool] = None,
|
|
266
|
+
error_trace: t.Optional[bool] = None,
|
|
267
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
268
|
+
human: t.Optional[bool] = None,
|
|
269
|
+
pretty: t.Optional[bool] = None,
|
|
270
|
+
) -> ObjectApiResponse[t.Any]:
|
|
271
|
+
"""
|
|
272
|
+
Create a behavioral analytics collection event.
|
|
273
|
+
|
|
274
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-analytics-collection-event.html>`_
|
|
275
|
+
|
|
276
|
+
:param collection_name: The name of the behavioral analytics collection.
|
|
277
|
+
:param event_type: The analytics event type.
|
|
278
|
+
:param payload:
|
|
279
|
+
:param debug: Whether the response type has to include more details
|
|
280
|
+
"""
|
|
281
|
+
if collection_name in SKIP_IN_PATH:
|
|
282
|
+
raise ValueError("Empty value passed for parameter 'collection_name'")
|
|
283
|
+
if event_type in SKIP_IN_PATH:
|
|
284
|
+
raise ValueError("Empty value passed for parameter 'event_type'")
|
|
285
|
+
if payload is None and body is None:
|
|
286
|
+
raise ValueError(
|
|
287
|
+
"Empty value passed for parameters 'payload' and 'body', one of them should be set."
|
|
288
|
+
)
|
|
289
|
+
elif payload is not None and body is not None:
|
|
290
|
+
raise ValueError("Cannot set both 'payload' and 'body'")
|
|
291
|
+
__path_parts: t.Dict[str, str] = {
|
|
292
|
+
"collection_name": _quote(collection_name),
|
|
293
|
+
"event_type": _quote(event_type),
|
|
294
|
+
}
|
|
295
|
+
__path = f'/_application/analytics/{__path_parts["collection_name"]}/event/{__path_parts["event_type"]}'
|
|
296
|
+
__query: t.Dict[str, t.Any] = {}
|
|
297
|
+
if debug is not None:
|
|
298
|
+
__query["debug"] = debug
|
|
299
|
+
if error_trace is not None:
|
|
300
|
+
__query["error_trace"] = error_trace
|
|
301
|
+
if filter_path is not None:
|
|
302
|
+
__query["filter_path"] = filter_path
|
|
303
|
+
if human is not None:
|
|
304
|
+
__query["human"] = human
|
|
305
|
+
if pretty is not None:
|
|
306
|
+
__query["pretty"] = pretty
|
|
307
|
+
__body = payload if payload is not None else body
|
|
308
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
309
|
+
return self.perform_request( # type: ignore[return-value]
|
|
310
|
+
"POST",
|
|
311
|
+
__path,
|
|
312
|
+
params=__query,
|
|
313
|
+
headers=__headers,
|
|
314
|
+
body=__body,
|
|
315
|
+
endpoint_id="search_application.post_behavioral_analytics_event",
|
|
316
|
+
path_parts=__path_parts,
|
|
317
|
+
)
|
|
318
|
+
|
|
254
319
|
@_rewrite_parameters(
|
|
255
320
|
body_name="search_application",
|
|
256
321
|
)
|
|
@@ -270,7 +335,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
270
335
|
"""
|
|
271
336
|
Create or update a search application.
|
|
272
337
|
|
|
273
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
338
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-search-application.html>`_
|
|
274
339
|
|
|
275
340
|
:param name: The name of the search application to be created or updated.
|
|
276
341
|
:param search_application:
|
|
@@ -324,7 +389,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
324
389
|
"""
|
|
325
390
|
Create a behavioral analytics collection.
|
|
326
391
|
|
|
327
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
392
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-analytics-collection.html>`_
|
|
328
393
|
|
|
329
394
|
:param name: The name of the analytics collection to be created or updated.
|
|
330
395
|
"""
|
|
@@ -351,6 +416,70 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
351
416
|
path_parts=__path_parts,
|
|
352
417
|
)
|
|
353
418
|
|
|
419
|
+
@_rewrite_parameters(
|
|
420
|
+
body_fields=("params",),
|
|
421
|
+
ignore_deprecated_options={"params"},
|
|
422
|
+
)
|
|
423
|
+
@_stability_warning(Stability.EXPERIMENTAL)
|
|
424
|
+
def render_query(
|
|
425
|
+
self,
|
|
426
|
+
*,
|
|
427
|
+
name: str,
|
|
428
|
+
error_trace: t.Optional[bool] = None,
|
|
429
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
430
|
+
human: t.Optional[bool] = None,
|
|
431
|
+
params: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
432
|
+
pretty: t.Optional[bool] = None,
|
|
433
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
434
|
+
) -> ObjectApiResponse[t.Any]:
|
|
435
|
+
"""
|
|
436
|
+
Render a search application query. Generate an Elasticsearch query using the
|
|
437
|
+
specified query parameters and the search template associated with the search
|
|
438
|
+
application or a default template if none is specified. If a parameter used in
|
|
439
|
+
the search template is not specified in `params`, the parameter's default value
|
|
440
|
+
will be used. The API returns the specific Elasticsearch query that would be
|
|
441
|
+
generated and run by calling the search application search API. You must have
|
|
442
|
+
`read` privileges on the backing alias of the search application.
|
|
443
|
+
|
|
444
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-application-render-query.html>`_
|
|
445
|
+
|
|
446
|
+
:param name: The name of the search application to render teh query for.
|
|
447
|
+
:param params:
|
|
448
|
+
"""
|
|
449
|
+
if name in SKIP_IN_PATH:
|
|
450
|
+
raise ValueError("Empty value passed for parameter 'name'")
|
|
451
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
452
|
+
__path = (
|
|
453
|
+
f'/_application/search_application/{__path_parts["name"]}/_render_query'
|
|
454
|
+
)
|
|
455
|
+
__query: t.Dict[str, t.Any] = {}
|
|
456
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
457
|
+
if error_trace is not None:
|
|
458
|
+
__query["error_trace"] = error_trace
|
|
459
|
+
if filter_path is not None:
|
|
460
|
+
__query["filter_path"] = filter_path
|
|
461
|
+
if human is not None:
|
|
462
|
+
__query["human"] = human
|
|
463
|
+
if pretty is not None:
|
|
464
|
+
__query["pretty"] = pretty
|
|
465
|
+
if not __body:
|
|
466
|
+
if params is not None:
|
|
467
|
+
__body["params"] = params
|
|
468
|
+
if not __body:
|
|
469
|
+
__body = None # type: ignore[assignment]
|
|
470
|
+
__headers = {"accept": "application/json"}
|
|
471
|
+
if __body is not None:
|
|
472
|
+
__headers["content-type"] = "application/json"
|
|
473
|
+
return self.perform_request( # type: ignore[return-value]
|
|
474
|
+
"POST",
|
|
475
|
+
__path,
|
|
476
|
+
params=__query,
|
|
477
|
+
headers=__headers,
|
|
478
|
+
body=__body,
|
|
479
|
+
endpoint_id="search_application.render_query",
|
|
480
|
+
path_parts=__path_parts,
|
|
481
|
+
)
|
|
482
|
+
|
|
354
483
|
@_rewrite_parameters(
|
|
355
484
|
body_fields=("params",),
|
|
356
485
|
ignore_deprecated_options={"params"},
|
|
@@ -374,7 +503,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
374
503
|
the search application or default template. Unspecified template parameters are
|
|
375
504
|
assigned their default values if applicable.
|
|
376
505
|
|
|
377
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
506
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-application-search.html>`_
|
|
378
507
|
|
|
379
508
|
:param name: The name of the search application to be searched.
|
|
380
509
|
:param params: Query parameters specific to this request, which will override
|
|
@@ -44,13 +44,12 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
44
44
|
pretty: t.Optional[bool] = None,
|
|
45
45
|
) -> ObjectApiResponse[t.Any]:
|
|
46
46
|
"""
|
|
47
|
-
|
|
47
|
+
Get cache statistics. Get statistics about the shared cache for partially mounted
|
|
48
|
+
indices.
|
|
48
49
|
|
|
49
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
50
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-cache-stats.html>`_
|
|
50
51
|
|
|
51
|
-
:param node_id:
|
|
52
|
-
information; use `_local` to return information from the node you're connecting
|
|
53
|
-
to, leave empty to get information from all nodes
|
|
52
|
+
:param node_id: The names of the nodes in the cluster to target.
|
|
54
53
|
:param master_timeout:
|
|
55
54
|
"""
|
|
56
55
|
__path_parts: t.Dict[str, str]
|
|
@@ -103,11 +102,13 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
103
102
|
pretty: t.Optional[bool] = None,
|
|
104
103
|
) -> ObjectApiResponse[t.Any]:
|
|
105
104
|
"""
|
|
106
|
-
Clear the cache
|
|
105
|
+
Clear the cache. Clear indices and data streams from the shared cache for partially
|
|
106
|
+
mounted indices.
|
|
107
107
|
|
|
108
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
108
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-clear-cache.html>`_
|
|
109
109
|
|
|
110
|
-
:param index: A comma-separated list of
|
|
110
|
+
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
111
|
+
clear from the cache. It supports wildcards (`*`).
|
|
111
112
|
:param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
|
|
112
113
|
into no concrete indices. (This includes `_all` string or when no indices
|
|
113
114
|
have been specified)
|
|
@@ -175,22 +176,29 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
175
176
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
176
177
|
) -> ObjectApiResponse[t.Any]:
|
|
177
178
|
"""
|
|
178
|
-
Mount a snapshot as a searchable index.
|
|
179
|
+
Mount a snapshot. Mount a snapshot as a searchable snapshot index. Do not use
|
|
180
|
+
this API for snapshots managed by index lifecycle management (ILM). Manually
|
|
181
|
+
mounting ILM-managed snapshots can interfere with ILM processes.
|
|
179
182
|
|
|
180
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
183
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-mount-snapshot.html>`_
|
|
181
184
|
|
|
182
185
|
:param repository: The name of the repository containing the snapshot of the
|
|
183
|
-
index to mount
|
|
184
|
-
:param snapshot: The name of the snapshot of the index to mount
|
|
185
|
-
:param index:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
:param
|
|
189
|
-
|
|
190
|
-
:param
|
|
191
|
-
|
|
192
|
-
:param
|
|
193
|
-
|
|
186
|
+
index to mount.
|
|
187
|
+
:param snapshot: The name of the snapshot of the index to mount.
|
|
188
|
+
:param index: The name of the index contained in the snapshot whose data is to
|
|
189
|
+
be mounted. If no `renamed_index` is specified, this name will also be used
|
|
190
|
+
to create the new index.
|
|
191
|
+
:param ignore_index_settings: The names of settings that should be removed from
|
|
192
|
+
the index when it is mounted.
|
|
193
|
+
:param index_settings: The settings that should be added to the index when it
|
|
194
|
+
is mounted.
|
|
195
|
+
:param master_timeout: The period to wait for the master node. If the master
|
|
196
|
+
node is not available before the timeout expires, the request fails and returns
|
|
197
|
+
an error. To indicate that the request should never timeout, set it to `-1`.
|
|
198
|
+
:param renamed_index: The name of the index that will be created.
|
|
199
|
+
:param storage: The mount option for the searchable snapshot index.
|
|
200
|
+
:param wait_for_completion: If true, the request blocks until the operation is
|
|
201
|
+
complete.
|
|
194
202
|
"""
|
|
195
203
|
if repository in SKIP_IN_PATH:
|
|
196
204
|
raise ValueError("Empty value passed for parameter 'repository'")
|
|
@@ -255,11 +263,12 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
255
263
|
pretty: t.Optional[bool] = None,
|
|
256
264
|
) -> ObjectApiResponse[t.Any]:
|
|
257
265
|
"""
|
|
258
|
-
|
|
266
|
+
Get searchable snapshot statistics.
|
|
259
267
|
|
|
260
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
268
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-stats.html>`_
|
|
261
269
|
|
|
262
|
-
:param index: A comma-separated list of
|
|
270
|
+
:param index: A comma-separated list of data streams and indices to retrieve
|
|
271
|
+
statistics for.
|
|
263
272
|
:param level: Return stats aggregated at cluster, index or shard level
|
|
264
273
|
"""
|
|
265
274
|
__path_parts: t.Dict[str, str]
|