elasticsearch9 9.1.2__py3-none-any.whl → 9.1.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 (117) hide show
  1. elasticsearch9/_async/client/__init__.py +67 -65
  2. elasticsearch9/_async/client/async_search.py +3 -3
  3. elasticsearch9/_async/client/autoscaling.py +8 -4
  4. elasticsearch9/_async/client/cat.py +40 -2
  5. elasticsearch9/_async/client/ccr.py +10 -10
  6. elasticsearch9/_async/client/cluster.py +34 -33
  7. elasticsearch9/_async/client/connector.py +42 -41
  8. elasticsearch9/_async/client/dangling_indices.py +8 -12
  9. elasticsearch9/_async/client/enrich.py +10 -10
  10. elasticsearch9/_async/client/eql.py +10 -10
  11. elasticsearch9/_async/client/esql.py +16 -16
  12. elasticsearch9/_async/client/features.py +6 -6
  13. elasticsearch9/_async/client/fleet.py +8 -12
  14. elasticsearch9/_async/client/graph.py +3 -7
  15. elasticsearch9/_async/client/ilm.py +20 -28
  16. elasticsearch9/_async/client/indices.py +140 -160
  17. elasticsearch9/_async/client/inference.py +30 -126
  18. elasticsearch9/_async/client/ingest.py +9 -9
  19. elasticsearch9/_async/client/license.py +5 -7
  20. elasticsearch9/_async/client/logstash.py +4 -4
  21. elasticsearch9/_async/client/migration.py +6 -6
  22. elasticsearch9/_async/client/ml.py +125 -85
  23. elasticsearch9/_async/client/monitoring.py +4 -3
  24. elasticsearch9/_async/client/nodes.py +15 -15
  25. elasticsearch9/_async/client/query_rules.py +16 -16
  26. elasticsearch9/_async/client/rollup.py +21 -21
  27. elasticsearch9/_async/client/search_application.py +19 -19
  28. elasticsearch9/_async/client/searchable_snapshots.py +10 -10
  29. elasticsearch9/_async/client/security.py +8 -7
  30. elasticsearch9/_async/client/shutdown.py +9 -4
  31. elasticsearch9/_async/client/simulate.py +4 -4
  32. elasticsearch9/_async/client/slm.py +18 -22
  33. elasticsearch9/_async/client/snapshot.py +20 -20
  34. elasticsearch9/_async/client/sql.py +10 -10
  35. elasticsearch9/_async/client/streams.py +6 -6
  36. elasticsearch9/_async/client/synonyms.py +10 -10
  37. elasticsearch9/_async/client/tasks.py +8 -8
  38. elasticsearch9/_async/client/text_structure.py +13 -9
  39. elasticsearch9/_async/client/transform.py +51 -12
  40. elasticsearch9/_async/client/utils.py +4 -2
  41. elasticsearch9/_async/client/watcher.py +26 -26
  42. elasticsearch9/_async/client/xpack.py +6 -5
  43. elasticsearch9/_sync/client/__init__.py +69 -65
  44. elasticsearch9/_sync/client/async_search.py +3 -3
  45. elasticsearch9/_sync/client/autoscaling.py +8 -4
  46. elasticsearch9/_sync/client/cat.py +40 -2
  47. elasticsearch9/_sync/client/ccr.py +10 -10
  48. elasticsearch9/_sync/client/cluster.py +34 -33
  49. elasticsearch9/_sync/client/connector.py +42 -41
  50. elasticsearch9/_sync/client/dangling_indices.py +8 -12
  51. elasticsearch9/_sync/client/enrich.py +10 -10
  52. elasticsearch9/_sync/client/eql.py +10 -10
  53. elasticsearch9/_sync/client/esql.py +16 -16
  54. elasticsearch9/_sync/client/features.py +6 -6
  55. elasticsearch9/_sync/client/fleet.py +8 -12
  56. elasticsearch9/_sync/client/graph.py +3 -7
  57. elasticsearch9/_sync/client/ilm.py +20 -28
  58. elasticsearch9/_sync/client/indices.py +140 -160
  59. elasticsearch9/_sync/client/inference.py +30 -126
  60. elasticsearch9/_sync/client/ingest.py +9 -9
  61. elasticsearch9/_sync/client/license.py +5 -7
  62. elasticsearch9/_sync/client/logstash.py +4 -4
  63. elasticsearch9/_sync/client/migration.py +6 -6
  64. elasticsearch9/_sync/client/ml.py +125 -85
  65. elasticsearch9/_sync/client/monitoring.py +4 -3
  66. elasticsearch9/_sync/client/nodes.py +15 -15
  67. elasticsearch9/_sync/client/query_rules.py +16 -16
  68. elasticsearch9/_sync/client/rollup.py +21 -21
  69. elasticsearch9/_sync/client/search_application.py +19 -19
  70. elasticsearch9/_sync/client/searchable_snapshots.py +10 -10
  71. elasticsearch9/_sync/client/security.py +8 -7
  72. elasticsearch9/_sync/client/shutdown.py +9 -4
  73. elasticsearch9/_sync/client/simulate.py +4 -4
  74. elasticsearch9/_sync/client/slm.py +18 -22
  75. elasticsearch9/_sync/client/snapshot.py +20 -20
  76. elasticsearch9/_sync/client/sql.py +10 -10
  77. elasticsearch9/_sync/client/streams.py +6 -6
  78. elasticsearch9/_sync/client/synonyms.py +10 -10
  79. elasticsearch9/_sync/client/tasks.py +8 -8
  80. elasticsearch9/_sync/client/text_structure.py +13 -9
  81. elasticsearch9/_sync/client/transform.py +51 -12
  82. elasticsearch9/_sync/client/utils.py +16 -2
  83. elasticsearch9/_sync/client/watcher.py +26 -26
  84. elasticsearch9/_sync/client/xpack.py +6 -5
  85. elasticsearch9/_version.py +2 -2
  86. elasticsearch9/dsl/_async/document.py +4 -5
  87. elasticsearch9/dsl/_async/index.py +1 -1
  88. elasticsearch9/dsl/_async/search.py +2 -3
  89. elasticsearch9/dsl/_sync/document.py +4 -5
  90. elasticsearch9/dsl/_sync/index.py +1 -1
  91. elasticsearch9/dsl/_sync/search.py +2 -3
  92. elasticsearch9/dsl/aggs.py +3 -3
  93. elasticsearch9/dsl/async_connections.py +1 -2
  94. elasticsearch9/dsl/connections.py +1 -2
  95. elasticsearch9/dsl/document_base.py +1 -1
  96. elasticsearch9/dsl/field.py +1 -9
  97. elasticsearch9/dsl/query.py +24 -5
  98. elasticsearch9/dsl/serializer.py +1 -2
  99. elasticsearch9/dsl/types.py +11 -43
  100. elasticsearch9/dsl/utils.py +1 -2
  101. elasticsearch9/esql/esql.py +1 -1
  102. elasticsearch9/esql/functions.py +2 -2
  103. elasticsearch9/helpers/vectorstore/__init__.py +7 -7
  104. elasticsearch9/helpers/vectorstore/_async/_utils.py +1 -1
  105. elasticsearch9/helpers/vectorstore/_async/embedding_service.py +2 -2
  106. elasticsearch9/helpers/vectorstore/_async/strategies.py +3 -3
  107. elasticsearch9/helpers/vectorstore/_async/vectorstore.py +5 -5
  108. elasticsearch9/helpers/vectorstore/_sync/_utils.py +1 -1
  109. elasticsearch9/helpers/vectorstore/_sync/embedding_service.py +2 -2
  110. elasticsearch9/helpers/vectorstore/_sync/strategies.py +3 -3
  111. elasticsearch9/helpers/vectorstore/_sync/vectorstore.py +5 -5
  112. {elasticsearch9-9.1.2.dist-info → elasticsearch9-9.1.3.dist-info}/METADATA +1 -1
  113. elasticsearch9-9.1.3.dist-info/RECORD +165 -0
  114. {elasticsearch9-9.1.2.dist-info → elasticsearch9-9.1.3.dist-info}/WHEEL +1 -1
  115. elasticsearch9-9.1.2.dist-info/RECORD +0 -165
  116. {elasticsearch9-9.1.2.dist-info → elasticsearch9-9.1.3.dist-info}/licenses/LICENSE +0 -0
  117. {elasticsearch9-9.1.2.dist-info → elasticsearch9-9.1.3.dist-info}/licenses/NOTICE +0 -0
