elasticsearch 8.11.1__py3-none-any.whl → 8.12.0__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 (90) hide show
  1. elasticsearch/_async/client/__init__.py +493 -347
  2. elasticsearch/_async/client/async_search.py +108 -72
  3. elasticsearch/_async/client/autoscaling.py +13 -8
  4. elasticsearch/_async/client/cat.py +26 -26
  5. elasticsearch/_async/client/ccr.py +178 -117
  6. elasticsearch/_async/client/cluster.py +56 -48
  7. elasticsearch/_async/client/dangling_indices.py +3 -3
  8. elasticsearch/_async/client/enrich.py +15 -13
  9. elasticsearch/_async/client/eql.py +53 -36
  10. elasticsearch/_async/client/esql.py +99 -0
  11. elasticsearch/_async/client/features.py +2 -2
  12. elasticsearch/_async/client/fleet.py +111 -71
  13. elasticsearch/_async/client/graph.py +13 -11
  14. elasticsearch/_async/client/ilm.py +33 -27
  15. elasticsearch/_async/client/indices.py +326 -227
  16. elasticsearch/_async/client/inference.py +212 -0
  17. elasticsearch/_async/client/ingest.py +28 -24
  18. elasticsearch/_async/client/license.py +15 -13
  19. elasticsearch/_async/client/logstash.py +13 -10
  20. elasticsearch/_async/client/migration.py +3 -3
  21. elasticsearch/_async/client/ml.py +758 -538
  22. elasticsearch/_async/client/monitoring.py +10 -5
  23. elasticsearch/_async/client/nodes.py +13 -11
  24. elasticsearch/_async/client/query_ruleset.py +12 -10
  25. elasticsearch/_async/client/rollup.py +59 -46
  26. elasticsearch/_async/client/search_application.py +23 -16
  27. elasticsearch/_async/client/searchable_snapshots.py +23 -16
  28. elasticsearch/_async/client/security.py +391 -289
  29. elasticsearch/_async/client/shutdown.py +18 -14
  30. elasticsearch/_async/client/slm.py +23 -21
  31. elasticsearch/_async/client/snapshot.py +91 -65
  32. elasticsearch/_async/client/sql.py +81 -58
  33. elasticsearch/_async/client/ssl.py +1 -1
  34. elasticsearch/_async/client/synonyms.py +23 -19
  35. elasticsearch/_async/client/tasks.py +3 -3
  36. elasticsearch/_async/client/text_structure.py +10 -5
  37. elasticsearch/_async/client/transform.py +111 -75
  38. elasticsearch/_async/client/watcher.py +77 -55
  39. elasticsearch/_async/client/xpack.py +2 -2
  40. elasticsearch/_async/helpers.py +1 -1
  41. elasticsearch/_sync/client/__init__.py +493 -347
  42. elasticsearch/_sync/client/async_search.py +108 -72
  43. elasticsearch/_sync/client/autoscaling.py +13 -8
  44. elasticsearch/_sync/client/cat.py +26 -26
  45. elasticsearch/_sync/client/ccr.py +178 -117
  46. elasticsearch/_sync/client/cluster.py +56 -48
  47. elasticsearch/_sync/client/dangling_indices.py +3 -3
  48. elasticsearch/_sync/client/enrich.py +15 -13
  49. elasticsearch/_sync/client/eql.py +53 -36
  50. elasticsearch/_sync/client/esql.py +99 -0
  51. elasticsearch/_sync/client/features.py +2 -2
  52. elasticsearch/_sync/client/fleet.py +111 -71
  53. elasticsearch/_sync/client/graph.py +13 -11
  54. elasticsearch/_sync/client/ilm.py +33 -27
  55. elasticsearch/_sync/client/indices.py +326 -227
  56. elasticsearch/_sync/client/inference.py +212 -0
  57. elasticsearch/_sync/client/ingest.py +28 -24
  58. elasticsearch/_sync/client/license.py +15 -13
  59. elasticsearch/_sync/client/logstash.py +13 -10
  60. elasticsearch/_sync/client/migration.py +3 -3
  61. elasticsearch/_sync/client/ml.py +758 -538
  62. elasticsearch/_sync/client/monitoring.py +10 -5
  63. elasticsearch/_sync/client/nodes.py +13 -11
  64. elasticsearch/_sync/client/query_ruleset.py +12 -10
  65. elasticsearch/_sync/client/rollup.py +59 -46
  66. elasticsearch/_sync/client/search_application.py +23 -16
  67. elasticsearch/_sync/client/searchable_snapshots.py +23 -16
  68. elasticsearch/_sync/client/security.py +391 -289
  69. elasticsearch/_sync/client/shutdown.py +18 -14
  70. elasticsearch/_sync/client/slm.py +23 -21
  71. elasticsearch/_sync/client/snapshot.py +91 -65
  72. elasticsearch/_sync/client/sql.py +81 -58
  73. elasticsearch/_sync/client/ssl.py +1 -1
  74. elasticsearch/_sync/client/synonyms.py +23 -19
  75. elasticsearch/_sync/client/tasks.py +3 -3
  76. elasticsearch/_sync/client/text_structure.py +10 -5
  77. elasticsearch/_sync/client/transform.py +111 -75
  78. elasticsearch/_sync/client/utils.py +34 -10
  79. elasticsearch/_sync/client/watcher.py +77 -55
  80. elasticsearch/_sync/client/xpack.py +2 -2
  81. elasticsearch/_version.py +1 -1
  82. elasticsearch/client.py +2 -0
  83. elasticsearch/helpers/actions.py +1 -1
  84. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/METADATA +2 -3
  85. elasticsearch-8.12.0.dist-info/RECORD +103 -0
  86. elasticsearch-8.11.1.dist-info/RECORD +0 -99
  87. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/LICENSE +0 -0
  88. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/NOTICE +0 -0
  89. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/WHEEL +0 -0
  90. {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/top_level.txt +0 -0
@@ -42,7 +42,7 @@ class IlmClient(NamespacedClient):
42
42
  Deletes the specified lifecycle policy definition. A currently used policy cannot
43
43
  be deleted.
44
44
 
45
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-delete-lifecycle.html>`_
45
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-delete-lifecycle.html>`_
46
46
 
47
47
  :param name: Identifier for the policy.
48
48
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -92,7 +92,7 @@ class IlmClient(NamespacedClient):
92
92
  Retrieves information about the index's current lifecycle state, such as the
93
93
  currently executing phase, action, and step.
94
94
 
95
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-explain-lifecycle.html>`_
95
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-explain-lifecycle.html>`_
96
96
 
97
97
  :param index: Comma-separated list of data streams, indices, and aliases to target.
98
98
  Supports wildcards (`*`). To target all data streams and indices, use `*`
@@ -151,7 +151,7 @@ class IlmClient(NamespacedClient):
151
151
  Returns the specified policy definition. Includes the policy version and last
152
152
  modified date.
153
153
 
154
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-get-lifecycle.html>`_
154
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-get-lifecycle.html>`_
155
155
 
156
156
  :param name: Identifier for the policy.
157
157
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -194,7 +194,7 @@ class IlmClient(NamespacedClient):
194
194
  """
195
195
  Retrieves the current index lifecycle management (ILM) status.
196
196
 
197
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-get-status.html>`_
197
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-get-status.html>`_
198
198
  """
199
199
  __path = "/_ilm/status"
200
200
  __query: t.Dict[str, t.Any] = {}
@@ -212,7 +212,7 @@ class IlmClient(NamespacedClient):
212
212
  )
