elasticsearch 8.17.2__py3-none-any.whl → 9.0.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 (138) hide show
  1. elasticsearch/_async/client/__init__.py +192 -312
  2. elasticsearch/_async/client/_base.py +1 -2
  3. elasticsearch/_async/client/async_search.py +14 -14
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -33
  6. elasticsearch/_async/client/ccr.py +186 -72
  7. elasticsearch/_async/client/cluster.py +42 -23
  8. elasticsearch/_async/client/connector.py +44 -30
  9. elasticsearch/_async/client/dangling_indices.py +3 -3
  10. elasticsearch/_async/client/enrich.py +26 -5
  11. elasticsearch/_async/client/eql.py +32 -4
  12. elasticsearch/_async/client/esql.py +64 -12
  13. elasticsearch/_async/client/features.py +12 -2
  14. elasticsearch/_async/client/fleet.py +23 -19
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +30 -22
  17. elasticsearch/_async/client/indices.py +435 -231
  18. elasticsearch/_async/client/inference.py +1906 -61
  19. elasticsearch/_async/client/ingest.py +32 -38
  20. elasticsearch/_async/client/license.py +51 -16
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +145 -121
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +10 -28
  26. elasticsearch/_async/client/query_rules.py +8 -8
  27. elasticsearch/_async/client/rollup.py +8 -8
  28. elasticsearch/_async/client/search_application.py +13 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  30. elasticsearch/_async/client/security.py +78 -75
  31. elasticsearch/_async/client/shutdown.py +3 -10
  32. elasticsearch/_async/client/simulate.py +6 -6
  33. elasticsearch/_async/client/slm.py +9 -9
  34. elasticsearch/_async/client/snapshot.py +280 -134
  35. elasticsearch/_async/client/sql.py +6 -6
  36. elasticsearch/_async/client/ssl.py +1 -1
  37. elasticsearch/_async/client/synonyms.py +7 -7
  38. elasticsearch/_async/client/tasks.py +3 -9
  39. elasticsearch/_async/client/text_structure.py +4 -4
  40. elasticsearch/_async/client/transform.py +30 -28
  41. elasticsearch/_async/client/watcher.py +23 -15
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_async/helpers.py +0 -1
  44. elasticsearch/_sync/client/__init__.py +192 -312
  45. elasticsearch/_sync/client/_base.py +1 -2
  46. elasticsearch/_sync/client/async_search.py +14 -14
  47. elasticsearch/_sync/client/autoscaling.py +4 -4
  48. elasticsearch/_sync/client/cat.py +26 -33
  49. elasticsearch/_sync/client/ccr.py +186 -72
  50. elasticsearch/_sync/client/cluster.py +42 -23
  51. elasticsearch/_sync/client/connector.py +44 -30
  52. elasticsearch/_sync/client/dangling_indices.py +3 -3
  53. elasticsearch/_sync/client/enrich.py +26 -5
  54. elasticsearch/_sync/client/eql.py +32 -4
  55. elasticsearch/_sync/client/esql.py +64 -12
  56. elasticsearch/_sync/client/features.py +12 -2
  57. elasticsearch/_sync/client/fleet.py +23 -19
  58. elasticsearch/_sync/client/graph.py +1 -1
  59. elasticsearch/_sync/client/ilm.py +30 -22
  60. elasticsearch/_sync/client/indices.py +435 -231
  61. elasticsearch/_sync/client/inference.py +1906 -61
  62. elasticsearch/_sync/client/ingest.py +32 -38
  63. elasticsearch/_sync/client/license.py +51 -16
  64. elasticsearch/_sync/client/logstash.py +3 -3
  65. elasticsearch/_sync/client/migration.py +3 -3
  66. elasticsearch/_sync/client/ml.py +145 -121
  67. elasticsearch/_sync/client/monitoring.py +1 -1
  68. elasticsearch/_sync/client/nodes.py +10 -28
  69. elasticsearch/_sync/client/query_rules.py +8 -8
  70. elasticsearch/_sync/client/rollup.py +8 -8
  71. elasticsearch/_sync/client/search_application.py +13 -13
  72. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  73. elasticsearch/_sync/client/security.py +78 -75
  74. elasticsearch/_sync/client/shutdown.py +3 -10
  75. elasticsearch/_sync/client/simulate.py +6 -6
  76. elasticsearch/_sync/client/slm.py +9 -9
  77. elasticsearch/_sync/client/snapshot.py +280 -134
  78. elasticsearch/_sync/client/sql.py +6 -6
  79. elasticsearch/_sync/client/ssl.py +1 -1
  80. elasticsearch/_sync/client/synonyms.py +7 -7
  81. elasticsearch/_sync/client/tasks.py +3 -9
  82. elasticsearch/_sync/client/text_structure.py +4 -4
  83. elasticsearch/_sync/client/transform.py +30 -28
  84. elasticsearch/_sync/client/utils.py +0 -40
  85. elasticsearch/_sync/client/watcher.py +23 -15
  86. elasticsearch/_sync/client/xpack.py +2 -2
  87. elasticsearch/_version.py +1 -1
  88. elasticsearch/dsl/__init__.py +203 -0
  89. elasticsearch/dsl/_async/__init__.py +16 -0
  90. elasticsearch/dsl/_async/document.py +522 -0
  91. elasticsearch/dsl/_async/faceted_search.py +50 -0
  92. elasticsearch/dsl/_async/index.py +639 -0
  93. elasticsearch/dsl/_async/mapping.py +49 -0
  94. elasticsearch/dsl/_async/search.py +237 -0
  95. elasticsearch/dsl/_async/update_by_query.py +47 -0
  96. elasticsearch/dsl/_sync/__init__.py +16 -0
  97. elasticsearch/dsl/_sync/document.py +514 -0
  98. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  99. elasticsearch/dsl/_sync/index.py +597 -0
  100. elasticsearch/dsl/_sync/mapping.py +49 -0
  101. elasticsearch/dsl/_sync/search.py +230 -0
  102. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  103. elasticsearch/dsl/aggs.py +3734 -0
  104. elasticsearch/dsl/analysis.py +341 -0
  105. elasticsearch/dsl/async_connections.py +37 -0
  106. elasticsearch/dsl/connections.py +142 -0
  107. elasticsearch/dsl/document.py +20 -0
  108. elasticsearch/dsl/document_base.py +444 -0
  109. elasticsearch/dsl/exceptions.py +32 -0
  110. elasticsearch/dsl/faceted_search.py +28 -0
  111. elasticsearch/dsl/faceted_search_base.py +489 -0
  112. elasticsearch/dsl/field.py +4392 -0
  113. elasticsearch/dsl/function.py +180 -0
  114. elasticsearch/dsl/index.py +23 -0
  115. elasticsearch/dsl/index_base.py +178 -0
  116. elasticsearch/dsl/mapping.py +19 -0
  117. elasticsearch/dsl/mapping_base.py +219 -0
  118. elasticsearch/dsl/query.py +2822 -0
  119. elasticsearch/dsl/response/__init__.py +388 -0
  120. elasticsearch/dsl/response/aggs.py +100 -0
  121. elasticsearch/dsl/response/hit.py +53 -0
  122. elasticsearch/dsl/search.py +20 -0
  123. elasticsearch/dsl/search_base.py +1053 -0
  124. elasticsearch/dsl/serializer.py +34 -0
  125. elasticsearch/dsl/types.py +6453 -0
  126. elasticsearch/dsl/update_by_query.py +19 -0
  127. elasticsearch/dsl/update_by_query_base.py +149 -0
  128. elasticsearch/dsl/utils.py +687 -0
  129. elasticsearch/dsl/wrappers.py +144 -0
  130. elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
  131. elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
  132. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/METADATA +12 -15
  133. elasticsearch-9.0.0.dist-info/RECORD +160 -0
  134. elasticsearch/transport.py +0 -57
  135. elasticsearch-8.17.2.dist-info/RECORD +0 -119
  136. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/WHEEL +0 -0
  137. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/LICENSE +0 -0
  138. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/NOTICE +0 -0