@@ -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):
@@ -1101,8 +1108,8 @@ class MlClient(NamespacedClient):
1101
1108
  """
1102
1109
  .. raw:: html
1103
1110
 
1104
- <p>Force buffered data to be processed.
1105
- The flush jobs API is only applicable when sending data for analysis using
1111
+ <p>Force buffered data to be processed.</p>
1112
+ <p>The flush jobs API is only applicable when sending data for analysis using
1106
1113
  the post data API. Depending on the content of the buffer, then it might
1107
1114
  additionally calculate new results. Both flush and close operations are
1108
1115
  similar, however the flush is more efficient if you are expecting to send
@@ -1269,8 +1276,8 @@ class MlClient(NamespacedClient):
1269
1276
  """
1270
1277
  .. raw:: html
1271
1278
 
1272
- <p>Get anomaly detection job results for buckets.
1273
- The API presents a chronological view of the records, grouped by bucket.</p>
1279
+ <p>Get anomaly detection job results for buckets.</p>
1280
+ <p>The API presents a chronological view of the records, grouped by bucket.</p>
1274
1281
 
1275
1282
 
1276
1283
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets>`_
@@ -1598,8 +1605,8 @@ class MlClient(NamespacedClient):
1598
1605
  """
1599
1606
  .. raw:: html
1600
1607
 
1601
- <p>Get data frame analytics job configuration info.
1602
- You can get information for multiple data frame analytics jobs in a single
1608
+ <p>Get data frame analytics job configuration info.</p>
1609
+ <p>You can get information for multiple data frame analytics jobs in a single
1603
1610
  API request by using a comma-separated list of data frame analytics jobs or a
1604
1611
  wildcard expression.</p>
1605
1612
 
@@ -1744,8 +1751,8 @@ class MlClient(NamespacedClient):
1744
1751
  """
1745
1752
  .. raw:: html
1746
1753
 
1747
- <p>Get datafeed stats.
1748
- You can get statistics for multiple datafeeds in a single API request by
1754
+ <p>Get datafeed stats.</p>
1755
+ <p>You can get statistics for multiple datafeeds in a single API request by
1749
1756
  using a comma-separated list of datafeeds or a wildcard expression. You can
1750
1757
  get statistics for all datafeeds by using <code>_all</code>, by specifying <code>*</code> as the
1751
1758
  <code>&lt;feed_id&gt;</code>, or by omitting the <code>&lt;feed_id&gt;</code>. If the datafeed is stopped, the
@@ -1809,8 +1816,8 @@ class MlClient(NamespacedClient):
1809
1816
  """
1810
1817
  .. raw:: html
1811
1818
 
1812
- <p>Get datafeeds configuration info.
1813
- You can get information for multiple datafeeds in a single API request by
1819
+ <p>Get datafeeds configuration info.</p>
1820
+ <p>You can get information for multiple datafeeds in a single API request by
1814
1821
  using a comma-separated list of datafeeds or a wildcard expression. You can
1815
1822
  get information for all datafeeds by using <code>_all</code>, by specifying <code>*</code> as the
1816
1823
  <code>&lt;feed_id&gt;</code>, or by omitting the <code>&lt;feed_id&gt;</code>.
@@ -1880,8 +1887,8 @@ class MlClient(NamespacedClient):
1880
1887
  """
1881
1888
  .. raw:: html
1882
1889
 
1883
- <p>Get filters.
1884
- You can get a single filter or all filters.</p>
1890
+ <p>Get filters.</p>
1891
+ <p>You can get a single filter or all filters.</p>
1885
1892
 
1886
1893
 
1887
1894
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters>`_
@@ -1946,8 +1953,8 @@ class MlClient(NamespacedClient):
1946
1953
  """
1947
1954
  .. raw:: html
1948
1955
 
1949
- <p>Get anomaly detection job results for influencers.
1950
- Influencers are the entities that have contributed to, or are to blame for,
1956
+ <p>Get anomaly detection job results for influencers.</p>
1957
+ <p>Influencers are the entities that have contributed to, or are to blame for,
1951
1958
  the anomalies. Influencer results are available only if an
1952
1959
  <code>influencer_field_name</code> is specified in the job configuration.</p>
1953
1960
 
@@ -2093,8 +2100,8 @@ class MlClient(NamespacedClient):
2093
2100
  """
