elasticsearch 8.19.2__py3-none-any.whl → 8.19.3__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 (98) hide show
  1. elasticsearch/_async/client/__init__.py +39 -18
  2. elasticsearch/_async/client/async_search.py +3 -3
  3. elasticsearch/_async/client/autoscaling.py +8 -4
  4. elasticsearch/_async/client/cat.py +40 -2
  5. elasticsearch/_async/client/ccr.py +2 -2
  6. elasticsearch/_async/client/cluster.py +10 -9
  7. elasticsearch/_async/client/connector.py +34 -33
  8. elasticsearch/_async/client/dangling_indices.py +6 -10
  9. elasticsearch/_async/client/eql.py +2 -2
  10. elasticsearch/_async/client/esql.py +1 -1
  11. elasticsearch/_async/client/features.py +2 -2
  12. elasticsearch/_async/client/fleet.py +3 -3
  13. elasticsearch/_async/client/indices.py +235 -25
  14. elasticsearch/_async/client/ingest.py +1 -1
  15. elasticsearch/_async/client/license.py +3 -5
  16. elasticsearch/_async/client/ml.py +61 -21
  17. elasticsearch/_async/client/monitoring.py +2 -1
  18. elasticsearch/_async/client/nodes.py +7 -7
  19. elasticsearch/_async/client/rollup.py +9 -9
  20. elasticsearch/_async/client/search_application.py +11 -11
  21. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  22. elasticsearch/_async/client/security.py +4 -4
  23. elasticsearch/_async/client/shutdown.py +7 -2
  24. elasticsearch/_async/client/simulate.py +2 -2
  25. elasticsearch/_async/client/slm.py +1 -1
  26. elasticsearch/_async/client/snapshot.py +3 -2
  27. elasticsearch/_async/client/streams.py +6 -6
  28. elasticsearch/_async/client/tasks.py +4 -4
  29. elasticsearch/_async/client/text_structure.py +5 -1
  30. elasticsearch/_async/client/transform.py +37 -0
  31. elasticsearch/_async/client/utils.py +4 -2
  32. elasticsearch/_async/client/watcher.py +2 -2
  33. elasticsearch/_async/client/xpack.py +2 -1
  34. elasticsearch/_sync/client/__init__.py +41 -18
  35. elasticsearch/_sync/client/async_search.py +3 -3
  36. elasticsearch/_sync/client/autoscaling.py +8 -4
  37. elasticsearch/_sync/client/cat.py +40 -2
  38. elasticsearch/_sync/client/ccr.py +2 -2
  39. elasticsearch/_sync/client/cluster.py +10 -9
  40. elasticsearch/_sync/client/connector.py +34 -33
  41. elasticsearch/_sync/client/dangling_indices.py +6 -10
  42. elasticsearch/_sync/client/eql.py +2 -2
  43. elasticsearch/_sync/client/esql.py +1 -1
  44. elasticsearch/_sync/client/features.py +2 -2
  45. elasticsearch/_sync/client/fleet.py +3 -3
  46. elasticsearch/_sync/client/indices.py +235 -25
  47. elasticsearch/_sync/client/ingest.py +1 -1
  48. elasticsearch/_sync/client/license.py +3 -5
  49. elasticsearch/_sync/client/ml.py +61 -21
  50. elasticsearch/_sync/client/monitoring.py +2 -1
  51. elasticsearch/_sync/client/nodes.py +7 -7
  52. elasticsearch/_sync/client/rollup.py +9 -9
  53. elasticsearch/_sync/client/search_application.py +11 -11
  54. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  55. elasticsearch/_sync/client/security.py +4 -4
  56. elasticsearch/_sync/client/shutdown.py +7 -2
  57. elasticsearch/_sync/client/simulate.py +2 -2
  58. elasticsearch/_sync/client/slm.py +1 -1
  59. elasticsearch/_sync/client/snapshot.py +3 -2
  60. elasticsearch/_sync/client/streams.py +6 -6
  61. elasticsearch/_sync/client/tasks.py +4 -4
  62. elasticsearch/_sync/client/text_structure.py +5 -1
  63. elasticsearch/_sync/client/transform.py +37 -0
  64. elasticsearch/_sync/client/utils.py +16 -2
  65. elasticsearch/_sync/client/watcher.py +2 -2
  66. elasticsearch/_sync/client/xpack.py +2 -1
  67. elasticsearch/_version.py +2 -2
  68. elasticsearch/dsl/_async/document.py +4 -5
  69. elasticsearch/dsl/_async/index.py +1 -1
  70. elasticsearch/dsl/_async/search.py +2 -3
  71. elasticsearch/dsl/_sync/document.py +4 -5
  72. elasticsearch/dsl/_sync/index.py +1 -1
  73. elasticsearch/dsl/_sync/search.py +2 -3
  74. elasticsearch/dsl/aggs.py +7 -7
  75. elasticsearch/dsl/async_connections.py +1 -2
  76. elasticsearch/dsl/connections.py +1 -2
  77. elasticsearch/dsl/document_base.py +1 -1
  78. elasticsearch/dsl/query.py +23 -0
  79. elasticsearch/dsl/serializer.py +1 -2
  80. elasticsearch/dsl/types.py +2 -0
  81. elasticsearch/dsl/utils.py +1 -2
  82. elasticsearch/esql/esql.py +1 -1
  83. elasticsearch/esql/functions.py +2 -2
  84. elasticsearch/helpers/vectorstore/__init__.py +7 -7
  85. elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
  86. elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
  87. elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
  88. elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
  89. elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
  90. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
  91. elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
  92. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
  93. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/METADATA +1 -1
  94. elasticsearch-8.19.3.dist-info/RECORD +166 -0
  95. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/WHEEL +1 -1
  96. elasticsearch-8.19.2.dist-info/RECORD +0 -166
  97. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/licenses/LICENSE +0 -0
  98. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/licenses/NOTICE +0 -0
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
23
23
  from .utils import (
24
24
  SKIP_IN_PATH,
25
25
  Stability,
26
+ _availability_warning,
26
27
  _quote,
27
28
  _rewrite_parameters,
28
- _stability_warning,
29
29
  )