@@ -38,14 +38,14 @@ class MlClient(NamespacedClient):
38
38
  """
39
39
  .. raw:: html
40
40
 
41
- <p>Clear trained model deployment cache.
42
- Cache will be cleared on all nodes where the trained model is assigned.
41
+ <p>Clear trained model deployment cache.</p>
42
+ <p>Cache will be cleared on all nodes where the trained model is assigned.
43
43
  A trained model deployment may have an inference cache enabled.
44
44
  As requests are handled by each allocated node, their responses may be cached on that individual node.
45
45
  Calling this API clears the caches without restarting the deployment.</p>
46
46
 
47
47
 
48
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-trained-model-deployment-cache.html>`_
48
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-clear-trained-model-deployment-cache>`_
49
49
 
50
50
  :param model_id: The unique identifier of the trained model.
51
51
  """
@@ -93,14 +93,14 @@ class MlClient(NamespacedClient):
93
93
  """
94
94
  .. raw:: html
95
95
 
96
- <p>Close anomaly detection jobs.
97
- A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
96
+ <p>Close anomaly detection jobs.</p>
97
+ <p>A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
98
98
  When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.
99
99
  If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.
100
100
  When a datafeed that has a specified end date stops, it automatically closes its associated job.</p>
101
101
 
102
102
 
103
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-close-job.html>`_
103
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-close-job>`_
104
104
 
105
105
  :param job_id: Identifier for the anomaly detection job. It can be a job identifier,
106
106
  a group name, or a wildcard expression. You can close multiple anomaly detection
@@ -161,11 +161,11 @@ class MlClient(NamespacedClient):
161
161
  """
162
162
  .. raw:: html
163
163
 
164
- <p>Delete a calendar.
165
- Removes all scheduled events from a calendar, then deletes it.</p>
164
+ <p>Delete a calendar.</p>
165
+ <p>Remove all scheduled events from a calendar, then delete it.</p>
166
166
 
167
167
 
168
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-calendar.html>`_
168
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-calendar>`_
169
169
 
170
170
  :param calendar_id: A string that uniquely identifies a calendar.
171
171
  """
@@ -209,7 +209,7 @@ class MlClient(NamespacedClient):
209
209
  <p>Delete events from a calendar.</p>
210
210
 
211
211
 
212
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-calendar-event.html>`_
212
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-calendar-event>`_
213
213
 
214
214
  :param calendar_id: A string that uniquely identifies a calendar.
215
215
  :param event_id: Identifier for the scheduled event. You can obtain this identifier
@@ -260,7 +260,7 @@ class MlClient(NamespacedClient):
260
260
  <p>Delete anomaly jobs from a calendar.</p>
261
261
 
262
262
 
263
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-calendar-job.html>`_
263
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-calendar-job>`_
264
264
 
265
265
  :param calendar_id: A string that uniquely identifies a calendar.
266
266
  :param job_id: An identifier for the anomaly detection jobs. It can be a job
@@ -312,7 +312,7 @@ class MlClient(NamespacedClient):
312
312
  <p>Delete a data frame analytics job.</p>
313
313
 
314
314
 
315
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-dfanalytics.html>`_
315
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-data-frame-analytics>`_
316
316
 
317
317
  :param id: Identifier for the data frame analytics job.
318
318
  :param force: If `true`, it deletes a job that is not stopped; this method is
@@ -363,7 +363,7 @@ class MlClient(NamespacedClient):
363
363
  <p>Delete a datafeed.</p>
364
364
 
365
365
 
366
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-datafeed.html>`_
366
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-datafeed>`_
367
367
 
368
368
  :param datafeed_id: A numerical character string that uniquely identifies the
369
369
  datafeed. This identifier can contain lowercase alphanumeric characters (a-z
@@ -415,18 +415,18 @@ class MlClient(NamespacedClient):
415
415
  """
416
416
  .. raw:: html
417
417
 
418
- <p>Delete expired ML data.
419
- Deletes all job results, model snapshots and forecast data that have exceeded
418
+ <p>Delete expired ML data.</p>
419
+ <p>Delete all job results, model snapshots and forecast data that have exceeded
420
420
  their retention days period. Machine learning state documents that are not
421
421
  associated with any job are also deleted.
422
422
  You can limit the request to a single or set of anomaly detection jobs by
423
423
  using a job identifier, a group name, a comma-separated list of jobs, or a
424
424
  wildcard expression. You can delete expired data for all anomaly detection
425
- jobs by using _all, by specifying * as the &lt;job_id&gt;, or by omitting the
426
- &lt;job_id&gt;.</p>
425
+ jobs by using <code>_all</code>, by specifying <code>*</code> as the <code>&lt;job_id&gt;</code>, or by omitting the
426
+ <code>&lt;job_id&gt;</code>.</p>
427
427
 
428
428
 
429
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-expired-data.html>`_
429
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-expired-data>`_
430
430
 
431
431
  :param job_id: Identifier for an anomaly detection job. It can be a job identifier,
432
432
  a group name, or a wildcard expression.
@@ -485,12 +485,12 @@ class MlClient(NamespacedClient):
485
485
  """
486
486
  .. raw:: html
487
487
 
488
- <p>Delete a filter.
489
- If an anomaly detection job references the filter, you cannot delete the
488
+ <p>Delete a filter.</p>
489
+ <p>If an anomaly detection job references the filter, you cannot delete the
490
490
  filter. You must update or delete the job before you can delete the filter.</p>
491
491
 
492
492
 
493
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-filter.html>`_
493
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-filter>`_
494
494
 
495
495
  :param filter_id: A string that uniquely identifies a filter.
496
496
  """