2094
2101
  .. raw:: html
2095
2102
 
2096
- <p>Get anomaly detection jobs configuration info.
2097
- You can get information for multiple anomaly detection jobs in a single API
2103
+ <p>Get anomaly detection jobs configuration info.</p>
2104
+ <p>You can get information for multiple anomaly detection jobs in a single API
2098
2105
  request by using a group name, a comma-separated list of jobs, or a wildcard
2099
2106
  expression. You can get information for all anomaly detection jobs by using
2100
2107
  <code>_all</code>, by specifying <code>*</code> as the <code>&lt;job_id&gt;</code>, or by omitting the <code>&lt;job_id&gt;</code>.</p>
@@ -2161,8 +2168,8 @@ class MlClient(NamespacedClient):
2161
2168
  """
2162
2169
  .. raw:: html
2163
2170
 
2164
- <p>Get machine learning memory usage info.
2165
- Get information about how machine learning jobs and trained models are using memory,
2171
+ <p>Get machine learning memory usage info.</p>
2172
+ <p>Get information about how machine learning jobs and trained models are using memory,
2166
2173
  on each node, both within the JVM heap, and natively, outside of the JVM.</p>
2167
2174
 
2168
2175
 
@@ -2515,8 +2522,8 @@ class MlClient(NamespacedClient):
2515
2522
  """
