elasticsearch 8.17.0__py3-none-any.whl → 8.17.2__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.
Files changed (95) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +2034 -740
  3. elasticsearch/_async/client/async_search.py +33 -22
  4. elasticsearch/_async/client/autoscaling.py +27 -21
  5. elasticsearch/_async/client/cat.py +280 -336
  6. elasticsearch/_async/client/ccr.py +96 -70
  7. elasticsearch/_async/client/cluster.py +152 -144
  8. elasticsearch/_async/client/connector.py +488 -55
  9. elasticsearch/_async/client/dangling_indices.py +22 -16
  10. elasticsearch/_async/client/enrich.py +25 -6
  11. elasticsearch/_async/client/eql.py +22 -9
  12. elasticsearch/_async/client/esql.py +295 -3
  13. elasticsearch/_async/client/features.py +25 -25
  14. elasticsearch/_async/client/fleet.py +15 -9
  15. elasticsearch/_async/client/graph.py +9 -8
  16. elasticsearch/_async/client/ilm.py +91 -61
  17. elasticsearch/_async/client/indices.py +746 -324
  18. elasticsearch/_async/client/inference.py +101 -4
  19. elasticsearch/_async/client/ingest.py +231 -19
  20. elasticsearch/_async/client/license.py +48 -31
  21. elasticsearch/_async/client/logstash.py +20 -6
  22. elasticsearch/_async/client/migration.py +25 -7
  23. elasticsearch/_async/client/ml.py +532 -278
  24. elasticsearch/_async/client/monitoring.py +5 -1
  25. elasticsearch/_async/client/nodes.py +46 -30
  26. elasticsearch/_async/client/query_rules.py +65 -18
  27. elasticsearch/_async/client/rollup.py +126 -13
  28. elasticsearch/_async/client/search_application.py +170 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +45 -23
  30. elasticsearch/_async/client/security.py +1299 -340
  31. elasticsearch/_async/client/shutdown.py +43 -15
  32. elasticsearch/_async/client/simulate.py +145 -0
  33. elasticsearch/_async/client/slm.py +163 -19
  34. elasticsearch/_async/client/snapshot.py +288 -23
  35. elasticsearch/_async/client/sql.py +94 -53
  36. elasticsearch/_async/client/ssl.py +16 -17
  37. elasticsearch/_async/client/synonyms.py +67 -26
  38. elasticsearch/_async/client/tasks.py +103 -28
  39. elasticsearch/_async/client/text_structure.py +475 -46
  40. elasticsearch/_async/client/transform.py +108 -72
  41. elasticsearch/_async/client/watcher.py +245 -43
  42. elasticsearch/_async/client/xpack.py +20 -6
  43. elasticsearch/_async/helpers.py +1 -1
  44. elasticsearch/_sync/client/__init__.py +2034 -740
  45. elasticsearch/_sync/client/async_search.py +33 -22
  46. elasticsearch/_sync/client/autoscaling.py +27 -21
  47. elasticsearch/_sync/client/cat.py +280 -336
  48. elasticsearch/_sync/client/ccr.py +96 -70
  49. elasticsearch/_sync/client/cluster.py +152 -144
  50. elasticsearch/_sync/client/connector.py +488 -55
  51. elasticsearch/_sync/client/dangling_indices.py +22 -16
  52. elasticsearch/_sync/client/enrich.py +25 -6
  53. elasticsearch/_sync/client/eql.py +22 -9
  54. elasticsearch/_sync/client/esql.py +295 -3
  55. elasticsearch/_sync/client/features.py +25 -25
  56. elasticsearch/_sync/client/fleet.py +15 -9
  57. elasticsearch/_sync/client/graph.py +9 -8
  58. elasticsearch/_sync/client/ilm.py +91 -61
  59. elasticsearch/_sync/client/indices.py +746 -324
  60. elasticsearch/_sync/client/inference.py +101 -4
  61. elasticsearch/_sync/client/ingest.py +231 -19
  62. elasticsearch/_sync/client/license.py +48 -31
  63. elasticsearch/_sync/client/logstash.py +20 -6
  64. elasticsearch/_sync/client/migration.py +25 -7
  65. elasticsearch/_sync/client/ml.py +532 -278
  66. elasticsearch/_sync/client/monitoring.py +5 -1
  67. elasticsearch/_sync/client/nodes.py +46 -30
  68. elasticsearch/_sync/client/query_rules.py +65 -18
  69. elasticsearch/_sync/client/rollup.py +126 -13
  70. elasticsearch/_sync/client/search_application.py +170 -13
  71. elasticsearch/_sync/client/searchable_snapshots.py +45 -23
  72. elasticsearch/_sync/client/security.py +1299 -340
  73. elasticsearch/_sync/client/shutdown.py +43 -15
  74. elasticsearch/_sync/client/simulate.py +145 -0
  75. elasticsearch/_sync/client/slm.py +163 -19
  76. elasticsearch/_sync/client/snapshot.py +288 -23
  77. elasticsearch/_sync/client/sql.py +94 -53
  78. elasticsearch/_sync/client/ssl.py +16 -17
  79. elasticsearch/_sync/client/synonyms.py +67 -26
  80. elasticsearch/_sync/client/tasks.py +103 -28
  81. elasticsearch/_sync/client/text_structure.py +475 -46
  82. elasticsearch/_sync/client/transform.py +108 -72
  83. elasticsearch/_sync/client/utils.py +1 -1
  84. elasticsearch/_sync/client/watcher.py +245 -43
  85. elasticsearch/_sync/client/xpack.py +20 -6
  86. elasticsearch/_version.py +1 -1
  87. elasticsearch/client.py +4 -0
  88. elasticsearch/helpers/actions.py +1 -1
  89. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  90. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
  91. elasticsearch-8.17.2.dist-info/RECORD +119 -0
  92. elasticsearch-8.17.0.dist-info/RECORD +0 -117
  93. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
  94. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
@@ -43,8 +43,11 @@ class SearchApplicationClient(NamespacedClient):
43
43
  pretty: t.Optional[bool] = None,
44
44
  ) -> ObjectApiResponse[t.Any]:
45
45
  """
46
- Delete a search application. Remove a search application and its associated alias.
47
- Indices attached to the search application are not removed.
46
+ .. raw:: html
47
+
48
+ <p>Delete a search application.
49
+ Remove a search application and its associated alias. Indices attached to the search application are not removed.</p>
50
+
48
51
 
49
52
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-search-application.html>`_
50
53
 
@@ -85,8 +88,11 @@ class SearchApplicationClient(NamespacedClient):
85
88
  pretty: t.Optional[bool] = None,
86
89
  ) -> ObjectApiResponse[t.Any]:
87
90
  """
88
- Delete a behavioral analytics collection. The associated data stream is also
89
- deleted.
91
+ .. raw:: html
92
+
93
+ <p>Delete a behavioral analytics collection.
94
+ The associated data stream is also deleted.</p>
95
+
90
96
 
91
97
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-analytics-collection.html>`_
92
98
 
@@ -127,7 +133,10 @@ class SearchApplicationClient(NamespacedClient):
127
133
  pretty: t.Optional[bool] = None,
128
134
  ) -> ObjectApiResponse[t.Any]:
129
135
  """
130
- Get search application details.
136
+ .. raw:: html
137
+
138
+ <p>Get search application details.</p>
139
+
131
140
 
132
141
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-search-application.html>`_
133
142
 
@@ -168,7 +177,10 @@ class SearchApplicationClient(NamespacedClient):
168
177
  pretty: t.Optional[bool] = None,
169
178
  ) -> ObjectApiResponse[t.Any]:
170
179
  """
171
- Get behavioral analytics collections.
180
+ .. raw:: html
181
+
182
+ <p>Get behavioral analytics collections.</p>
183
+
172
184
 
173
185
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-analytics-collection.html>`_
174
186
 
@@ -216,7 +228,11 @@ class SearchApplicationClient(NamespacedClient):
216
228
  size: t.Optional[int] = None,
217
229
  ) -> ObjectApiResponse[t.Any]:
218
230
  """
219
- Returns the existing search applications.
231
+ .. raw:: html
232
+
233
+ <p>Get search applications.
234
+ Get information about search applications.</p>
235
+
220
236
 
221
237
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-search-applications.html>`_
222
238
 
@@ -251,6 +267,74 @@ class SearchApplicationClient(NamespacedClient):
251
267
  path_parts=__path_parts,
252
268
  )
253
269
 
270
+ @_rewrite_parameters(
271
+ body_name="payload",
272
+ )
273
+ @_stability_warning(Stability.EXPERIMENTAL)
274
+ async def post_behavioral_analytics_event(
275
+ self,
276
+ *,
277
+ collection_name: str,
278
+ event_type: t.Union[str, t.Literal["page_view", "search", "search_click"]],
279
+ payload: t.Optional[t.Any] = None,
280
+ body: t.Optional[t.Any] = None,
281
+ debug: t.Optional[bool] = None,
282
+ error_trace: t.Optional[bool] = None,
283
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
284
+ human: t.Optional[bool] = None,
285
+ pretty: t.Optional[bool] = None,
286
+ ) -> ObjectApiResponse[t.Any]:
287
+ """
288
+ .. raw:: html
289
+
290
+ <p>Create a behavioral analytics collection event.</p>
291
+
292
+
293
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-analytics-collection-event.html>`_
294
+
295
+ :param collection_name: The name of the behavioral analytics collection.
296
+ :param event_type: The analytics event type.
297
+ :param payload:
298
+ :param debug: Whether the response type has to include more details
299
+ """
300
+ if collection_name in SKIP_IN_PATH:
301
+ raise ValueError("Empty value passed for parameter 'collection_name'")
302
+ if event_type in SKIP_IN_PATH:
303
+ raise ValueError("Empty value passed for parameter 'event_type'")
304
+ if payload is None and body is None:
305
+ raise ValueError(
306
+ "Empty value passed for parameters 'payload' and 'body', one of them should be set."
307
+ )
308
+ elif payload is not None and body is not None:
309
+ raise ValueError("Cannot set both 'payload' and 'body'")
310
+ __path_parts: t.Dict[str, str] = {
311
+ "collection_name": _quote(collection_name),
312
+ "event_type": _quote(event_type),
313
+ }
314
+ __path = f'/_application/analytics/{__path_parts["collection_name"]}/event/{__path_parts["event_type"]}'
315
+ __query: t.Dict[str, t.Any] = {}
316
+ if debug is not None:
317
+ __query["debug"] = debug
318
+ if error_trace is not None:
319
+ __query["error_trace"] = error_trace
320
+ if filter_path is not None:
321
+ __query["filter_path"] = filter_path
322
+ if human is not None:
323
+ __query["human"] = human
324
+ if pretty is not None:
325
+ __query["pretty"] = pretty
326
+ __body = payload if payload is not None else body
327
+ __headers = {"accept": "application/json", "content-type": "application/json"}
328
+ return await self.perform_request( # type: ignore[return-value]
329
+ "POST",
330
+ __path,
331
+ params=__query,
332
+ headers=__headers,
333
+ body=__body,
334
+ endpoint_id="search_application.post_behavioral_analytics_event",
335
+ path_parts=__path_parts,
336
+ )
337
+
254
338
  @_rewrite_parameters(
255
339
  body_name="search_application",
256
340
  )
@@ -268,7 +352,10 @@ class SearchApplicationClient(NamespacedClient):
268
352
  pretty: t.Optional[bool] = None,
269
353
  ) -> ObjectApiResponse[t.Any]:
270
354
  """
271
- Create or update a search application.
355
+ .. raw:: html
356
+
357
+ <p>Create or update a search application.</p>
358
+
272
359
 
273
360
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-search-application.html>`_
274
361
 
@@ -322,7 +409,10 @@ class SearchApplicationClient(NamespacedClient):
322
409
  pretty: t.Optional[bool] = None,
323
410
  ) -> ObjectApiResponse[t.Any]:
324
411
  """
325
- Create a behavioral analytics collection.
412
+ .. raw:: html
413
+
414
+ <p>Create a behavioral analytics collection.</p>
415
+
326
416
 
327
417
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-analytics-collection.html>`_
328
418
 
@@ -351,6 +441,71 @@ class SearchApplicationClient(NamespacedClient):
351
441
  path_parts=__path_parts,
352
442
  )
353
443
 
444
+ @_rewrite_parameters(
445
+ body_fields=("params",),
446
+ ignore_deprecated_options={"params"},
447
+ )
448
+ @_stability_warning(Stability.EXPERIMENTAL)
449
+ async def render_query(
450
+ self,
451
+ *,
452
+ name: str,
453
+ error_trace: t.Optional[bool] = None,
454
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
455
+ human: t.Optional[bool] = None,
456
+ params: t.Optional[t.Mapping[str, t.Any]] = None,
457
+ pretty: t.Optional[bool] = None,
458
+ body: t.Optional[t.Dict[str, t.Any]] = None,
459
+ ) -> ObjectApiResponse[t.Any]:
460
+ """
461
+ .. raw:: html
462
+
463
+ <p>Render a search application query.
464
+ Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified.
465
+ If a parameter used in the search template is not specified in <code>params</code>, the parameter's default value will be used.
466
+ The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API.</p>
467
+ <p>You must have <code>read</code> privileges on the backing alias of the search application.</p>
468
+
469
+
470
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-application-render-query.html>`_
471
+
472
+ :param name: The name of the search application to render teh query for.
473
+ :param params:
474
+ """
475
+ if name in SKIP_IN_PATH:
476
+ raise ValueError("Empty value passed for parameter 'name'")
477
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
478
+ __path = (
479
+ f'/_application/search_application/{__path_parts["name"]}/_render_query'
480
+ )
481
+ __query: t.Dict[str, t.Any] = {}
482
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
483
+ if error_trace is not None:
484
+ __query["error_trace"] = error_trace
485
+ if filter_path is not None:
486
+ __query["filter_path"] = filter_path
487
+ if human is not None:
488
+ __query["human"] = human
489
+ if pretty is not None:
490
+ __query["pretty"] = pretty
491
+ if not __body:
492
+ if params is not None:
493
+ __body["params"] = params
494
+ if not __body:
495
+ __body = None # type: ignore[assignment]
496
+ __headers = {"accept": "application/json"}
497
+ if __body is not None:
498
+ __headers["content-type"] = "application/json"
499
+ return await self.perform_request( # type: ignore[return-value]
500
+ "POST",
501
+ __path,
502
+ params=__query,
503
+ headers=__headers,
504
+ body=__body,
505
+ endpoint_id="search_application.render_query",
506
+ path_parts=__path_parts,
507
+ )
508
+
354
509
  @_rewrite_parameters(
355
510
  body_fields=("params",),
356
511
  ignore_deprecated_options={"params"},
@@ -369,10 +524,12 @@ class SearchApplicationClient(NamespacedClient):
369
524
  body: t.Optional[t.Dict[str, t.Any]] = None,
370
525
  ) -> ObjectApiResponse[t.Any]:
371
526
  """
372
- Run a search application search. Generate and run an Elasticsearch query that
373
- uses the specified query parameteter and the search template associated with
374
- the search application or default template. Unspecified template parameters are
375
- assigned their default values if applicable.
527
+ .. raw:: html
528
+
529
+ <p>Run a search application search.
530
+ Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.
531
+ Unspecified template parameters are assigned their default values if applicable.</p>
532
+
376
533
 
377
534
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-application-search.html>`_
378
535
 
@@ -44,13 +44,15 @@ class SearchableSnapshotsClient(NamespacedClient):
44
44
  pretty: t.Optional[bool] = None,
45
45
  ) -> ObjectApiResponse[t.Any]:
46
46
  """
47
- Retrieve node-level cache statistics about searchable snapshots.
47
+ .. raw:: html
48
48
 