@@ -533,14 +533,14 @@ class MlClient(NamespacedClient):
533
533
  """
534
534
  .. raw:: html
535
535
 
536
- <p>Delete forecasts from a job.
537
- By default, forecasts are retained for 14 days. You can specify a
536
+ <p>Delete forecasts from a job.</p>
537
+ <p>By default, forecasts are retained for 14 days. You can specify a
538
538
  different retention period with the <code>expires_in</code> parameter in the forecast
539
539
  jobs API. The delete forecast API enables you to delete one or more
540
540
  forecasts before they expire.</p>
541
541
 
542
542
 
543
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-forecast.html>`_
543
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-forecast>`_
544
544
 
545
545
  :param job_id: Identifier for the anomaly detection job.
546
546
  :param forecast_id: A comma-separated list of forecast identifiers. If you do
@@ -607,8 +607,8 @@ class MlClient(NamespacedClient):
607
607
  """
608
608
  .. raw:: html
609
609
 
610
- <p>Delete an anomaly detection job.
611
- All job configuration, model state and results are deleted.
610
+ <p>Delete an anomaly detection job.</p>
611
+ <p>All job configuration, model state and results are deleted.
612
612
  It is not currently possible to delete multiple jobs using wildcards or a
613
613
  comma separated list. If you delete a job that has a datafeed, the request
614
614
  first tries to delete the datafeed. This behavior is equivalent to calling
@@ -616,7 +616,7 @@ class MlClient(NamespacedClient):
616
616
  delete job request.</p>
617
617
 
618
618
 
619
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-job.html>`_
619
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-job>`_
620
620
 
621
621
  :param job_id: Identifier for the anomaly detection job.
622
622
  :param delete_user_annotations: Specifies whether annotations that have been
@@ -670,13 +670,13 @@ class MlClient(NamespacedClient):
670
670
  """
671
671
  .. raw:: html
672
672
 
673
- <p>Delete a model snapshot.
674
- You cannot delete the active model snapshot. To delete that snapshot, first
673
+ <p>Delete a model snapshot.</p>
674
+ <p>You cannot delete the active model snapshot. To delete that snapshot, first
675
675
  revert to a different one. To identify the active model snapshot, refer to
676
676
  the <code>model_snapshot_id</code> in the results from the get jobs API.</p>
677
677
 
678
678
 
679
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-snapshot.html>`_
679
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-model-snapshot>`_
680
680
 
681
681
  :param job_id: Identifier for the anomaly detection job.
682
682
  :param snapshot_id: Identifier for the model snapshot.
@@ -719,19 +719,22 @@ class MlClient(NamespacedClient):
719
719
  force: t.Optional[bool] = None,
720
720
  human: t.Optional[bool] = None,
721
721
  pretty: t.Optional[bool] = None,
722
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
722
723
  ) -> ObjectApiResponse[t.Any]:
723
724
  """
724
725
  .. raw:: html
725
726
 
726
- <p>Delete an unreferenced trained model.
727
- The request deletes a trained inference model that is not referenced by an ingest pipeline.</p>
727
+ <p>Delete an unreferenced trained model.</p>
728
+ <p>The request deletes a trained inference model that is not referenced by an ingest pipeline.</p>
728
729
 
729
730
 
730
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-trained-models.html>`_
731
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-trained-model>`_
731
732
 
732
733
  :param model_id: The unique identifier of the trained model.
733
734
  :param force: Forcefully deletes a trained model that is referenced by ingest
734
735
  pipelines or has a started deployment.
736
+ :param timeout: Period to wait for a response. If no response is received before
737
+ the timeout expires, the request fails and returns an error.
735
738
  """
736
739
  if model_id in SKIP_IN_PATH:
737
740
  raise ValueError("Empty value passed for parameter 'model_id'")
@@ -748,6 +751,8 @@ class MlClient(NamespacedClient):
748
751
  __query["human"] = human
749
752
  if pretty is not None:
750
753
  __query["pretty"] = pretty
754
+ if timeout is not None:
755
+ __query["timeout"] = timeout
751
756
  __headers = {"accept": "application/json"}
752
757
  return self.perform_request( # type: ignore[return-value]
753
758
  "DELETE",
@@ -772,13 +777,13 @@ class MlClient(NamespacedClient):
772
777
  """
773
778
  .. raw:: html
774
779
 
775
- <p>Delete a trained model alias.
776
- This API deletes an existing model alias that refers to a trained model. If
780
+ <p>Delete a trained model alias.</p>
781
+ <p>This API deletes an existing model alias that refers to a trained model. If
777
782
  the model alias is missing or refers to a model other than the one identified
778
783
  by the <code>model_id</code>, this API returns an error.</p>
779
784
 
780
785
 
781
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-trained-models-aliases.html>`_
786
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-delete-trained-model-alias>`_
782
787
 
783
788
  :param model_id: The trained model ID to which the model alias refers.
784
789
  :param model_alias: The model alias to delete.
@@ -833,13 +838,13 @@ class MlClient(NamespacedClient):
833
838
  """
834
839
  .. raw:: html
835
840
 
836
- <p>Estimate job model memory usage.
837
- Makes an estimation of the memory usage for an anomaly detection job model.
838
- It is based on analysis configuration details for the job and cardinality
841
+ <p>Estimate job model memory usage.</p>
842
+ <p>Make an estimation of the memory usage for an anomaly detection job model.
843
+ The estimate is based on analysis configuration details for the job and cardinality
839
844
  estimates for the fields it references.</p>
840
845
 
841
846
 
842
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-apis.html>`_
847
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-estimate-model-memory>`_
843
848
 
844
849
  :param analysis_config: For a list of the properties that you can specify in
845
850
  the `analysis_config` component of the body of this API.
@@ -904,14 +909,14 @@ class MlClient(NamespacedClient):
904
909
  """
905
910
  .. raw:: html
906
911
 
907
- <p>Evaluate data frame analytics.
908
- The API packages together commonly used evaluation metrics for various types
912
+ <p>Evaluate data frame analytics.</p>
913
+ <p>The API packages together commonly used evaluation metrics for various types
909
914
  of machine learning features. This has been designed for use on indexes
910
915
  created by data frame analytics. Evaluation requires both a ground truth
911
916
  field and an analytics result field to be present.</p>
912
917
 
913
918
 
914
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/evaluate-dfanalytics.html>`_
919
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-evaluate-data-frame>`_
915
920
 
916
921
  :param evaluation: Defines the type of evaluation you want to perform.
917
922
  :param index: Defines the `index` in which the evaluation will be performed.