2516
2523
  .. raw:: html
2517
2524
 
2518
- <p>Get anomaly records for an anomaly detection job.
2519
- Records contain the detailed analytical results. They describe the anomalous
2525
+ <p>Get anomaly records for an anomaly detection job.</p>
2526
+ <p>Records contain the detailed analytical results. They describe the anomalous
2520
2527
  activity that has been identified in the input data based on the detector
2521
2528
  configuration.
2522
2529
  There can be many anomaly records depending on the characteristics and size
@@ -2708,8 +2715,8 @@ class MlClient(NamespacedClient):
2708
2715
  """
2709
2716
  .. raw:: html
2710
2717
 
2711
- <p>Get trained models usage info.
2712
- You can get usage information for multiple trained
2718
+ <p>Get trained models usage info.</p>
2719
+ <p>You can get usage information for multiple trained
2713
2720
  models in a single API request by using a comma-separated list of model IDs or a wildcard expression.</p>
2714
2721
 
2715
2722
 
@@ -2836,8 +2843,8 @@ class MlClient(NamespacedClient):
2836
2843
  """
2837
2844
  .. raw:: html
2838
2845
 
2839
- <p>Get machine learning information.
2840
- Get defaults and limits used by machine learning.
2846
+ <p>Get machine learning information.</p>
2847
+ <p>Get defaults and limits used by machine learning.
2841
2848
  This endpoint is designed to be used by a user interface that needs to fully
2842
2849
  understand machine learning configurations where some options are not
2843
2850
  specified, meaning that the defaults should be used. This endpoint may be
@@ -3045,10 +3052,7 @@ class MlClient(NamespacedClient):
3045
3052
  if reset_start is not None:
3046
3053
  __query["reset_start"] = reset_start
3047
3054
  __body = data if data is not None else body