49
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-apis.html>`_
49
+ <p>Get cache statistics.
50
+ Get statistics about the shared cache for partially mounted indices.</p>
50
51
 
51
- :param node_id: A comma-separated list of node IDs or names to limit the returned
52
- information; use `_local` to return information from the node you're connecting
53
- to, leave empty to get information from all nodes
52
+
53
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-cache-stats.html>`_
54
+
55
+ :param node_id: The names of the nodes in the cluster to target.
54
56
  :param master_timeout:
55
57
  """
56
58
  __path_parts: t.Dict[str, str]
@@ -103,11 +105,16 @@ class SearchableSnapshotsClient(NamespacedClient):
103
105
  pretty: t.Optional[bool] = None,
104
106
  ) -> ObjectApiResponse[t.Any]:
105
107
  """
106
- Clear the cache of searchable snapshots.
108
+ .. raw:: html
109
+
110
+ <p>Clear the cache.
111
+ Clear indices and data streams from the shared cache for partially mounted indices.</p>
112
+
107
113
 
108
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-apis.html>`_
114
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-clear-cache.html>`_
109
115
 
110
- :param index: A comma-separated list of index names
116
+ :param index: A comma-separated list of data streams, indices, and aliases to
117
+ clear from the cache. It supports wildcards (`*`).
111
118
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
112
119
  into no concrete indices. (This includes `_all` string or when no indices
113
120
  have been specified)
@@ -175,22 +182,33 @@ class SearchableSnapshotsClient(NamespacedClient):
175
182
  body: t.Optional[t.Dict[str, t.Any]] = None,
176
183
  ) -> ObjectApiResponse[t.Any]:
177
184
  """
178
- Mount a snapshot as a searchable index.
185
+ .. raw:: html
186
+
187
+ <p>Mount a snapshot.
188
+ Mount a snapshot as a searchable snapshot index.
189
+ Do not use this API for snapshots managed by index lifecycle management (ILM).
190
+ Manually mounting ILM-managed snapshots can interfere with ILM processes.</p>
191
+
179
192
 
180
193
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-mount-snapshot.html>`_
181
194
 
182
195
  :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
- :param ignore_index_settings:
187
- :param index_settings:
188
- :param master_timeout: Explicit operation timeout for connection to master node
189
- :param renamed_index:
190
- :param storage: Selects the kind of local storage used to accelerate searches.
191
- Experimental, and defaults to `full_copy`
192
- :param wait_for_completion: Should this request wait until the operation has
193
- completed before returning
196
+ index to mount.
197
+ :param snapshot: The name of the snapshot of the index to mount.
198
+ :param index: The name of the index contained in the snapshot whose data is to
199
+ be mounted. If no `renamed_index` is specified, this name will also be used
200
+ to create the new index.
201
+ :param ignore_index_settings: The names of settings that should be removed from
202
+ the index when it is mounted.
203
+ :param index_settings: The settings that should be added to the index when it
204
+ is mounted.
205
+ :param master_timeout: The period to wait for the master node. If the master
206
+ node is not available before the timeout expires, the request fails and returns
207
+ an error. To indicate that the request should never timeout, set it to `-1`.
208
+ :param renamed_index: The name of the index that will be created.
209
+ :param storage: The mount option for the searchable snapshot index.
210
+ :param wait_for_completion: If true, the request blocks until the operation is
211
+ complete.
194
212
  """
195
213
  if repository in SKIP_IN_PATH:
196
214
  raise ValueError("Empty value passed for parameter 'repository'")
@@ -255,11 +273,15 @@ class SearchableSnapshotsClient(NamespacedClient):
255
273
  pretty: t.Optional[bool] = None,
256
274
  ) -> ObjectApiResponse[t.Any]:
257
275
  """
258
- Retrieve shard-level statistics about searchable snapshots.
276
+ .. raw:: html
277
+
278
+ <p>Get searchable snapshot statistics.</p>
279
+
259
280
 
260
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-apis.html>`_
281
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-stats.html>`_
261
282
 
262
- :param index: A comma-separated list of index names
283
+ :param index: A comma-separated list of data streams and indices to retrieve
284
+ statistics for.
263
285
  :param level: Return stats aggregated at cluster, index or shard level
264
286
  """
265
287
  __path_parts: t.Dict[str, str]