@@ -985,8 +990,8 @@ class MlClient(NamespacedClient):
985
990
  """
986
991
  .. raw:: html
987
992
 
988
- <p>Explain data frame analytics config.
989
- This API provides explanations for a data frame analytics config that either
993
+ <p>Explain data frame analytics config.</p>
994
+ <p>This API provides explanations for a data frame analytics config that either
990
995
  exists already or one that has not been created yet. The following
991
996
  explanations are provided:</p>
992
997
  <ul>
@@ -996,7 +1001,7 @@ class MlClient(NamespacedClient):
996
1001
  </ul>
997
1002
 
998
1003
 
999
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/explain-dfanalytics.html>`_
1004
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-explain-data-frame-analytics>`_
1000
1005
 
1001
1006
  :param id: Identifier for the data frame analytics job. This identifier can contain
1002
1007
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -1107,7 +1112,7 @@ class MlClient(NamespacedClient):
1107
1112
  analyzing further data.</p>
1108
1113
 
1109
1114
 
1110
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-flush-job.html>`_
1115
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-flush-job>`_
1111
1116
 
1112
1117
  :param job_id: Identifier for the anomaly detection job.
1113
1118
  :param advance_time: Refer to the description for the `advance_time` query parameter.
@@ -1182,7 +1187,7 @@ class MlClient(NamespacedClient):
1182
1187
  based on historical data.</p>
1183
1188
 
1184
1189
 
1185
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-forecast.html>`_
1190
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-forecast>`_
1186
1191
 
1187
1192
  :param job_id: Identifier for the anomaly detection job. The job must be open
1188
1193
  when you create a forecast; otherwise, an error occurs.
@@ -1268,7 +1273,7 @@ class MlClient(NamespacedClient):
1268
1273
  The API presents a chronological view of the records, grouped by bucket.</p>
1269
1274
 
1270
1275
 
1271
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-bucket.html>`_
1276
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-buckets>`_
1272
1277
 
1273
1278
  :param job_id: Identifier for the anomaly detection job.
1274
1279
  :param timestamp: The timestamp of a single bucket result. If you do not specify
@@ -1366,7 +1371,7 @@ class MlClient(NamespacedClient):
1366
1371
  <p>Get info about events in calendars.</p>
1367
1372
 
1368
1373
 
1369
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-calendar-event.html>`_
1374
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-calendar-events>`_
1370
1375
 
1371
1376
  :param calendar_id: A string that uniquely identifies a calendar. You can get
1372
1377
  information for multiple calendars by using a comma-separated list of ids
@@ -1435,7 +1440,7 @@ class MlClient(NamespacedClient):
1435
1440
  <p>Get calendar configuration info.</p>
1436
1441
 
1437
1442
 
1438
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-calendar.html>`_
1443
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-calendars>`_
1439
1444
 
1440
1445
  :param calendar_id: A string that uniquely identifies a calendar. You can get
1441
1446
  information for multiple calendars by using a comma-separated list of ids
@@ -1511,7 +1516,7 @@ class MlClient(NamespacedClient):
1511
1516
  <p>Get anomaly detection job results for categories.</p>
1512
1517
 
1513
1518
 
1514
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-category.html>`_
1519
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-categories>`_
1515
1520
 
1516
1521
  :param job_id: Identifier for the anomaly detection job.
1517
1522
  :param category_id: Identifier for the category, which is unique in the job.
@@ -1599,7 +1604,7 @@ class MlClient(NamespacedClient):
1599
1604
  wildcard expression.</p>
1600
1605
 
1601
1606
 
1602
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-dfanalytics.html>`_
1607
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-data-frame-analytics>`_
1603
1608
 
1604
1609
  :param id: Identifier for the data frame analytics job. If you do not specify
1605
1610
  this option, the API returns information for the first hundred data frame
@@ -1674,7 +1679,7 @@ class MlClient(NamespacedClient):
1674
1679
  <p>Get data frame analytics jobs usage info.</p>
1675
1680
 
1676
1681
 
1677
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-dfanalytics-stats.html>`_
1682
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-data-frame-analytics-stats>`_
1678
1683
 
1679
1684
  :param id: Identifier for the data frame analytics job. If you do not specify
1680
1685
  this option, the API returns information for the first hundred data frame
@@ -1748,7 +1753,7 @@ class MlClient(NamespacedClient):
1748
1753
  This API returns a maximum of 10,000 datafeeds.</p>
1749
1754
 
1750
1755
 
1751
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-datafeed-stats.html>`_
1756
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-datafeed-stats>`_
1752
1757
 
1753
1758
  :param datafeed_id: Identifier for the datafeed. It can be a datafeed identifier
1754
1759
  or a wildcard expression. If you do not specify one of these options, the
@@ -1812,7 +1817,7 @@ class MlClient(NamespacedClient):
1812
1817
  This API returns a maximum of 10,000 datafeeds.</p>
1813
1818
 
1814
1819
 
1815
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-datafeed.html>`_
1820
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-datafeeds>`_
1816
1821
 
1817
1822
  :param datafeed_id: Identifier for the datafeed. It can be a datafeed identifier
1818
1823
  or a wildcard expression. If you do not specify one of these options, the
@@ -1879,7 +1884,7 @@ class MlClient(NamespacedClient):
1879
1884
  You can get a single filter or all filters.</p>
1880
1885
 
1881
1886
 
1882
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-filter.html>`_
1887
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-filters>`_
1883
1888
 
1884
1889
  :param filter_id: A string that uniquely identifies a filter.
1885
1890
  :param from_: Skips the specified number of filters.
@@ -1947,7 +1952,7 @@ class MlClient(NamespacedClient):
1947
1952
  <code>influencer_field_name</code> is specified in the job configuration.</p>
1948
1953
 
1949
1954
 
1950
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-influencer.html>`_
1955
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-influencers>`_
1951
1956
 
1952
1957
  :param job_id: Identifier for the anomaly detection job.
1953
1958
  :param desc: If true, the results are sorted in descending order.
@@ -2031,7 +2036,7 @@ class MlClient(NamespacedClient):
2031
2036
  <p>Get anomaly detection jobs usage info.</p>
2032
2037
 
2033
2038
 
2034
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-job-stats.html>`_
2039
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-job-stats>`_
2035
2040
 
2036
2041
  :param job_id: Identifier for the anomaly detection job. It can be a job identifier,
2037
2042
  a group name, a comma-separated list of jobs, or a wildcard expression. If
@@ -2095,7 +2100,7 @@ class MlClient(NamespacedClient):
2095
2100
  <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>
2096
2101
 
2097
2102
 
2098
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-job.html>`_
2103
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-jobs>`_
2099
2104
 
2100
2105
  :param job_id: Identifier for the anomaly detection job. It can be a job identifier,
2101
2106
  a group name, or a wildcard expression. If you do not specify one of these
@@ -2161,7 +2166,7 @@ class MlClient(NamespacedClient):
2161
2166
  on each node, both within the JVM heap, and natively, outside of the JVM.</p>
2162
2167
 
2163
2168
 
2164
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ml-memory.html>`_
2169
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-memory-stats>`_
2165
2170
 
2166
2171
  :param node_id: The names of particular nodes in the cluster to target. For example,
2167
2172
  `nodeId1,nodeId2` or `ml:true`
@@ -2219,7 +2224,7 @@ class MlClient(NamespacedClient):
2219
2224
  <p>Get anomaly detection job model snapshot upgrade usage info.</p>
2220
2225
 
2221
2226
 
2222
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-job-model-snapshot-upgrade-stats.html>`_
2227
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-model-snapshot-upgrade-stats>`_
2223
2228
 
2224
2229
  :param job_id: Identifier for the anomaly detection job.
2225
2230
  :param snapshot_id: A numerical character string that uniquely identifies the
@@ -2293,7 +2298,7 @@ class MlClient(NamespacedClient):
2293
2298
  <p>Get model snapshots info.</p>
2294
2299
 
2295
2300
 
2296
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-snapshot.html>`_
2301
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-model-snapshots>`_
2297
2302
 
2298
2303
  :param job_id: Identifier for the anomaly detection job.
2299
2304
  :param snapshot_id: A numerical character string that uniquely identifies the
@@ -2413,7 +2418,7 @@ class MlClient(NamespacedClient):
2413
2418
  jobs' largest bucket span.</p>
2414
2419
 
2415
2420
 
2416
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-overall-buckets.html>`_
2421
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-overall-buckets>`_
2417
2422
 
2418
2423
  :param job_id: Identifier for the anomaly detection job. It can be a job identifier,
2419
2424
  a group name, a comma-separated list of jobs or groups, or a wildcard expression.
@@ -2523,7 +2528,7 @@ class MlClient(NamespacedClient):
2523
2528
  number of detectors.</p>
2524
2529
 
2525
2530
 
2526
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-record.html>`_
2531
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-records>`_
2527
2532
 
2528
2533
  :param job_id: Identifier for the anomaly detection job.
2529
2534
  :param desc: Refer to the description for the `desc` query parameter.
@@ -2611,7 +2616,6 @@ class MlClient(NamespacedClient):
2611
2616
  ],
2612
2617
  ]
2613
2618
  ] = None,
2614
- include_model_definition: t.Optional[bool] = None,
2615
2619
  pretty: t.Optional[bool] = None,
2616
2620
  size: t.Optional[int] = None,
2617
2621
  tags: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -2622,7 +2626,7 @@ class MlClient(NamespacedClient):
2622
2626
  <p>Get trained model configuration info.</p>
2623
2627
 
2624
2628
 
2625
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-trained-models.html>`_
2629
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-trained-models>`_
2626
2630
 
2627
2631
  :param model_id: The unique identifier of the trained model or a model alias.
2628
2632
  You can get information for multiple trained models in a single API request
@@ -2641,8 +2645,6 @@ class MlClient(NamespacedClient):
2641
2645
  :param from_: Skips the specified number of models.
2642
2646
  :param include: A comma delimited string of optional fields to include in the
2643
2647
  response body.
2644
- :param include_model_definition: parameter is deprecated! Use [include=definition]
2645
- instead
2646
2648
  :param size: Specifies the maximum number of models to obtain.
2647
2649
  :param tags: A comma delimited string of tags. A trained model can have many
2648
2650
  tags, or none. When supplied, only trained models that contain all the supplied
@@ -2672,8 +2674,6 @@ class MlClient(NamespacedClient):
2672
2674
  __query["human"] = human
2673
2675
  if include is not None:
2674
2676
  __query["include"] = include
2675
- if include_model_definition is not None:
2676
- __query["include_model_definition"] = include_model_definition
2677
2677
  if pretty is not None:
2678
2678
  __query["pretty"] = pretty
2679
2679
  if size is not None:
@@ -2713,7 +2713,7 @@ class MlClient(NamespacedClient):
2713
2713
  models in a single API request by using a comma-separated list of model IDs or a wildcard expression.</p>
2714
2714
 
2715
2715
 
2716
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-trained-models-stats.html>`_
2716
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-get-trained-models-stats>`_
2717
2717
 
2718
2718
  :param model_id: The unique identifier of the trained model or a model alias.
2719
2719
  It can be a comma-separated list or a wildcard expression.
@@ -2779,7 +2779,7 @@ class MlClient(NamespacedClient):
2779
2779
  <p>Evaluate a trained model.</p>
2780
2780
 
2781
2781
 
2782
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/infer-trained-model.html>`_
2782
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-infer-trained-model>`_
2783
2783
 
2784
2784
  :param model_id: The unique identifier of the trained model.
2785
2785
  :param docs: An array of objects to pass to the model for inference. The objects
@@ -2846,7 +2846,7 @@ class MlClient(NamespacedClient):
2846
2846
  cluster configuration.</p>
2847
2847
 
2848
2848
 
2849
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ml-info.html>`_
2849
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-info>`_
2850
2850
  """
2851
2851
  __path_parts: t.Dict[str, str] = {}
2852
2852
  __path = "/_ml/info"
@@ -2886,8 +2886,8 @@ class MlClient(NamespacedClient):
2886
2886
  """
2887
2887
  .. raw:: html
2888
2888
 
2889
- <p>Open anomaly detection jobs.
2890
- An anomaly detection job must be opened to be ready to receive and analyze
2889
+ <p>Open anomaly detection jobs.</p>
2890
+ <p>An anomaly detection job must be opened to be ready to receive and analyze
2891
2891
  data. It can be opened and closed multiple times throughout its lifecycle.
2892
2892
  When you open a new job, it starts with an empty model.
2893
2893
  When you open an existing job, the most recent model state is automatically
@@ -2895,7 +2895,7 @@ class MlClient(NamespacedClient):
2895
2895
  new data is received.</p>
2896
2896
 
2897
2897
 
2898
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-open-job.html>`_
2898
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-open-job>`_
2899
2899
 
2900
2900
  :param job_id: Identifier for the anomaly detection job.
2901
2901
  :param timeout: Refer to the description for the `timeout` query parameter.
@@ -2952,7 +2952,7 @@ class MlClient(NamespacedClient):
2952
2952
  <p>Add scheduled events to the calendar.</p>
2953
2953
 
2954
2954
 
2955
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-post-calendar-event.html>`_
2955
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-post-calendar-events>`_
2956
2956
 
2957
2957
  :param calendar_id: A string that uniquely identifies a calendar.
2958
2958
  :param events: A list of one of more scheduled events. The event’s start and
@@ -3013,7 +3013,7 @@ class MlClient(NamespacedClient):
3013
3013
  It is not currently possible to post data to multiple jobs using wildcards or a comma-separated list.</p>
3014
3014
 
3015
3015
 
3016
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-post-data.html>`_
3016
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-post-data>`_
3017
3017
 
3018
3018
  :param job_id: Identifier for the anomaly detection job. The job must have a
3019
3019
  state of open to receive and process the data.
@@ -3077,10 +3077,10 @@ class MlClient(NamespacedClient):
3077
3077
  .. raw:: html
3078
3078
 
3079
3079
  <p>Preview features used by data frame analytics.
3080
- Previews the extracted features used by a data frame analytics config.</p>
3080
+ Preview the extracted features used by a data frame analytics config.</p>
3081
3081
 
3082
3082
 
3083
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/preview-dfanalytics.html>`_
3083
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-preview-data-frame-analytics>`_
3084
3084
 
3085
3085
  :param id: Identifier for the data frame analytics job.
3086
3086
  :param config: A data frame analytics config as described in create data frame
@@ -3153,7 +3153,7 @@ class MlClient(NamespacedClient):
3153
3153
  You can also use secondary authorization headers to supply the credentials.</p>
3154
3154
 
3155
3155
 
3156
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-preview-datafeed.html>`_
3156
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-preview-datafeed>`_
3157
3157
 
3158
3158
  :param datafeed_id: A numerical character string that uniquely identifies the
3159
3159
  datafeed. This identifier can contain lowercase alphanumeric characters (a-z
@@ -3232,7 +3232,7 @@ class MlClient(NamespacedClient):
3232
3232
  <p>Create a calendar.</p>
3233
3233
 
3234
3234
 
3235
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-calendar.html>`_
3235
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-calendar>`_
3236
3236
 
3237
3237
  :param calendar_id: A string that uniquely identifies a calendar.
3238
3238
  :param description: A description of the calendar.
@@ -3289,7 +3289,7 @@ class MlClient(NamespacedClient):
3289
3289
  <p>Add anomaly detection job to calendar.</p>
3290
3290
 
3291
3291
 
3292
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-calendar-job.html>`_
3292
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-calendar-job>`_
3293
3293
 
3294
3294
  :param calendar_id: A string that uniquely identifies a calendar.
3295
3295
  :param job_id: An identifier for the anomaly detection jobs. It can be a job
@@ -3372,7 +3372,7 @@ class MlClient(NamespacedClient):
3372
3372
  <p>If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.</p>
3373
3373
 
3374
3374
 
3375
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-dfanalytics.html>`_
3375
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-data-frame-analytics>`_
3376
3376
 
3377
3377
  :param id: Identifier for the data frame analytics job. This identifier can contain
3378
3378
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -3557,7 +3557,7 @@ class MlClient(NamespacedClient):
3557
3557
  directly to the <code>.ml-config</code> index. Do not give users <code>write</code> privileges on the <code>.ml-config</code> index.</p>
3558
3558
 
3559
3559
 
3560
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-datafeed.html>`_
3560
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-datafeed>`_
3561
3561
 
3562
3562
  :param datafeed_id: A numerical character string that uniquely identifies the
3563
3563
  datafeed. This identifier can contain lowercase alphanumeric characters (a-z
@@ -3599,11 +3599,11 @@ class MlClient(NamespacedClient):
3599
3599
  :param ignore_unavailable: If true, unavailable indices (missing or closed) are
3600
3600
  ignored.
3601
3601
  :param indexes: An array of index names. Wildcards are supported. If any of the
3602
- indices are in remote clusters, the machine learning nodes must have the
3603
- `remote_cluster_client` role.
3602
+ indices are in remote clusters, the master nodes and the machine learning
3603
+ nodes must have the `remote_cluster_client` role.
3604
3604
  :param indices: An array of index names. Wildcards are supported. If any of the
3605
- indices are in remote clusters, the machine learning nodes must have the
3606
- `remote_cluster_client` role.
3605
+ indices are in remote clusters, the master nodes and the machine learning
3606
+ nodes must have the `remote_cluster_client` role.
3607
3607
  :param indices_options: Specifies index expansion options that are used during
3608
3608
  search
3609
3609
  :param job_id: Identifier for the anomaly detection job.
@@ -3719,7 +3719,7 @@ class MlClient(NamespacedClient):
3719
3719
  Specifically, filters are referenced in the <code>custom_rules</code> property of detector configuration objects.</p>
3720
3720
 
3721
3721
 
3722
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-filter.html>`_
3722
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-filter>`_
3723
3723
 
3724
3724
  :param filter_id: A string that uniquely identifies a filter.
3725
3725
  :param description: A description of the filter.
@@ -3816,12 +3816,12 @@ class MlClient(NamespacedClient):
3816
3816
  """
3817
3817
  .. raw:: html
3818
3818
 
3819
- <p>Create an anomaly detection job.
3820
- If you include a <code>datafeed_config</code>, you must have read index privileges on the source index.
3819
+ <p>Create an anomaly detection job.</p>
3820
+ <p>If you include a <code>datafeed_config</code>, you must have read index privileges on the source index.
3821
3821
  If you include a <code>datafeed_config</code> but do not provide a query, the datafeed uses <code>{&quot;match_all&quot;: {&quot;boost&quot;: 1}}</code>.</p>
3822
3822
 
3823
3823
 
3824
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-job.html>`_
3824
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-job>`_
3825
3825
 
3826
3826
  :param job_id: The identifier for the anomaly detection job. This identifier
3827
3827
  can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and
@@ -4029,7 +4029,7 @@ class MlClient(NamespacedClient):
4029
4029
  Enable you to supply a trained model that is not created by data frame analytics.</p>
4030
4030
 
4031
4031
 
4032
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-models.html>`_
4032
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-trained-model>`_
4033
4033
 
4034
4034
  :param model_id: The unique identifier of the trained model.
4035
4035
  :param compressed_definition: The compressed (GZipped and Base64 encoded) inference
@@ -4150,7 +4150,7 @@ class MlClient(NamespacedClient):
4150
4150
  returns a warning.</p>
4151
4151
 
4152
4152
 
4153
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-models-aliases.html>`_
4153
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-trained-model-alias>`_
4154
4154
 
4155
4155
  :param model_id: The identifier for the trained model that the alias refers to.
4156
4156
  :param model_alias: The alias to create or update. This value cannot end in numbers.
@@ -4211,7 +4211,7 @@ class MlClient(NamespacedClient):
4211
4211
  <p>Create part of a trained model definition.</p>
4212
4212
 
4213
4213
 
4214
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-model-definition-part.html>`_
4214
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-trained-model-definition-part>`_
4215
4215
 
4216
4216
  :param model_id: The unique identifier of the trained model.
4217
4217
  :param part: The definition part number. When the definition is loaded for inference
@@ -4293,7 +4293,7 @@ class MlClient(NamespacedClient):
4293
4293
  The vocabulary is stored in the index as described in <code>inference_config.*.vocabulary</code> of the trained model definition.</p>
4294
4294
 
4295
4295
 
4296
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-model-vocabulary.html>`_
4296
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-put-trained-model-vocabulary>`_
4297
4297
 
4298
4298
  :param model_id: The unique identifier of the trained model.
4299
4299
  :param vocabulary: The model vocabulary, which must not be empty.
@@ -4356,7 +4356,7 @@ class MlClient(NamespacedClient):
4356
4356
  comma separated list.</p>
4357
4357
 
4358
4358
 
4359
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-reset-job.html>`_
4359
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-reset-job>`_
4360
4360
 
4361
4361
  :param job_id: The ID of the job to reset.
4362
4362
  :param delete_user_annotations: Specifies whether annotations that have been
@@ -4420,7 +4420,7 @@ class MlClient(NamespacedClient):
4420
4420
  snapshot after Black Friday or a critical system failure.</p>
4421
4421
 
4422
4422
 
4423
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-revert-snapshot.html>`_
4423
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-revert-model-snapshot>`_
4424
4424
 
4425
4425
  :param job_id: Identifier for the anomaly detection job.
4426
4426
  :param snapshot_id: You can specify `empty` as the <snapshot_id>. Reverting to
@@ -4495,7 +4495,7 @@ class MlClient(NamespacedClient):
4495
4495
  machine learning info API.</p>
4496
4496
 
4497
4497
 
4498
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-set-upgrade-mode.html>`_
4498
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-set-upgrade-mode>`_
4499
4499
 
4500
4500
  :param enabled: When `true`, it enables `upgrade_mode` which temporarily halts
4501
4501
  all job and datafeed tasks and prohibits new job and datafeed tasks from
@@ -4555,7 +4555,7 @@ class MlClient(NamespacedClient):
4555
4555
  the destination index in advance with custom settings and mappings.</p>
4556
4556
 
4557
4557
 
4558
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-dfanalytics.html>`_
4558
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-start-data-frame-analytics>`_
4559
4559
 
4560
4560
  :param id: Identifier for the data frame analytics job. This identifier can contain
4561
4561
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -4618,7 +4618,7 @@ class MlClient(NamespacedClient):
4618
4618
  authorization headers when you created or updated the datafeed, those credentials are used instead.</p>
4619
4619
 
4620
4620
 
4621
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-start-datafeed.html>`_
4621
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-start-datafeed>`_
4622
4622
 
4623
4623
  :param datafeed_id: A numerical character string that uniquely identifies the
4624
4624
  datafeed. This identifier can contain lowercase alphanumeric characters (a-z
@@ -4664,11 +4664,14 @@ class MlClient(NamespacedClient):
4664
4664
  path_parts=__path_parts,
4665
4665
  )
4666
4666
 
4667
- @_rewrite_parameters()
4667
+ @_rewrite_parameters(
4668
+ body_fields=("adaptive_allocations",),
4669
+ )
4668
4670
  def start_trained_model_deployment(
4669
4671
  self,
4670
4672
  *,
4671
4673
  model_id: str,
4674
+ adaptive_allocations: t.Optional[t.Mapping[str, t.Any]] = None,
4672
4675
  cache_size: t.Optional[t.Union[int, str]] = None,
4673
4676
  deployment_id: t.Optional[str] = None,
4674
4677
  error_trace: t.Optional[bool] = None,
@@ -4683,6 +4686,7 @@ class MlClient(NamespacedClient):
4683
4686
  wait_for: t.Optional[
4684
4687
  t.Union[str, t.Literal["fully_allocated", "started", "starting"]]
4685
4688
  ] = None,
4689
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4686
4690
  ) -> ObjectApiResponse[t.Any]:
4687
4691
  """
4688
4692
  .. raw:: html
@@ -4691,10 +4695,13 @@ class MlClient(NamespacedClient):
4691
4695
  It allocates the model to every machine learning node.</p>
4692
4696
 
4693
4697
 
4694
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-trained-model-deployment.html>`_
4698
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-start-trained-model-deployment>`_
4695
4699
 
4696
4700
  :param model_id: The unique identifier of the trained model. Currently, only
4697
4701
  PyTorch models are supported.
4702
+ :param adaptive_allocations: Adaptive allocations configuration. When enabled,
4703
+ the number of allocations is set based on the current load. If adaptive_allocations
4704
+ is enabled, do not set the number of allocations manually.
4698
4705
  :param cache_size: The inference cache size (in memory outside the JVM heap)
4699
4706
  per node for the model. The default value is the same size as the `model_size_bytes`.
4700
4707
  To disable the cache, `0b` can be provided.
@@ -4704,7 +4711,8 @@ class MlClient(NamespacedClient):
4704
4711
  model in memory but use a separate set of threads to evaluate the model.
4705
4712
  Increasing this value generally increases the throughput. If this setting
4706
4713
  is greater than the number of hardware threads it will automatically be changed
4707
- to a value less than the number of hardware threads.
4714
+ to a value less than the number of hardware threads. If adaptive_allocations
4715
+ is enabled, do not set this value, because it’s automatically set.
4708
4716
  :param priority: The deployment priority.
4709
4717
  :param queue_capacity: Specifies the number of inference requests that are allowed
4710
4718
  in the queue. After the number of requests exceeds this value, new requests
@@ -4724,6 +4732,7 @@ class MlClient(NamespacedClient):
4724
4732
  __path_parts: t.Dict[str, str] = {"model_id": _quote(model_id)}
4725
4733
  __path = f'/_ml/trained_models/{__path_parts["model_id"]}/deployment/_start'
4726
4734
  __query: t.Dict[str, t.Any] = {}
4735
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4727
4736
  if cache_size is not None:
4728
4737
  __query["cache_size"] = cache_size
4729
4738
  if deployment_id is not None:
@@ -4748,12 +4757,20 @@ class MlClient(NamespacedClient):
4748
4757
  __query["timeout"] = timeout
4749
4758
  if wait_for is not None:
4750
4759
  __query["wait_for"] = wait_for
4760
+ if not __body:
4761
+ if adaptive_allocations is not None:
4762
+ __body["adaptive_allocations"] = adaptive_allocations
4763
+ if not __body:
4764
+ __body = None # type: ignore[assignment]
4751
4765
  __headers = {"accept": "application/json"}
4766
+ if __body is not None:
4767
+ __headers["content-type"] = "application/json"
4752
4768
  return self.perform_request( # type: ignore[return-value]
4753
4769
  "POST",
4754
4770
  __path,
4755
4771
  params=__query,
4756
4772
  headers=__headers,
4773
+ body=__body,
4757
4774
  endpoint_id="ml.start_trained_model_deployment",
4758
4775
  path_parts=__path_parts,
4759
4776
  )
@@ -4779,7 +4796,7 @@ class MlClient(NamespacedClient):
4779
4796
  throughout its lifecycle.</p>
4780
4797
 
4781
4798
 
4782
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/stop-dfanalytics.html>`_
4799
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-stop-data-frame-analytics>`_
4783
4800
 
4784
4801
  :param id: Identifier for the data frame analytics job. This identifier can contain
4785
4802
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -4849,7 +4866,7 @@ class MlClient(NamespacedClient):
4849
4866
  multiple times throughout its lifecycle.</p>
4850
4867
 
4851
4868
 
4852
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-stop-datafeed.html>`_
4869
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-stop-datafeed>`_
4853
4870
 
4854
4871
  :param datafeed_id: Identifier for the datafeed. You can stop multiple datafeeds
4855
4872
  in a single API request by using a comma-separated list of datafeeds or a
@@ -4914,7 +4931,7 @@ class MlClient(NamespacedClient):
4914
4931
  <p>Stop a trained model deployment.</p>
4915
4932
 
4916
4933
 
4917
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/stop-trained-model-deployment.html>`_
4934
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-stop-trained-model-deployment>`_
4918
4935
 
4919
4936
  :param model_id: The unique identifier of the trained model.
4920
4937
  :param allow_no_match: Specifies what to do when the request: contains wildcard
@@ -4982,7 +4999,7 @@ class MlClient(NamespacedClient):
4982
4999
  <p>Update a data frame analytics job.</p>
4983
5000
 
4984
5001
 
4985
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-dfanalytics.html>`_
5002
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-update-data-frame-analytics>`_
4986
5003
 
4987
5004
  :param id: Identifier for the data frame analytics job. This identifier can contain
4988
5005
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -5097,7 +5114,7 @@ class MlClient(NamespacedClient):
5097
5114
  those credentials are used instead.</p>
5098
5115
 
5099
5116
 
5100
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-datafeed.html>`_
5117
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-update-datafeed>`_
5101
5118
 
5102
5119
  :param datafeed_id: A numerical character string that uniquely identifies the
5103
5120
  datafeed. This identifier can contain lowercase alphanumeric characters (a-z
@@ -5264,7 +5281,7 @@ class MlClient(NamespacedClient):
5264
5281
  Updates the description of a filter, adds items, or removes items from the list.</p>
5265
5282
 
5266
5283
 
5267
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-filter.html>`_
5284
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-update-filter>`_
5268
5285
 
5269
5286
  :param filter_id: A string that uniquely identifies a filter.
5270
5287
  :param add_items: The items to add to the filter.
@@ -5358,7 +5375,7 @@ class MlClient(NamespacedClient):
5358
5375
  Updates certain properties of an anomaly detection job.</p>
5359
5376
 
5360
5377
 
5361
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-job.html>`_
5378
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-update-job>`_
5362
5379
 
5363
5380
  :param job_id: Identifier for the job.
5364
5381
  :param allow_lazy_open: Advanced configuration option. Specifies whether this
@@ -5490,7 +5507,7 @@ class MlClient(NamespacedClient):
5490
5507
  Updates certain properties of a snapshot.</p>
5491
5508
 
5492
5509
 
5493
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-snapshot.html>`_
5510
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-update-model-snapshot>`_
5494
5511
 
5495
5512
  :param job_id: Identifier for the anomaly detection job.
5496
5513
  :param snapshot_id: Identifier for the model snapshot.
@@ -5535,12 +5552,13 @@ class MlClient(NamespacedClient):
5535
5552
  )
5536
5553
 
5537
5554
  @_rewrite_parameters(
5538
- body_fields=("number_of_allocations",),
5555
+ body_fields=("adaptive_allocations", "number_of_allocations"),
5539
5556
  )
5540
5557
  def update_trained_model_deployment(
5541
5558
  self,
5542
5559
  *,
5543
5560
  model_id: str,
5561
+ adaptive_allocations: t.Optional[t.Mapping[str, t.Any]] = None,
5544
5562
  error_trace: t.Optional[bool] = None,
5545
5563
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
5546
5564
  human: t.Optional[bool] = None,
@@ -5554,16 +5572,20 @@ class MlClient(NamespacedClient):
5554
5572
  <p>Update a trained model deployment.</p>
5555
5573
 
5556
5574
 
5557
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-trained-model-deployment.html>`_
5575
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-update-trained-model-deployment>`_
5558
5576
 
5559
5577
  :param model_id: The unique identifier of the trained model. Currently, only
5560
5578
  PyTorch models are supported.
5579
+ :param adaptive_allocations: Adaptive allocations configuration. When enabled,
5580
+ the number of allocations is set based on the current load. If adaptive_allocations
5581
+ is enabled, do not set the number of allocations manually.
5561
5582
  :param number_of_allocations: The number of model allocations on each node where
5562
5583
  the model is deployed. All allocations on a node share the same copy of the
5563
5584
  model in memory but use a separate set of threads to evaluate the model.
5564
5585
  Increasing this value generally increases the throughput. If this setting
5565
5586
  is greater than the number of hardware threads it will automatically be changed
5566
- to a value less than the number of hardware threads.
5587
+ to a value less than the number of hardware threads. If adaptive_allocations
5588
+ is enabled, do not set this value, because it’s automatically set.
5567
5589
  """
5568
5590
  if model_id in SKIP_IN_PATH:
5569
5591
  raise ValueError("Empty value passed for parameter 'model_id'")
@@ -5580,6 +5602,8 @@ class MlClient(NamespacedClient):
5580
5602
  if pretty is not None:
5581
5603
  __query["pretty"] = pretty
5582
5604
  if not __body:
5605
+ if adaptive_allocations is not None:
5606
+ __body["adaptive_allocations"] = adaptive_allocations
5583
5607
  if number_of_allocations is not None:
5584
5608
  __body["number_of_allocations"] = number_of_allocations
5585
5609
  if not __body:
@@ -5614,7 +5638,7 @@ class MlClient(NamespacedClient):
5614
5638
  .. raw:: html
5615
5639
 
5616
5640
  <p>Upgrade a snapshot.
5617
- Upgrades an anomaly detection model snapshot to the latest major version.
5641
+ Upgrade an anomaly detection model snapshot to the latest major version.
5618
5642
  Over time, older snapshot formats are deprecated and removed. Anomaly
5619
5643
  detection jobs support only snapshots that are from the current or previous
5620
5644
  major version.
@@ -5625,7 +5649,7 @@ class MlClient(NamespacedClient):
5625
5649
  job.</p>
5626
5650
 
5627
5651
 
5628
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-upgrade-job-model-snapshot.html>`_
5652
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ml-upgrade-job-snapshot>`_
5629
5653
 
5630
5654
  :param job_id: Identifier for the anomaly detection job.
5631
5655
  :param snapshot_id: A numerical character string that uniquely identifies the
@@ -5704,7 +5728,7 @@ class MlClient(NamespacedClient):
5704
5728
  <p>Validate an anomaly detection job.</p>
5705
5729
 
5706
5730
 
5707
- `<https://www.elastic.co/guide/en/machine-learning/8.17/ml-jobs.html>`_
5731
+ `<https://www.elastic.co/guide/en/machine-learning/9.0/ml-jobs.html>`_
5708
5732
 
5709
5733
  :param analysis_config:
5710
5734
  :param analysis_limits:
@@ -5777,7 +5801,7 @@ class MlClient(NamespacedClient):
5777
5801
  <p>Validate an anomaly detection job.</p>
5778
5802
 
5779
5803
 
5780
- `<https://www.elastic.co/guide/en/machine-learning/8.17/ml-jobs.html>`_
5804
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/>`_
5781
5805
 
5782
5806
  :param detector:
5783
5807
  """