3048
- __headers = {
3049
- "accept": "application/json",
3050
- "content-type": "application/x-ndjson",
3051
- }
3055
+ __headers = {"accept": "application/json", "content-type": "application/json"}
3052
3056
  return await self.perform_request( # type: ignore[return-value]
3053
3057
  "POST",
3054
3058
  __path,
@@ -3076,8 +3080,8 @@ class MlClient(NamespacedClient):
3076
3080
  """
3077
3081
  .. raw:: html
3078
3082
 
3079
- <p>Preview features used by data frame analytics.
3080
- Preview the extracted features used by a data frame analytics config.</p>
3083
+ <p>Preview features used by data frame analytics.</p>
3084
+ <p>Preview the extracted features used by a data frame analytics config.</p>
3081
3085
 
3082
3086
 
3083
3087
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics>`_
@@ -3142,8 +3146,8 @@ class MlClient(NamespacedClient):
3142
3146
  """
3143
3147
  .. raw:: html
3144
3148
 
3145
- <p>Preview a datafeed.
3146
- This API returns the first &quot;page&quot; of search results from a datafeed.
3149
+ <p>Preview a datafeed.</p>
3150
+ <p>This API returns the first &quot;page&quot; of search results from a datafeed.
3147
3151
  You can preview an existing datafeed or provide configuration details for a datafeed
3148
3152
  and anomaly detection job in the API. The preview shows the structure of the data
3149
3153
  that will be passed to the anomaly detection engine.
@@ -3364,8 +3368,8 @@ class MlClient(NamespacedClient):
3364
3368
  """
3365
3369
  .. raw:: html
3366
3370
 
3367
- <p>Create a data frame analytics job.
3368
- This API creates a data frame analytics job that performs an analysis on the
3371
+ <p>Create a data frame analytics job.</p>
3372
+ <p>This API creates a data frame analytics job that performs an analysis on the
3369
3373
  source indices and stores the outcome in a destination index.
3370
3374
  By default, the query used in the source configuration is <code>{&quot;match_all&quot;: {}}</code>.</p>
3371
3375
  <p>If the destination index does not exist, it is created automatically when you start the job.</p>
@@ -3545,8 +3549,8 @@ class MlClient(NamespacedClient):
3545
3549
  """
3546
3550
  .. raw:: html
3547
3551
 
3548
- <p>Create a datafeed.
3549
- Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
3552
+ <p>Create a datafeed.</p>
3553
+ <p>Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
3550
3554
  You can associate only one datafeed with each anomaly detection job.
3551
3555
  The datafeed contains a query that runs at a defined interval (<code>frequency</code>).
3552
3556
  If you are concerned about delayed data, you can add a delay (<code>query_delay') at each interval. By default, the datafeed uses the following query: </code>{&quot;match_all&quot;: {&quot;boost&quot;: 1}}`.</p>
@@ -3714,8 +3718,8 @@ class MlClient(NamespacedClient):
3714
3718
  """
3715
3719
  .. raw:: html
3716
3720
 
3717
- <p>Create a filter.
3718
- A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
3721
+ <p>Create a filter.</p>
3722
+ <p>A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
3719
3723
  Specifically, filters are referenced in the <code>custom_rules</code> property of detector configuration objects.</p>
3720
3724
 
3721
3725
 
@@ -4019,8 +4023,8 @@ class MlClient(NamespacedClient):
4019
4023
  """
4020
4024
  .. raw:: html
4021
4025
 
4022
- <p>Create a trained model.
4023
- Enable you to supply a trained model that is not created by data frame analytics.</p>
4026
+ <p>Create a trained model.</p>
4027
+ <p>Enable you to supply a trained model that is not created by data frame analytics.</p>
4024
4028
 
4025
4029
 
4026
4030
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model>`_
@@ -4125,8 +4129,8 @@ class MlClient(NamespacedClient):
4125
4129
  """
4126
4130
  .. raw:: html
4127
4131
 
4128
- <p>Create or update a trained model alias.
4129
- A trained model alias is a logical name used to reference a single trained
4132
+ <p>Create or update a trained model alias.</p>
4133
+ <p>A trained model alias is a logical name used to reference a single trained
4130
4134
  model.
4131
4135
  You can use aliases instead of trained model identifiers to make it easier to
4132
4136
  reference your models. For example, you can use aliases in inference
@@ -4282,8 +4286,8 @@ class MlClient(NamespacedClient):
4282
4286
  """
4283
4287
  .. raw:: html
4284
4288
 
4285
- <p>Create a trained model vocabulary.
4286
- This API is supported only for natural language processing (NLP) models.
4289
+ <p>Create a trained model vocabulary.</p>
4290
+ <p>This API is supported only for natural language processing (NLP) models.
4287
4291
  The vocabulary is stored in the index as described in <code>inference_config.*.vocabulary</code> of the trained model definition.</p>
4288
4292
 
4289
4293
 
@@ -4343,8 +4347,8 @@ class MlClient(NamespacedClient):
4343
4347
  """
4344
4348
  .. raw:: html
4345
4349
 
4346
- <p>Reset an anomaly detection job.
4347
- All model state and results are deleted. The job is ready to start over as if
4350
+ <p>Reset an anomaly detection job.</p>
4351
+ <p>All model state and results are deleted. The job is ready to start over as if
4348
4352
  it had just been created.
4349
4353
  It is not currently possible to reset multiple jobs using wildcards or a
4350
4354
  comma separated list.</p>
@@ -4404,8 +4408,8 @@ class MlClient(NamespacedClient):
4404
4408
  """
4405
4409
  .. raw:: html
4406
4410
 
4407
- <p>Revert to a snapshot.
4408
- The machine learning features react quickly to anomalous input, learning new
4411
+ <p>Revert to a snapshot.</p>
4412
+ <p>The machine learning features react quickly to anomalous input, learning new
4409
4413
  behaviors in data. Highly anomalous input increases the variance in the
4410
4414
  models whilst the system learns whether this is a new step-change in behavior
4411
4415
  or a one-off event. In the case where this anomalous input is known to be a
@@ -4474,8 +4478,8 @@ class MlClient(NamespacedClient):
4474
4478
  """
4475
4479
  .. raw:: html
4476
4480
 
4477
- <p>Set upgrade_mode for ML indices.
4478
- Sets a cluster wide upgrade_mode setting that prepares machine learning
4481
+ <p>Set upgrade_mode for ML indices.</p>
4482
+ <p>Sets a cluster wide upgrade_mode setting that prepares machine learning
4479
4483
  indices for an upgrade.
4480
4484
  When upgrading your cluster, in some circumstances you must restart your
4481
4485
  nodes and reindex your machine learning indices. In those circumstances,
@@ -4521,7 +4525,9 @@ class MlClient(NamespacedClient):
4521
4525
  path_parts=__path_parts,
4522
4526
  )
4523
4527
 
4524
- @_rewrite_parameters()
4528
+ @_rewrite_parameters(
4529
+ body_fields=("timeout",),
4530
+ )
4525
4531
  async def start_data_frame_analytics(
4526
4532
  self,
4527
4533
  *,
@@ -4531,12 +4537,13 @@ class MlClient(NamespacedClient):
4531
4537
  human: t.Optional[bool] = None,
4532
4538
  pretty: t.Optional[bool] = None,
4533
4539
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4540
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4534
4541
  ) -> ObjectApiResponse[t.Any]:
4535
4542
  """
4536
4543
  .. raw:: html
4537
4544
 
4538
- <p>Start a data frame analytics job.
4539
- A data frame analytics job can be started and stopped multiple times
4545
+ <p>Start a data frame analytics job.</p>
4546
+ <p>A data frame analytics job can be started and stopped multiple times
4540
4547
  throughout its lifecycle.
4541
4548
  If the destination index does not exist, it is created automatically the
4542
4549
  first time you start the data frame analytics job. The
@@ -4562,6 +4569,7 @@ class MlClient(NamespacedClient):
4562
4569
  __path_parts: t.Dict[str, str] = {"id": _quote(id)}
4563
4570
  __path = f'/_ml/data_frame/analytics/{__path_parts["id"]}/_start'
4564
4571
  __query: t.Dict[str, t.Any] = {}
4572
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4565
4573
  if error_trace is not None:
4566
4574
  __query["error_trace"] = error_trace
4567
4575
  if filter_path is not None:
@@ -4570,14 +4578,20 @@ class MlClient(NamespacedClient):
4570
4578
  __query["human"] = human
4571
4579
  if pretty is not None:
4572
4580
  __query["pretty"] = pretty
4573
- if timeout is not None:
4574
- __query["timeout"] = timeout
4581
+ if not __body:
4582
+ if timeout is not None:
4583
+ __body["timeout"] = timeout
4584
+ if not __body:
4585
+ __body = None # type: ignore[assignment]
4575
4586
  __headers = {"accept": "application/json"}
4587
+ if __body is not None:
4588
+ __headers["content-type"] = "application/json"
4576
4589
  return await self.perform_request( # type: ignore[return-value]
4577
4590
  "POST",
4578
4591
  __path,
4579
4592
  params=__query,
4580
4593
  headers=__headers,
4594
+ body=__body,
4581
4595
  endpoint_id="ml.start_data_frame_analytics",
4582
4596
  path_parts=__path_parts,
4583
4597
  )
@@ -4685,8 +4699,8 @@ class MlClient(NamespacedClient):
4685
4699
  """
4686
4700
  .. raw:: html
4687
4701
 
4688
- <p>Start a trained model deployment.
4689
- It allocates the model to every machine learning node.</p>
4702
+ <p>Start a trained model deployment.</p>
4703
+ <p>It allocates the model to every machine learning node.</p>
4690
4704
 
4691
4705
 
4692
4706
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment>`_
@@ -4707,7 +4721,7 @@ class MlClient(NamespacedClient):
4707
4721
  is greater than the number of hardware threads it will automatically be changed
4708
4722
  to a value less than the number of hardware threads. If adaptive_allocations
4709
4723
  is enabled, do not set this value, because it’s automatically set.
4710
- :param priority: The deployment priority.
4724
+ :param priority: The deployment priority
4711
4725
  :param queue_capacity: Specifies the number of inference requests that are allowed
4712
4726
  in the queue. After the number of requests exceeds this value, new requests
4713
4727
  are rejected with a 429 error.
@@ -4769,7 +4783,9 @@ class MlClient(NamespacedClient):
4769
4783
  path_parts=__path_parts,
4770
4784
  )
4771
4785
 
4772
- @_rewrite_parameters()
4786
+ @_rewrite_parameters(
4787
+ body_fields=("allow_no_match", "force", "timeout"),
4788
+ )
4773
4789
  async def stop_data_frame_analytics(
4774
4790
  self,
4775
4791
  *,
@@ -4781,12 +4797,13 @@ class MlClient(NamespacedClient):
4781
4797
  human: t.Optional[bool] = None,
4782
4798
  pretty: t.Optional[bool] = None,
4783
4799
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4800
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4784
4801
  ) -> ObjectApiResponse[t.Any]:
4785
4802
  """
4786
4803
  .. raw:: html
4787
4804
 
4788
- <p>Stop data frame analytics jobs.
4789
- A data frame analytics job can be started and stopped multiple times
4805
+ <p>Stop data frame analytics jobs.</p>
4806
+ <p>A data frame analytics job can be started and stopped multiple times
4790
4807
  throughout its lifecycle.</p>
4791
4808
 
4792
4809
 
@@ -4812,26 +4829,33 @@ class MlClient(NamespacedClient):
4812
4829
  __path_parts: t.Dict[str, str] = {"id": _quote(id)}
4813
4830
  __path = f'/_ml/data_frame/analytics/{__path_parts["id"]}/_stop'
4814
4831
  __query: t.Dict[str, t.Any] = {}
4815
- if allow_no_match is not None:
4816
- __query["allow_no_match"] = allow_no_match
4832
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4817
4833
  if error_trace is not None:
4818
4834
  __query["error_trace"] = error_trace
4819
4835
  if filter_path is not None:
4820
4836
  __query["filter_path"] = filter_path
4821
- if force is not None:
4822
- __query["force"] = force
4823
4837
  if human is not None:
4824
4838
  __query["human"] = human
4825
4839
  if pretty is not None:
4826
4840
  __query["pretty"] = pretty
4827
- if timeout is not None:
4828
- __query["timeout"] = timeout
4841
+ if not __body:
4842
+ if allow_no_match is not None:
4843
+ __body["allow_no_match"] = allow_no_match
4844
+ if force is not None:
4845
+ __body["force"] = force
4846
+ if timeout is not None:
4847
+ __body["timeout"] = timeout
4848
+ if not __body:
4849
+ __body = None # type: ignore[assignment]
4829
4850
  __headers = {"accept": "application/json"}
4851
+ if __body is not None:
4852
+ __headers["content-type"] = "application/json"
4830
4853
  return await self.perform_request( # type: ignore[return-value]
4831
4854
  "POST",
4832
4855
  __path,
4833
4856
  params=__query,
4834
4857
  headers=__headers,
4858
+ body=__body,
4835
4859
  endpoint_id="ml.stop_data_frame_analytics",
4836
4860
  path_parts=__path_parts,
4837
4861
  )
@@ -4855,8 +4879,8 @@ class MlClient(NamespacedClient):
4855
4879
  """
4856
4880
  .. raw:: html
4857
4881
 
4858
- <p>Stop datafeeds.
4859
- A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
4882
+ <p>Stop datafeeds.</p>
4883
+ <p>A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
4860
4884
  multiple times throughout its lifecycle.</p>
4861
4885
 
4862
4886
 
@@ -4907,7 +4931,9 @@ class MlClient(NamespacedClient):
4907
4931
  path_parts=__path_parts,
4908
4932
  )
4909
4933
 
4910
- @_rewrite_parameters()
4934
+ @_rewrite_parameters(
4935
+ body_fields=("allow_no_match", "force", "id"),
4936
+ )
4911
4937
  async def stop_trained_model_deployment(
4912
4938
  self,
4913
4939
  *,
@@ -4917,7 +4943,9 @@ class MlClient(NamespacedClient):
4917
4943
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4918
4944
  force: t.Optional[bool] = None,
4919
4945
  human: t.Optional[bool] = None,
4946
+ id: t.Optional[str] = None,
4920
4947
  pretty: t.Optional[bool] = None,
4948
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4921
4949
  ) -> ObjectApiResponse[t.Any]:
4922
4950
  """
4923
4951
  .. raw:: html
@@ -4937,30 +4965,40 @@ class MlClient(NamespacedClient):
4937
4965
  no matches or only partial matches.
4938
4966
  :param force: Forcefully stops the deployment, even if it is used by ingest pipelines.
4939
4967
  You can't use these pipelines until you restart the model deployment.
4968
+ :param id: If provided, must be the same identifier as in the path.
4940
4969
  """
4941
4970
  if model_id in SKIP_IN_PATH:
4942
4971
  raise ValueError("Empty value passed for parameter 'model_id'")
4943
4972
  __path_parts: t.Dict[str, str] = {"model_id": _quote(model_id)}
4944
4973
  __path = f'/_ml/trained_models/{__path_parts["model_id"]}/deployment/_stop'
4945
4974
  __query: t.Dict[str, t.Any] = {}
4946
- if allow_no_match is not None:
4947
- __query["allow_no_match"] = allow_no_match
4975
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4948
4976
  if error_trace is not None:
4949
4977
  __query["error_trace"] = error_trace
4950
4978
  if filter_path is not None:
4951
4979
  __query["filter_path"] = filter_path
4952
- if force is not None:
4953
- __query["force"] = force
4954
4980
  if human is not None:
4955
4981
  __query["human"] = human
4956
4982
  if pretty is not None:
4957
4983
  __query["pretty"] = pretty
4984
+ if not __body:
4985
+ if allow_no_match is not None:
4986
+ __body["allow_no_match"] = allow_no_match
4987
+ if force is not None:
4988
+ __body["force"] = force
4989
+ if id is not None:
4990
+ __body["id"] = id
4991
+ if not __body:
4992
+ __body = None # type: ignore[assignment]
4958
4993
  __headers = {"accept": "application/json"}
4994
+ if __body is not None:
4995
+ __headers["content-type"] = "application/json"
4959
4996
  return await self.perform_request( # type: ignore[return-value]
4960
4997
  "POST",
4961
4998
  __path,
4962
4999
  params=__query,
4963
5000
  headers=__headers,
5001
+ body=__body,
4964
5002
  endpoint_id="ml.stop_trained_model_deployment",
4965
5003
  path_parts=__path_parts,
4966
5004
  )
@@ -5101,8 +5139,8 @@ class MlClient(NamespacedClient):
5101
5139
  """
5102
5140
  .. raw:: html
5103
5141
 
5104
- <p>Update a datafeed.
5105
- You must stop and start the datafeed for the changes to be applied.
5142
+ <p>Update a datafeed.</p>
5143
+ <p>You must stop and start the datafeed for the changes to be applied.
5106
5144
  When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
5107
5145
  the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
5108
5146
  those credentials are used instead.</p>
@@ -5265,8 +5303,8 @@ class MlClient(NamespacedClient):
5265
5303
  """
5266
5304
  .. raw:: html
5267
5305
 
5268
- <p>Update a filter.
5269
- Updates the description of a filter, adds items, or removes items from the list.</p>
5306
+ <p>Update a filter.</p>
5307
+ <p>Updates the description of a filter, adds items, or removes items from the list.</p>
5270
5308
 
5271
5309
 
5272
5310
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-filter>`_
@@ -5359,8 +5397,8 @@ class MlClient(NamespacedClient):
5359
5397
  """
5360
5398
  .. raw:: html
5361
5399
 
5362
- <p>Update an anomaly detection job.
5363
- Updates certain properties of an anomaly detection job.</p>
5400
+ <p>Update an anomaly detection job.</p>
5401
+ <p>Updates certain properties of an anomaly detection job.</p>
5364
5402
 
5365
5403
 
5366
5404
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job>`_
@@ -5491,8 +5529,8 @@ class MlClient(NamespacedClient):
5491
5529
  """
5492
5530
  .. raw:: html
5493
5531
 
5494
- <p>Update a snapshot.
5495
- Updates certain properties of a snapshot.</p>
5532
+ <p>Update a snapshot.</p>
5533
+ <p>Updates certain properties of a snapshot.</p>
5496
5534
 
5497
5535
 
5498
5536
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot>`_
@@ -5625,8 +5663,8 @@ class MlClient(NamespacedClient):
5625
5663
  """
5626
5664
  .. raw:: html
5627
5665
 
5628
- <p>Upgrade a snapshot.
5629
- Upgrade an anomaly detection model snapshot to the latest major version.
5666
+ <p>Upgrade a snapshot.</p>
5667
+ <p>Upgrade an anomaly detection model snapshot to the latest major version.
5630
5668
  Over time, older snapshot formats are deprecated and removed. Anomaly
5631
5669
  detection jobs support only snapshots that are from the current or previous
5632
5670
  major version.
@@ -5692,6 +5730,7 @@ class MlClient(NamespacedClient):
5692
5730
  "results_index_name",
5693
5731
  ),
5694
5732
  )
5733
+ @_availability_warning(Stability.STABLE, Visibility.PRIVATE)
5695
5734
  async def validate(
5696
5735
  self,
5697
5736
  *,
@@ -5773,6 +5812,7 @@ class MlClient(NamespacedClient):
5773
5812
  @_rewrite_parameters(
5774
5813
  body_name="detector",
5775
5814
  )
5815
+ @_availability_warning(Stability.STABLE, Visibility.PRIVATE)
5776
5816
  async def validate_detector(
5777
5817
  self,
5778
5818
  *,
@@ -20,7 +20,7 @@ import typing as t
20
20
  from elastic_transport import ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import _rewrite_parameters
23
+ from .utils import Stability, Visibility, _availability_warning, _rewrite_parameters
24
24
 
25
25
 
26
26
  class MonitoringClient(NamespacedClient):
@@ -28,6 +28,7 @@ class MonitoringClient(NamespacedClient):
28
28
  @_rewrite_parameters(
29
29
  body_name="operations",
30
30
  )
31
+ @_availability_warning(Stability.STABLE, Visibility.PRIVATE)
31
32
  async def bulk(
32
33
  self,
33
34
  *,
@@ -44,8 +45,8 @@ class MonitoringClient(NamespacedClient):
44
45
  """
45
46
  .. raw:: html
46
47
 
47
- <p>Send monitoring data.
48
- This API is used by the monitoring features to send monitoring data.</p>
48
+ <p>Send monitoring data.</p>
49
+ <p>This API is used by the monitoring features to send monitoring data.</p>
49
50
 
50
51
 
51
52
  `<https://www.elastic.co/docs/api/doc/elasticsearch>`_