213
213
 
214
214
  @_rewrite_parameters(
215
- body_fields=True,
215
+ body_fields=("legacy_template_to_delete", "node_attribute"),
216
216
  )
217
217
  def migrate_to_data_tiers(
218
218
  self,
@@ -224,12 +224,13 @@ class IlmClient(NamespacedClient):
224
224
  legacy_template_to_delete: t.Optional[str] = None,
225
225
  node_attribute: t.Optional[str] = None,
226
226
  pretty: t.Optional[bool] = None,
227
+ body: t.Optional[t.Dict[str, t.Any]] = None,
227
228
  ) -> ObjectApiResponse[t.Any]:
228
229
  """
229
230
  Migrates the indices and ILM policies away from custom node attribute allocation
230
231
  routing to data tiers routing
231
232
 
232
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-migrate-to-data-tiers.html>`_
233
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-migrate-to-data-tiers.html>`_
233
234
 
234
235
  :param dry_run: If true, simulates the migration from node attributes based allocation
235
236
  filters to data tiers, but does not perform the migration. This provides
@@ -239,7 +240,7 @@ class IlmClient(NamespacedClient):
239
240
  """
240
241
  __path = "/_ilm/migrate_to_data_tiers"
241
242
  __query: t.Dict[str, t.Any] = {}