30
30
 
31
31
 
@@ -244,7 +244,7 @@ class IndicesClient(NamespacedClient):
244
244
  )
245
245
 
246
246
  @_rewrite_parameters()
247
- @_stability_warning(Stability.EXPERIMENTAL)
247
+ @_availability_warning(Stability.EXPERIMENTAL)
248
248
  def cancel_migrate_reindex(
249
249
  self,
250
250
  *,
@@ -770,7 +770,7 @@ class IndicesClient(NamespacedClient):
770
770
  @_rewrite_parameters(
771
771
  body_name="create_from",
772
772
  )
773
- @_stability_warning(Stability.EXPERIMENTAL)
773
+ @_availability_warning(Stability.EXPERIMENTAL)
774
774
  def create_from(
775
775
  self,
776
776
  *,
@@ -1071,11 +1071,11 @@ class IndicesClient(NamespacedClient):
1071
1071
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-delete-lifecycle.html>`_
1072
1072
 
1073
1073
  :param name: A comma-separated list of data streams of which the data stream
1074
- lifecycle will be deleted; use `*` to get all data streams
1074
+ lifecycle will be deleted. Use `*` to get all data streams
1075
1075
  :param expand_wildcards: Whether wildcard expressions should get expanded to
1076
1076
  open or closed indices (default: open)
1077
- :param master_timeout: Specify timeout for connection to master
1078
- :param timeout: Explicit timestamp for the document
1077
+ :param master_timeout: The period to wait for a connection to the master node.
1078
+ :param timeout: The period to wait for a response.
1079
1079
  """
1080
1080
  if name in SKIP_IN_PATH:
1081
1081
  raise ValueError("Empty value passed for parameter 'name'")
@@ -1169,6 +1169,71 @@ class IndicesClient(NamespacedClient):
1169
1169
  path_parts=__path_parts,
1170
1170
  )
1171
1171
 
1172
+ @_rewrite_parameters()
1173
+ def delete_data_stream_options(
1174
+ self,
1175
+ *,
1176
+ name: t.Union[str, t.Sequence[str]],
1177
+ error_trace: t.Optional[bool] = None,
1178
+ expand_wildcards: t.Optional[
1179
+ t.Union[
1180
+ t.Sequence[
1181
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1182
+ ],
1183
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1184
+ ]
1185
+ ] = None,
1186
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1187
+ human: t.Optional[bool] = None,
1188
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1189
+ pretty: t.Optional[bool] = None,
1190
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1191
+ ) -> ObjectApiResponse[t.Any]:
1192
+ """
1193
+ .. raw:: html
1194
+
1195
+ <p>Delete data stream options.</p>
1196
+ <p>Removes the data stream options from a data stream.</p>
1197
+
1198
+
1199
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-delete-data-stream-options>`_
1200
+
1201
+ :param name: A comma-separated list of data streams of which the data stream
1202
+ options will be deleted. Use `*` to get all data streams
1203
+ :param expand_wildcards: Whether wildcard expressions should get expanded to
1204
+ open or closed indices
1205
+ :param master_timeout: The period to wait for a connection to the master node.
1206
+ :param timeout: The period to wait for a response.
1207
+ """
1208
+ if name in SKIP_IN_PATH:
1209
+ raise ValueError("Empty value passed for parameter 'name'")
1210
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
1211
+ __path = f'/_data_stream/{__path_parts["name"]}/_options'
1212
+ __query: t.Dict[str, t.Any] = {}
1213
+ if error_trace is not None:
1214
+ __query["error_trace"] = error_trace
1215
+ if expand_wildcards is not None:
1216
+ __query["expand_wildcards"] = expand_wildcards
1217
+ if filter_path is not None:
1218
+ __query["filter_path"] = filter_path
1219
+ if human is not None:
1220
+ __query["human"] = human
1221
+ if master_timeout is not None:
1222
+ __query["master_timeout"] = master_timeout
1223
+ if pretty is not None:
1224
+ __query["pretty"] = pretty
1225
+ if timeout is not None:
1226
+ __query["timeout"] = timeout
1227
+ __headers = {"accept": "application/json"}
1228
+ return self.perform_request( # type: ignore[return-value]
1229
+ "DELETE",
1230
+ __path,
1231
+ params=__query,
1232
+ headers=__headers,
1233
+ endpoint_id="indices.delete_data_stream_options",
1234
+ path_parts=__path_parts,
1235
+ )
1236
+
1172
1237
  @_rewrite_parameters()
1173
1238
  def delete_index_template(
1174
1239
  self,
@@ -1284,7 +1349,7 @@ class IndicesClient(NamespacedClient):
1284
1349
  )
1285
1350
 
1286
1351
  @_rewrite_parameters()
1287
- @_stability_warning(Stability.EXPERIMENTAL)
1352
+ @_availability_warning(Stability.EXPERIMENTAL)
1288
1353
  def disk_usage(
1289
1354
  self,
1290
1355
  *,
@@ -1376,7 +1441,7 @@ class IndicesClient(NamespacedClient):
1376
1441
  @_rewrite_parameters(
1377
1442
  body_name="config",
1378
1443
  )
1379
- @_stability_warning(Stability.EXPERIMENTAL)
1444
+ @_availability_warning(Stability.EXPERIMENTAL)
1380
1445
  def downsample(
1381
1446
  self,
1382
1447
  *,
@@ -1754,10 +1819,10 @@ class IndicesClient(NamespacedClient):
1754
1819
 
1755
1820
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-explain-lifecycle.html>`_
1756
1821
 
1757
- :param index: The name of the index to explain
1758
- :param include_defaults: indicates if the API should return the default values
1822
+ :param index: Comma-separated list of index names to explain
1823
+ :param include_defaults: Indicates if the API should return the default values
1759
1824
  the system uses for the index's lifecycle
1760
- :param master_timeout: Specify timeout for connection to master
1825
+ :param master_timeout: The period to wait for a connection to the master node.
1761
1826
  """
1762
1827
  if index in SKIP_IN_PATH:
1763
1828
  raise ValueError("Empty value passed for parameter 'index'")
@@ -1787,7 +1852,7 @@ class IndicesClient(NamespacedClient):
1787
1852
  )
1788
1853
 
1789
1854
  @_rewrite_parameters()
1790
- @_stability_warning(Stability.EXPERIMENTAL)
1855
+ @_availability_warning(Stability.EXPERIMENTAL)
1791
1856
  def field_usage_stats(
1792
1857
  self,
1793
1858
  *,
@@ -2039,15 +2104,15 @@ class IndicesClient(NamespacedClient):
2039
2104
  :param expand_wildcards: Whether to expand wildcard expression to concrete indices
2040
2105
  that are open, closed or both.
2041
2106
  :param flush: Specify whether the index should be flushed after performing the
2042
- operation (default: true)
2107
+ operation
2043
2108
  :param ignore_unavailable: Whether specified concrete indices should be ignored
2044
2109
  when unavailable (missing or closed)
2045
2110
  :param max_num_segments: The number of segments the index should be merged into
2046
- (default: dynamic)
2111
+ (defayult: dynamic)
2047
2112
  :param only_expunge_deletes: Specify whether the operation should only expunge
2048
2113
  deleted documents
2049
2114
  :param wait_for_completion: Should the request wait until the force merge is
2050
- completed.
2115
+ completed
2051
2116
  """
2052
2117
  __path_parts: t.Dict[str, str]
2053
2118
  if index not in SKIP_IN_PATH:
@@ -2463,6 +2528,71 @@ class IndicesClient(NamespacedClient):
2463
2528
  path_parts=__path_parts,
2464
2529
  )
2465
2530
 
2531
+ @_rewrite_parameters()
2532
+ def get_data_stream_options(
2533
+ self,
2534
+ *,
2535
+ name: t.Union[str, t.Sequence[str]],
2536
+ error_trace: t.Optional[bool] = None,
2537
+ expand_wildcards: t.Optional[
2538
+ t.Union[
2539
+ t.Sequence[
2540
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2541
+ ],
2542
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2543
+ ]
2544
+ ] = None,
2545
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2546
+ human: t.Optional[bool] = None,
2547
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2548
+ pretty: t.Optional[bool] = None,
2549
+ ) -> ObjectApiResponse[t.Any]:
2550
+ """
2551
+ .. raw:: html
2552
+
2553
+ <p>Get data stream options.</p>
2554
+ <p>Get the data stream options configuration of one or more data streams.</p>
2555
+
2556
+
2557
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-get-data-stream-options>`_
2558
+
2559
+ :param name: Comma-separated list of data streams to limit the request. Supports
2560
+ wildcards (`*`). To target all data streams, omit this parameter or use `*`
2561
+ or `_all`.
2562
+ :param expand_wildcards: Type of data stream that wildcard patterns can match.
2563
+ Supports comma-separated values, such as `open,hidden`. Valid values are:
2564
+ `all`, `open`, `closed`, `hidden`, `none`.
2565
+ :param master_timeout: Period to wait for a connection to the master node. If
2566
+ no response is received before the timeout expires, the request fails and
2567
+ returns an error.
2568
+ """
2569
+ if name in SKIP_IN_PATH:
2570
+ raise ValueError("Empty value passed for parameter 'name'")
2571
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
2572
+ __path = f'/_data_stream/{__path_parts["name"]}/_options'
2573
+ __query: t.Dict[str, t.Any] = {}
2574
+ if error_trace is not None:
2575
+ __query["error_trace"] = error_trace
2576
+ if expand_wildcards is not None:
2577
+ __query["expand_wildcards"] = expand_wildcards
2578
+ if filter_path is not None:
2579
+ __query["filter_path"] = filter_path
2580
+ if human is not None:
2581
+ __query["human"] = human
2582
+ if master_timeout is not None:
2583
+ __query["master_timeout"] = master_timeout
2584
+ if pretty is not None:
2585
+ __query["pretty"] = pretty
2586
+ __headers = {"accept": "application/json"}
2587
+ return self.perform_request( # type: ignore[return-value]
2588
+ "GET",
2589
+ __path,
2590
+ params=__query,
2591
+ headers=__headers,
2592
+ endpoint_id="indices.get_data_stream_options",
2593
+ path_parts=__path_parts,
2594
+ )
2595
+
2466
2596
  @_rewrite_parameters()
2467
2597
  def get_data_stream_settings(
2468
2598
  self,
@@ -2629,8 +2759,8 @@ class IndicesClient(NamespacedClient):
2629
2759
 
2630
2760
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-template.html>`_
2631
2761
 
2632
- :param name: Comma-separated list of index template names used to limit the request.
2633
- Wildcard (*) expressions are supported.
2762
+ :param name: Name of index template to retrieve. Wildcard (*) expressions are
2763
+ supported.
2634
2764
  :param flat_settings: If true, returns settings in flat format.
2635
2765
  :param include_defaults: If true, returns all relevant default configurations
2636
2766
  for the index template.
@@ -2761,7 +2891,7 @@ class IndicesClient(NamespacedClient):
2761
2891
  )
2762
2892
 
2763
2893
  @_rewrite_parameters()
2764
- @_stability_warning(Stability.EXPERIMENTAL)
2894
+ @_availability_warning(Stability.EXPERIMENTAL)
2765
2895
  def get_migrate_reindex_status(
2766
2896
  self,
2767
2897
  *,
@@ -2977,7 +3107,7 @@ class IndicesClient(NamespacedClient):
2977
3107
  @_rewrite_parameters(
2978
3108
  body_name="reindex",
2979
3109
  )
2980
- @_stability_warning(Stability.EXPERIMENTAL)
3110
+ @_availability_warning(Stability.EXPERIMENTAL)
2981
3111
  def migrate_reindex(
2982
3112
  self,
2983
3113
  *,
@@ -3281,7 +3411,7 @@ class IndicesClient(NamespacedClient):
3281
3411
 
3282
3412
  `<https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-promote-data-stream>`_
3283
3413
 
3284
- :param name: The name of the data stream
3414
+ :param name: The name of the data stream to promote
3285
3415
  :param master_timeout: Period to wait for a connection to the master node. If
3286
3416
  no response is received before the timeout expires, the request fails and
3287
3417
  returns an error.
@@ -3427,7 +3557,7 @@ class IndicesClient(NamespacedClient):
3427
3557
  *,
3428
3558
  name: t.Union[str, t.Sequence[str]],
3429
3559
  data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3430
- downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3560
+ downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
3431
3561
  enabled: t.Optional[bool] = None,
3432
3562
  error_trace: t.Optional[bool] = None,
3433
3563
  expand_wildcards: t.Optional[
@@ -3511,6 +3641,86 @@ class IndicesClient(NamespacedClient):
3511
3641
  path_parts=__path_parts,
3512
3642
  )
3513
3643
 
3644
+ @_rewrite_parameters(
3645
+ body_fields=("failure_store",),
3646
+ )
3647
+ def put_data_stream_options(
3648
+ self,
3649
+ *,
3650
+ name: t.Union[str, t.Sequence[str]],
3651
+ error_trace: t.Optional[bool] = None,
3652
+ expand_wildcards: t.Optional[
3653
+ t.Union[
3654
+ t.Sequence[
3655
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3656
+ ],
3657
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3658
+ ]
3659
+ ] = None,
3660
+ failure_store: t.Optional[t.Mapping[str, t.Any]] = None,
3661
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3662
+ human: t.Optional[bool] = None,
3663
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3664
+ pretty: t.Optional[bool] = None,
3665
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3666
+ body: t.Optional[t.Dict[str, t.Any]] = None,
3667
+ ) -> ObjectApiResponse[t.Any]:
3668
+ """
3669
+ .. raw:: html
3670
+
3671
+ <p>Update data stream options.</p>
3672
+ <p>Update the data stream options of the specified data streams.</p>
3673
+
3674
+
3675
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-update-data-stream-options>`_
3676
+
3677
+ :param name: Comma-separated list of data streams used to limit the request.
3678
+ Supports wildcards (`*`). To target all data streams use `*` or `_all`.
3679
+ :param expand_wildcards: Type of data stream that wildcard patterns can match.
3680
+ Supports comma-separated values, such as `open,hidden`. Valid values are:
3681
+ `all`, `hidden`, `open`, `closed`, `none`.
3682
+ :param failure_store: If defined, it will update the failure store configuration
3683
+ of every data stream resolved by the name expression.
3684
+ :param master_timeout: Period to wait for a connection to the master node. If
3685
+ no response is received before the timeout expires, the request fails and
3686
+ returns an error.
3687
+ :param timeout: Period to wait for a response. If no response is received before
3688
+ the timeout expires, the request fails and returns an error.
3689
+ """
3690
+ if name in SKIP_IN_PATH:
3691
+ raise ValueError("Empty value passed for parameter 'name'")
3692
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
3693
+ __path = f'/_data_stream/{__path_parts["name"]}/_options'
3694
+ __query: t.Dict[str, t.Any] = {}
3695
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
3696
+ if error_trace is not None:
3697
+ __query["error_trace"] = error_trace
3698
+ if expand_wildcards is not None:
3699
+ __query["expand_wildcards"] = expand_wildcards
3700
+ if filter_path is not None:
3701
+ __query["filter_path"] = filter_path
3702
+ if human is not None:
3703
+ __query["human"] = human
3704
+ if master_timeout is not None:
3705
+ __query["master_timeout"] = master_timeout
3706
+ if pretty is not None:
3707
+ __query["pretty"] = pretty
3708
+ if timeout is not None:
3709
+ __query["timeout"] = timeout
3710
+ if not __body:
3711
+ if failure_store is not None:
3712
+ __body["failure_store"] = failure_store
3713
+ __headers = {"accept": "application/json", "content-type": "application/json"}
3714
+ return self.perform_request( # type: ignore[return-value]
3715
+ "PUT",
3716
+ __path,
3717
+ params=__query,
3718
+ headers=__headers,
3719
+ body=__body,
3720
+ endpoint_id="indices.put_data_stream_options",
3721
+ path_parts=__path_parts,
3722
+ )
3723
+
3514
3724
  @_rewrite_parameters(
3515
3725
  body_name="settings",
3516
3726
  )
@@ -3662,7 +3872,7 @@ class IndicesClient(NamespacedClient):
3662
3872
  via `actions.auto_create_index`. If set to `false`, then indices or data
3663
3873
  streams matching the template must always be explicitly created, and may
3664
3874
  never be automatically created.
3665
- :param cause: User defined reason for creating/updating the index template
3875
+ :param cause: User defined reason for creating or updating the index template
3666
3876
  :param composed_of: An ordered list of component template names. Component templates
3667
3877
  are merged in the order specified, meaning that the last component template
3668
3878
  specified has the highest precedence.
@@ -3839,7 +4049,7 @@ class IndicesClient(NamespacedClient):
3839
4049
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-put-mapping.html>`_
3840
4050
 
3841
4051
  :param index: A comma-separated list of index names the mapping should be added
3842
- to (supports wildcards); use `_all` or omit to add the mapping on all indices.
4052
+ to (supports wildcards). Use `_all` or omit to add the mapping on all indices.
3843
4053
  :param allow_no_indices: If `false`, the request returns an error if any wildcard
3844
4054
  expression, index alias, or `_all` value targets only missing or closed indices.
3845
4055
  This behavior applies even if the request targets other open indices.
@@ -4138,7 +4348,7 @@ class IndicesClient(NamespacedClient):
4138
4348
 
4139
4349
  :param name: The name of the template
4140
4350
  :param aliases: Aliases for the index.
4141
- :param cause: User defined reason for creating/updating the index template
4351
+ :param cause: User defined reason for creating or updating the index template
4142
4352
  :param create: If true, this request cannot replace or update existing index
4143
4353
  templates.
4144
4354
  :param index_patterns: Array of wildcard expressions used to match the names
@@ -5493,7 +5703,7 @@ class IndicesClient(NamespacedClient):
5493
5703
 
5494
5704
  :param index: A comma-separated list of index names; use `_all` or empty string
5495
5705
  to perform the operation on all indices
5496
- :param metric: Limit the information returned the specific metrics.
5706
+ :param metric: Limit the information returned the specific metrics
5497
5707
  :param completion_fields: Comma-separated list or wildcard expressions of fields
5498
5708
  to include in fielddata and suggest statistics.
5499
5709
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
@@ -355,7 +355,7 @@ class IngestClient(NamespacedClient):
355
355
  :param master_timeout: Period to wait for a connection to the master node. If
356
356
  no response is received before the timeout expires, the request fails and
357
357
  returns an error.
358
- :param summary: Return pipelines without their definitions (default: false)
358
+ :param summary: Return pipelines without their definitions
359
359
  """
360
360
  __path_parts: t.Dict[str, str]
361
361
  if id not in SKIP_IN_PATH:
@@ -310,8 +310,7 @@ class LicenseClient(NamespacedClient):
310
310
 
311
311
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-basic.html>`_
312
312
 
313
- :param acknowledge: whether the user has acknowledged acknowledge messages (default:
314
- false)
313
+ :param acknowledge: Whether the user has acknowledged acknowledge messages
315
314
  :param master_timeout: Period to wait for a connection to the master node.
316
315
  :param timeout: Period to wait for a response. If no response is received before
317
316
  the timeout expires, the request fails and returns an error.
@@ -367,10 +366,9 @@ class LicenseClient(NamespacedClient):
367
366
 
368
367
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-trial.html>`_
369
368
 
370
- :param acknowledge: whether the user has acknowledged acknowledge messages (default:
371
- false)
369
+ :param acknowledge: Whether the user has acknowledged acknowledge messages
372
370
  :param master_timeout: Period to wait for a connection to the master node.
373
- :param type: The type of trial license to generate (default: "trial")
371
+ :param type: The type of trial license to generate
374
372
  """
375
373
  __path_parts: t.Dict[str, str] = {}
376
374
  __path = "/_license/start_trial"
@@ -20,7 +20,14 @@ import typing as t
20
20
  from elastic_transport import ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
23
+ from .utils import (
24
+ SKIP_IN_PATH,
25
+ Stability,
26
+ Visibility,
27
+ _availability_warning,
28
+ _quote,
29
+ _rewrite_parameters,
30
+ )
24
31
 
25
32
 
26
33
  class MlClient(NamespacedClient):
@@ -3050,10 +3057,7 @@ class MlClient(NamespacedClient):
3050
3057
  if reset_start is not None:
3051
3058
  __query["reset_start"] = reset_start
3052
3059
  __body = data if data is not None else body
3053
- __headers = {
3054
- "accept": "application/json",
3055
- "content-type": "application/x-ndjson",
3056
- }
3060
+ __headers = {"accept": "application/json", "content-type": "application/json"}
3057
3061
  return self.perform_request( # type: ignore[return-value]
3058
3062
  "POST",
3059
3063
  __path,
@@ -4526,7 +4530,9 @@ class MlClient(NamespacedClient):
4526
4530
  path_parts=__path_parts,
4527
4531
  )
4528
4532
 
4529
- @_rewrite_parameters()
4533
+ @_rewrite_parameters(
4534
+ body_fields=("timeout",),
4535
+ )
4530
4536
  def start_data_frame_analytics(
4531
4537
  self,
4532
4538
  *,
@@ -4536,6 +4542,7 @@ class MlClient(NamespacedClient):
4536
4542
  human: t.Optional[bool] = None,
4537
4543
  pretty: t.Optional[bool] = None,
4538
4544
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4545
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4539
4546
  ) -> ObjectApiResponse[t.Any]:
4540
4547
  """
4541
4548
  .. raw:: html
@@ -4567,6 +4574,7 @@ class MlClient(NamespacedClient):
4567
4574
  __path_parts: t.Dict[str, str] = {"id": _quote(id)}
4568
4575
  __path = f'/_ml/data_frame/analytics/{__path_parts["id"]}/_start'
4569
4576
  __query: t.Dict[str, t.Any] = {}
4577
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4570
4578
  if error_trace is not None:
4571
4579
  __query["error_trace"] = error_trace
4572
4580
  if filter_path is not None:
@@ -4575,14 +4583,20 @@ class MlClient(NamespacedClient):
4575
4583
  __query["human"] = human
4576
4584
  if pretty is not None:
4577
4585
  __query["pretty"] = pretty
4578
- if timeout is not None:
4579
- __query["timeout"] = timeout
4586
+ if not __body:
4587
+ if timeout is not None:
4588
+ __body["timeout"] = timeout
4589
+ if not __body:
4590
+ __body = None # type: ignore[assignment]
4580
4591
  __headers = {"accept": "application/json"}
4592
+ if __body is not None:
4593
+ __headers["content-type"] = "application/json"
4581
4594
  return self.perform_request( # type: ignore[return-value]
4582
4595
  "POST",
4583
4596
  __path,
4584
4597
  params=__query,
4585
4598
  headers=__headers,
4599
+ body=__body,
4586
4600
  endpoint_id="ml.start_data_frame_analytics",
4587
4601
  path_parts=__path_parts,
4588
4602
  )
@@ -4712,7 +4726,7 @@ class MlClient(NamespacedClient):
4712
4726
  is greater than the number of hardware threads it will automatically be changed
4713
4727
  to a value less than the number of hardware threads. If adaptive_allocations
4714
4728
  is enabled, do not set this value, because it’s automatically set.
4715
- :param priority: The deployment priority.
4729
+ :param priority: The deployment priority
4716
4730
  :param queue_capacity: Specifies the number of inference requests that are allowed
4717
4731
  in the queue. After the number of requests exceeds this value, new requests
4718
4732
  are rejected with a 429 error.
@@ -4774,7 +4788,9 @@ class MlClient(NamespacedClient):
4774
4788
  path_parts=__path_parts,
4775
4789
  )
4776
4790
 
4777
- @_rewrite_parameters()
4791
+ @_rewrite_parameters(
4792
+ body_fields=("allow_no_match", "force", "timeout"),
4793
+ )
4778
4794
  def stop_data_frame_analytics(
4779
4795
  self,
4780
4796
  *,
@@ -4786,6 +4802,7 @@ class MlClient(NamespacedClient):
4786
4802
  human: t.Optional[bool] = None,
4787
4803
  pretty: t.Optional[bool] = None,
4788
4804
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4805
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4789
4806
  ) -> ObjectApiResponse[t.Any]:
4790
4807
  """
4791
4808
  .. raw:: html
@@ -4817,26 +4834,33 @@ class MlClient(NamespacedClient):
4817
4834
  __path_parts: t.Dict[str, str] = {"id": _quote(id)}
4818
4835
  __path = f'/_ml/data_frame/analytics/{__path_parts["id"]}/_stop'
4819
4836
  __query: t.Dict[str, t.Any] = {}
4820
- if allow_no_match is not None:
4821
- __query["allow_no_match"] = allow_no_match
4837
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4822
4838
  if error_trace is not None:
4823
4839
  __query["error_trace"] = error_trace
4824
4840
  if filter_path is not None:
4825
4841
  __query["filter_path"] = filter_path
4826
- if force is not None:
4827
- __query["force"] = force
4828
4842
  if human is not None:
4829
4843
  __query["human"] = human
4830
4844
  if pretty is not None:
4831
4845
  __query["pretty"] = pretty
4832
- if timeout is not None:
4833
- __query["timeout"] = timeout
4846
+ if not __body:
4847
+ if allow_no_match is not None:
4848
+ __body["allow_no_match"] = allow_no_match
4849
+ if force is not None:
4850
+ __body["force"] = force
4851
+ if timeout is not None:
4852
+ __body["timeout"] = timeout
4853
+ if not __body:
4854
+ __body = None # type: ignore[assignment]
4834
4855
  __headers = {"accept": "application/json"}
4856
+ if __body is not None:
4857
+ __headers["content-type"] = "application/json"
4835
4858
  return self.perform_request( # type: ignore[return-value]
4836
4859
  "POST",
4837
4860
  __path,
4838
4861
  params=__query,
4839
4862
  headers=__headers,
4863
+ body=__body,
4840
4864
  endpoint_id="ml.stop_data_frame_analytics",
4841
4865
  path_parts=__path_parts,
4842
4866
  )
@@ -4912,7 +4936,9 @@ class MlClient(NamespacedClient):
4912
4936
  path_parts=__path_parts,
4913
4937
  )
4914
4938
 
4915
- @_rewrite_parameters()
4939
+ @_rewrite_parameters(
4940
+ body_fields=("allow_no_match", "force", "id"),
4941
+ )
4916
4942
  def stop_trained_model_deployment(
4917
4943
  self,
4918
4944
  *,
@@ -4922,7 +4948,9 @@ class MlClient(NamespacedClient):
4922
4948
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4923
4949
  force: t.Optional[bool] = None,
4924
4950
  human: t.Optional[bool] = None,
4951
+ id: t.Optional[str] = None,
4925
4952
  pretty: t.Optional[bool] = None,
4953
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4926
4954
  ) -> ObjectApiResponse[t.Any]:
4927
4955
  """
4928
4956
  .. raw:: html
@@ -4942,30 +4970,40 @@ class MlClient(NamespacedClient):
4942
4970
  no matches or only partial matches.
4943
4971
  :param force: Forcefully stops the deployment, even if it is used by ingest pipelines.
4944
4972
  You can't use these pipelines until you restart the model deployment.
4973
+ :param id: If provided, must be the same identifier as in the path.
4945
4974
  """
4946
4975
  if model_id in SKIP_IN_PATH:
4947
4976
  raise ValueError("Empty value passed for parameter 'model_id'")
4948
4977
  __path_parts: t.Dict[str, str] = {"model_id": _quote(model_id)}
4949
4978
  __path = f'/_ml/trained_models/{__path_parts["model_id"]}/deployment/_stop'
4950
4979
  __query: t.Dict[str, t.Any] = {}
4951
- if allow_no_match is not None:
4952
- __query["allow_no_match"] = allow_no_match
4980
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4953
4981
  if error_trace is not None:
4954
4982
  __query["error_trace"] = error_trace
4955
4983
  if filter_path is not None:
4956
4984
  __query["filter_path"] = filter_path
4957
- if force is not None:
4958
- __query["force"] = force
4959
4985
  if human is not None:
4960
4986
  __query["human"] = human
4961
4987
  if pretty is not None:
4962
4988
  __query["pretty"] = pretty
4989
+ if not __body:
4990
+ if allow_no_match is not None:
4991
+ __body["allow_no_match"] = allow_no_match
4992
+ if force is not None:
4993
+ __body["force"] = force
4994
+ if id is not None:
4995
+ __body["id"] = id
4996
+ if not __body:
4997
+ __body = None # type: ignore[assignment]
4963
4998
  __headers = {"accept": "application/json"}
4999
+ if __body is not None:
5000
+ __headers["content-type"] = "application/json"
4964
5001
  return self.perform_request( # type: ignore[return-value]
4965
5002
  "POST",
4966
5003
  __path,
4967
5004
  params=__query,
4968
5005
  headers=__headers,
5006
+ body=__body,
4969
5007
  endpoint_id="ml.stop_trained_model_deployment",
4970
5008
  path_parts=__path_parts,
4971
5009
  )
@@ -5697,6 +5735,7 @@ class MlClient(NamespacedClient):
5697
5735
  "results_index_name",
5698
5736
  ),
5699
5737
  )
5738
+ @_availability_warning(Stability.STABLE, Visibility.PRIVATE)
5700
5739
  def validate(
5701
5740
  self,
5702
5741
  *,
@@ -5778,6 +5817,7 @@ class MlClient(NamespacedClient):
5778
5817
  @_rewrite_parameters(
5779
5818
  body_name="detector",
5780
5819
  )
5820
+ @_availability_warning(Stability.STABLE, Visibility.PRIVATE)
5781
5821
  def validate_detector(
5782
5822
  self,
5783
5823
  *,