242
- __body: t.Dict[str, t.Any] = {}
243
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
243
244
  if dry_run is not None:
244
245
  __query["dry_run"] = dry_run
245
246
  if error_trace is not None:
@@ -248,12 +249,13 @@ class IlmClient(NamespacedClient):
248
249
  __query["filter_path"] = filter_path
249
250
  if human is not None:
250
251
  __query["human"] = human
251
- if legacy_template_to_delete is not None:
252
- __body["legacy_template_to_delete"] = legacy_template_to_delete
253
- if node_attribute is not None:
254
- __body["node_attribute"] = node_attribute
255
252
  if pretty is not None:
256
253
  __query["pretty"] = pretty
254
+ if not __body:
255
+ if legacy_template_to_delete is not None:
256
+ __body["legacy_template_to_delete"] = legacy_template_to_delete
257
+ if node_attribute is not None:
258
+ __body["node_attribute"] = node_attribute
257
259
  if not __body:
258
260
  __body = None # type: ignore[assignment]
259
261
  __headers = {"accept": "application/json"}
@@ -264,7 +266,7 @@ class IlmClient(NamespacedClient):
264
266
  )
265
267
 
266
268
  @_rewrite_parameters(
267
- body_fields=True,
269
+ body_fields=("current_step", "next_step"),
268
270
  )
269
271
  def move_to_step(
270
272
  self,
@@ -276,11 +278,12 @@ class IlmClient(NamespacedClient):
276
278
  human: t.Optional[bool] = None,
277
279
  next_step: t.Optional[t.Mapping[str, t.Any]] = None,
278
280
  pretty: t.Optional[bool] = None,
281
+ body: t.Optional[t.Dict[str, t.Any]] = None,
279
282
  ) -> ObjectApiResponse[t.Any]:
280
283
  """
281
284
  Manually moves an index into the specified step and executes that step.
282
285
 
283
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-move-to-step.html>`_
286
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-move-to-step.html>`_
284
287
 
285
288
  :param index: The name of the index whose lifecycle step is to change
286
289
  :param current_step:
@@ -289,20 +292,21 @@ class IlmClient(NamespacedClient):
289
292
  if index in SKIP_IN_PATH:
290
293
  raise ValueError("Empty value passed for parameter 'index'")
291
294
  __path = f"/_ilm/move/{_quote(index)}"
292
- __body: t.Dict[str, t.Any] = {}
293
295
  __query: t.Dict[str, t.Any] = {}
294
- if current_step is not None:
295
- __body["current_step"] = current_step
296
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
296
297
  if error_trace is not None:
297
298
  __query["error_trace"] = error_trace
298
299
  if filter_path is not None:
299
300
  __query["filter_path"] = filter_path
300
301
  if human is not None:
301
302
  __query["human"] = human
302
- if next_step is not None:
303
- __body["next_step"] = next_step
304
303
  if pretty is not None:
305
304
  __query["pretty"] = pretty
305
+ if not __body:
306
+ if current_step is not None:
307
+ __body["current_step"] = current_step
308
+ if next_step is not None:
309
+ __body["next_step"] = next_step
306
310
  if not __body:
307
311
  __body = None # type: ignore[assignment]
308
312
  __headers = {"accept": "application/json"}
@@ -313,7 +317,7 @@ class IlmClient(NamespacedClient):
313
317
  )
314
318
 
315
319
  @_rewrite_parameters(
316
- body_fields=True,
320
+ body_fields=("policy",),
317
321
  )
318
322
  def put_lifecycle(
319
323
  self,
@@ -328,11 +332,12 @@ class IlmClient(NamespacedClient):
328
332
  policy: t.Optional[t.Mapping[str, t.Any]] = None,
329
333
  pretty: t.Optional[bool] = None,
330
334
  timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
335
+ body: t.Optional[t.Dict[str, t.Any]] = None,
331
336
  ) -> ObjectApiResponse[t.Any]:
332
337
  """
333
338
  Creates a lifecycle policy
334
339
 
335
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-put-lifecycle.html>`_
340
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-put-lifecycle.html>`_
336
341
 
337
342
  :param name: Identifier for the policy.
338
343
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -346,7 +351,7 @@ class IlmClient(NamespacedClient):
346
351
  raise ValueError("Empty value passed for parameter 'name'")
347
352
  __path = f"/_ilm/policy/{_quote(name)}"
348
353
  __query: t.Dict[str, t.Any] = {}
349
- __body: t.Dict[str, t.Any] = {}
354
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
350
355
  if error_trace is not None:
351
356
  __query["error_trace"] = error_trace
352
357
  if filter_path is not None:
@@ -355,12 +360,13 @@ class IlmClient(NamespacedClient):
355
360
  __query["human"] = human
356
361
  if master_timeout is not None:
357
362
  __query["master_timeout"] = master_timeout
358
- if policy is not None:
359
- __body["policy"] = policy
360
363
  if pretty is not None:
361
364
  __query["pretty"] = pretty
362
365
  if timeout is not None:
363
366
  __query["timeout"] = timeout
367
+ if not __body:
368
+ if policy is not None:
369
+ __body["policy"] = policy
364
370
  if not __body:
365
371
  __body = None # type: ignore[assignment]
366
372
  __headers = {"accept": "application/json"}
@@ -383,7 +389,7 @@ class IlmClient(NamespacedClient):
383
389
  """
384
390
  Removes the assigned lifecycle policy and stops managing the specified index
385
391
 
386
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-remove-policy.html>`_
392
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-remove-policy.html>`_
387
393
 
388
394
  :param index: The name of the index to remove policy on
389
395
  """
@@ -417,7 +423,7 @@ class IlmClient(NamespacedClient):
417
423
  """
418
424
  Retries executing the policy for an index that is in the ERROR step.
419
425
 
420
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-retry-policy.html>`_
426
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-retry-policy.html>`_
421
427
 
422
428
  :param index: The name of the indices (comma-separated) whose failed lifecycle
423
429
  step is to be retry
@@ -455,7 +461,7 @@ class IlmClient(NamespacedClient):
455
461
  """
456
462
  Start the index lifecycle management (ILM) plugin.
457
463
 
458
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-start.html>`_
464
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-start.html>`_
459
465
 
460
466
  :param master_timeout:
461
467
  :param timeout:
@@ -496,7 +502,7 @@ class IlmClient(NamespacedClient):
496
502
  Halts all lifecycle management operations and stops the index lifecycle management
497
503
  (ILM) plugin
498
504
 
499
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.11/ilm-stop.html>`_
505
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/ilm-stop.html>`_
500
506
 
501
507
  :param master_timeout:
502
508
  :param timeout: