elasticsearch 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. elasticsearch/_async/client/__init__.py +67 -65
  2. elasticsearch/_async/client/async_search.py +3 -3
  3. elasticsearch/_async/client/autoscaling.py +8 -4
  4. elasticsearch/_async/client/cat.py +40 -2
  5. elasticsearch/_async/client/ccr.py +10 -10
  6. elasticsearch/_async/client/cluster.py +34 -33
  7. elasticsearch/_async/client/connector.py +42 -41
  8. elasticsearch/_async/client/dangling_indices.py +8 -12
  9. elasticsearch/_async/client/enrich.py +10 -10
  10. elasticsearch/_async/client/eql.py +10 -10
  11. elasticsearch/_async/client/esql.py +16 -16
  12. elasticsearch/_async/client/features.py +6 -6
  13. elasticsearch/_async/client/fleet.py +8 -12
  14. elasticsearch/_async/client/graph.py +3 -7
  15. elasticsearch/_async/client/ilm.py +20 -28
  16. elasticsearch/_async/client/indices.py +140 -160
  17. elasticsearch/_async/client/inference.py +30 -126
  18. elasticsearch/_async/client/ingest.py +9 -9
  19. elasticsearch/_async/client/license.py +5 -7
  20. elasticsearch/_async/client/logstash.py +4 -4
  21. elasticsearch/_async/client/migration.py +6 -6
  22. elasticsearch/_async/client/ml.py +125 -85
  23. elasticsearch/_async/client/monitoring.py +4 -3
  24. elasticsearch/_async/client/nodes.py +15 -15
  25. elasticsearch/_async/client/query_rules.py +16 -16
  26. elasticsearch/_async/client/rollup.py +21 -21
  27. elasticsearch/_async/client/search_application.py +19 -19
  28. elasticsearch/_async/client/searchable_snapshots.py +10 -10
  29. elasticsearch/_async/client/security.py +8 -7
  30. elasticsearch/_async/client/shutdown.py +9 -4
  31. elasticsearch/_async/client/simulate.py +4 -4
  32. elasticsearch/_async/client/slm.py +18 -22
  33. elasticsearch/_async/client/snapshot.py +20 -20
  34. elasticsearch/_async/client/sql.py +10 -10
  35. elasticsearch/_async/client/streams.py +6 -6
  36. elasticsearch/_async/client/synonyms.py +10 -10
  37. elasticsearch/_async/client/tasks.py +8 -8
  38. elasticsearch/_async/client/text_structure.py +13 -9
  39. elasticsearch/_async/client/transform.py +51 -12
  40. elasticsearch/_async/client/utils.py +4 -2
  41. elasticsearch/_async/client/watcher.py +26 -26
  42. elasticsearch/_async/client/xpack.py +6 -5
  43. elasticsearch/_sync/client/__init__.py +69 -65
  44. elasticsearch/_sync/client/async_search.py +3 -3
  45. elasticsearch/_sync/client/autoscaling.py +8 -4
  46. elasticsearch/_sync/client/cat.py +40 -2
  47. elasticsearch/_sync/client/ccr.py +10 -10
  48. elasticsearch/_sync/client/cluster.py +34 -33
  49. elasticsearch/_sync/client/connector.py +42 -41
  50. elasticsearch/_sync/client/dangling_indices.py +8 -12
  51. elasticsearch/_sync/client/enrich.py +10 -10
  52. elasticsearch/_sync/client/eql.py +10 -10
  53. elasticsearch/_sync/client/esql.py +16 -16
  54. elasticsearch/_sync/client/features.py +6 -6
  55. elasticsearch/_sync/client/fleet.py +8 -12
  56. elasticsearch/_sync/client/graph.py +3 -7
  57. elasticsearch/_sync/client/ilm.py +20 -28
  58. elasticsearch/_sync/client/indices.py +140 -160
  59. elasticsearch/_sync/client/inference.py +30 -126
  60. elasticsearch/_sync/client/ingest.py +9 -9
  61. elasticsearch/_sync/client/license.py +5 -7
  62. elasticsearch/_sync/client/logstash.py +4 -4
  63. elasticsearch/_sync/client/migration.py +6 -6
  64. elasticsearch/_sync/client/ml.py +125 -85
  65. elasticsearch/_sync/client/monitoring.py +4 -3
  66. elasticsearch/_sync/client/nodes.py +15 -15
  67. elasticsearch/_sync/client/query_rules.py +16 -16
  68. elasticsearch/_sync/client/rollup.py +21 -21
  69. elasticsearch/_sync/client/search_application.py +19 -19
  70. elasticsearch/_sync/client/searchable_snapshots.py +10 -10
  71. elasticsearch/_sync/client/security.py +8 -7
  72. elasticsearch/_sync/client/shutdown.py +9 -4
  73. elasticsearch/_sync/client/simulate.py +4 -4
  74. elasticsearch/_sync/client/slm.py +18 -22
  75. elasticsearch/_sync/client/snapshot.py +20 -20
  76. elasticsearch/_sync/client/sql.py +10 -10
  77. elasticsearch/_sync/client/streams.py +6 -6
  78. elasticsearch/_sync/client/synonyms.py +10 -10
  79. elasticsearch/_sync/client/tasks.py +8 -8
  80. elasticsearch/_sync/client/text_structure.py +13 -9
  81. elasticsearch/_sync/client/transform.py +51 -12
  82. elasticsearch/_sync/client/utils.py +16 -2
  83. elasticsearch/_sync/client/watcher.py +26 -26
  84. elasticsearch/_sync/client/xpack.py +6 -5
  85. elasticsearch/_version.py +2 -2
  86. elasticsearch/dsl/_async/document.py +4 -5
  87. elasticsearch/dsl/_async/index.py +1 -1
  88. elasticsearch/dsl/_async/search.py +2 -3
  89. elasticsearch/dsl/_sync/document.py +4 -5
  90. elasticsearch/dsl/_sync/index.py +1 -1
  91. elasticsearch/dsl/_sync/search.py +2 -3
  92. elasticsearch/dsl/aggs.py +3 -3
  93. elasticsearch/dsl/async_connections.py +1 -2
  94. elasticsearch/dsl/connections.py +1 -2
  95. elasticsearch/dsl/document_base.py +1 -1
  96. elasticsearch/dsl/field.py +1 -9
  97. elasticsearch/dsl/query.py +24 -5
  98. elasticsearch/dsl/serializer.py +1 -2
  99. elasticsearch/dsl/types.py +11 -43
  100. elasticsearch/dsl/utils.py +1 -2
  101. elasticsearch/esql/esql.py +1 -1
  102. elasticsearch/esql/functions.py +2 -2
  103. elasticsearch/helpers/vectorstore/__init__.py +7 -7
  104. elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
  105. elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
  106. elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
  107. elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
  108. elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
  109. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
  110. elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
  111. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
  112. {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/METADATA +1 -1
  113. elasticsearch-9.1.3.dist-info/RECORD +165 -0
  114. {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/WHEEL +1 -1
  115. elasticsearch-9.1.2.dist-info/RECORD +0 -165
  116. {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/licenses/LICENSE +0 -0
  117. {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/licenses/NOTICE +0 -0
@@ -38,8 +38,8 @@ class EqlClient(NamespacedClient):
38
38
  """
39
39
  .. raw:: html
40
40
 
41
- <p>Delete an async EQL search.
42
- Delete an async EQL search or a stored synchronous EQL search.
41
+ <p>Delete an async EQL search.</p>
42
+ <p>Delete an async EQL search or a stored synchronous EQL search.
43
43
  The API also deletes results for the search.</p>
44
44
 
45
45
 
@@ -89,8 +89,8 @@ class EqlClient(NamespacedClient):
89
89
  """
90
90
  .. raw:: html
91
91
 
92
- <p>Get async EQL search results.
93
- Get the current status and available results for an async EQL search or a stored synchronous EQL search.</p>
92
+ <p>Get async EQL search results.</p>
93
+ <p>Get the current status and available results for an async EQL search or a stored synchronous EQL search.</p>
94
94
 
95
95
 
96
96
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get>`_
@@ -143,8 +143,8 @@ class EqlClient(NamespacedClient):
143
143
  """
144
144
  .. raw:: html
145
145
 
146
- <p>Get the async EQL status.
147
- Get the current status for an async EQL search or a stored synchronous EQL search without returning results.</p>
146
+ <p>Get the async EQL status.</p>
147
+ <p>Get the current status for an async EQL search or a stored synchronous EQL search without returning results.</p>
148
148
 
149
149
 
150
150
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status>`_
@@ -242,14 +242,14 @@ class EqlClient(NamespacedClient):
242
242
  """
243
243
  .. raw:: html
244
244
 
245
- <p>Get EQL search results.
246
- Returns search results for an Event Query Language (EQL) query.
245
+ <p>Get EQL search results.</p>
246
+ <p>Returns search results for an Event Query Language (EQL) query.
247
247
  EQL assumes each document in a data stream or index corresponds to an event.</p>
248
248
 
249
249
 
250
250
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search>`_
251
251
 
252
- :param index: The name of the index to scope the operation
252
+ :param index: Comma-separated list of index names to scope the operation
253
253
  :param query: EQL query you wish to run.
254
254
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
255
255
  into no concrete indices. (This includes `_all` string or when no indices
@@ -291,7 +291,7 @@ class EqlClient(NamespacedClient):
291
291
  Defaults to 10
292
292
  :param tiebreaker_field: Field used to sort hits with the same timestamp in ascending
293
293
  order
294
- :param timestamp_field: Field containing event timestamp. Default "@timestamp"
294
+ :param timestamp_field: Field containing event timestamp.
295
295
  :param wait_for_completion_timeout:
296
296
  """
297
297
  if index in SKIP_IN_PATH:
@@ -23,13 +23,13 @@ from ._base import NamespacedClient
23
23
  from .utils import (
24
24
  SKIP_IN_PATH,
25
25
  Stability,
26
+ _availability_warning,
26
27
  _quote,
27
28
  _rewrite_parameters,
28
- _stability_warning,
29
29
  )
30
30
 
31
31
  if t.TYPE_CHECKING:
32
- from elasticsearch.esql import ESQLBase
32
+ from ...esql import ESQLBase
33
33
 
34
34
 
35
35
  class EsqlClient(NamespacedClient):
@@ -88,8 +88,8 @@ class EsqlClient(NamespacedClient):
88
88
  """
89
89
  .. raw:: html
90
90
 
91
- <p>Run an async ES|QL query.
92
- Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.</p>
91
+ <p>Run an async ES|QL query.</p>
92
+ <p>Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available.</p>
93
93
  <p>The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.</p>
94
94
 
95
95
 
@@ -218,8 +218,8 @@ class EsqlClient(NamespacedClient):
218
218
  """
219
219
  .. raw:: html
220
220
 
221
- <p>Delete an async ES|QL query.
222
- If the query is still running, it is cancelled.
221
+ <p>Delete an async ES|QL query.</p>
222
+ <p>If the query is still running, it is cancelled.
223
223
  Otherwise, the stored results are deleted.</p>
224
224
  <p>If the Elasticsearch security features are enabled, only the following users can use this API to delete a query:</p>
225
225
  <ul>
@@ -284,8 +284,8 @@ class EsqlClient(NamespacedClient):
284
284
  """
285
285
  .. raw:: html
286
286
 
287
- <p>Get async ES|QL query results.
288
- Get the current status and available results or stored results for an ES|QL asynchronous query.
287
+ <p>Get async ES|QL query results.</p>
288
+ <p>Get the current status and available results or stored results for an ES|QL asynchronous query.
289
289
  If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.</p>
290
290
 
291
291
 
@@ -396,7 +396,7 @@ class EsqlClient(NamespacedClient):
396
396
  )
397
397
 
398
398
  @_rewrite_parameters()
399
- @_stability_warning(Stability.EXPERIMENTAL)
399
+ @_availability_warning(Stability.EXPERIMENTAL)
400
400
  async def get_query(
401
401
  self,
402
402
  *,
@@ -409,8 +409,8 @@ class EsqlClient(NamespacedClient):
409
409
  """
410
410
  .. raw:: html
411
411
 
412
- <p>Get a specific running ES|QL query information.
413
- Returns an object extended information about a running ES|QL query.</p>
412
+ <p>Get a specific running ES|QL query information.</p>
413
+ <p>Returns an object extended information about a running ES|QL query.</p>
414
414
 
415
415
 
416
416
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query>`_
@@ -441,7 +441,7 @@ class EsqlClient(NamespacedClient):
441
441
  )
442
442
 
443
443
  @_rewrite_parameters()
444
- @_stability_warning(Stability.EXPERIMENTAL)
444
+ @_availability_warning(Stability.EXPERIMENTAL)
445
445
  async def list_queries(
446
446
  self,
447
447
  *,
@@ -453,8 +453,8 @@ class EsqlClient(NamespacedClient):
453
453
  """
454
454
  .. raw:: html
455
455
 
456
- <p>Get running ES|QL queries information.
457
- Returns an object containing IDs and other information about the running ES|QL queries.</p>
456
+ <p>Get running ES|QL queries information.</p>
457
+ <p>Returns an object containing IDs and other information about the running ES|QL queries.</p>
458
458
 
459
459
 
460
460
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries>`_
@@ -526,8 +526,8 @@ class EsqlClient(NamespacedClient):
526
526
  """
527
527
  .. raw:: html
528
528
 
529
- <p>Run an ES|QL query.
530
- Get search results for an ES|QL (Elasticsearch query language) query.</p>
529
+ <p>Run an ES|QL query.</p>
530
+ <p>Get search results for an ES|QL (Elasticsearch query language) query.</p>
531
531
 
532
532
 
533
533
  `<https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest>`_
@@ -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 Stability, _rewrite_parameters, _stability_warning
23
+ from .utils import Stability, _availability_warning, _rewrite_parameters
24
24
 
25
25
 
26
26
  class FeaturesClient(NamespacedClient):
@@ -38,8 +38,8 @@ class FeaturesClient(NamespacedClient):
38
38
  """
39
39
  .. raw:: html
40
40
 
41
- <p>Get the features.
42
- Get a list of features that can be included in snapshots using the <code>feature_states</code> field when creating a snapshot.
41
+ <p>Get the features.</p>
42
+ <p>Get a list of features that can be included in snapshots using the <code>feature_states</code> field when creating a snapshot.
43
43
  You can use this API to determine which feature states to include when taking a snapshot.
44
44
  By default, all feature states are included in a snapshot if that snapshot includes the global state, or none if it does not.</p>
45
45
  <p>A feature state includes one or more system indices necessary for a given feature to function.
@@ -76,7 +76,7 @@ class FeaturesClient(NamespacedClient):
76
76
  )
77
77
 
78
78
  @_rewrite_parameters()
79
- @_stability_warning(Stability.EXPERIMENTAL)
79
+ @_availability_warning(Stability.EXPERIMENTAL)
80
80
  async def reset_features(
81
81
  self,
82
82
  *,
@@ -89,8 +89,8 @@ class FeaturesClient(NamespacedClient):
89
89
  """
90
90
  .. raw:: html
91
91
 
92
- <p>Reset the features.
93
- Clear all of the state information stored in system indices by Elasticsearch features, including the security and machine learning indices.</p>
92
+ <p>Reset the features.</p>
93
+ <p>Clear all of the state information stored in system indices by Elasticsearch features, including the security and machine learning indices.</p>
94
94
  <p>WARNING: Intended for development and testing use only. Do not reset features on a production cluster.</p>
95
95
  <p>Return a cluster to the same state as a new installation by resetting the feature state for all Elasticsearch features.
96
96
  This deletes all state information stored in system indices.</p>
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
23
23
  from .utils import (
24
24
  SKIP_IN_PATH,
25
25
  Stability,
26
+ _availability_warning,
26
27
  _quote,
27
28
  _rewrite_parameters,
28
- _stability_warning,
29
29
  )
30
30
 
31
31
 
@@ -101,7 +101,7 @@ class FleetClient(NamespacedClient):
101
101
  @_rewrite_parameters(
102
102
  body_name="searches",
103
103
  )
104
- @_stability_warning(Stability.EXPERIMENTAL)
104
+ @_availability_warning(Stability.EXPERIMENTAL)
105
105
  async def msearch(
106
106
  self,
107
107
  *,
@@ -138,8 +138,8 @@ class FleetClient(NamespacedClient):
138
138
  """
139
139
  .. raw:: html
140
140
 
141
- <p>Run multiple Fleet searches.
142
- Run several Fleet searches with a single API request.
141
+ <p>Run multiple Fleet searches.</p>
142
+ <p>Run several Fleet searches with a single API request.
143
143
  The API follows the same structure as the multi search API.
144
144
  However, similar to the Fleet search API, it supports the <code>wait_for_checkpoints</code> parameter.</p>
145
145
 
@@ -293,7 +293,7 @@ class FleetClient(NamespacedClient):
293
293
  "from": "from_",
294
294
  },
295
295
  )
296
- @_stability_warning(Stability.EXPERIMENTAL)
296
+ @_availability_warning(Stability.EXPERIMENTAL)
297
297
  async def search(
298
298
  self,
299
299
  *,
@@ -388,8 +388,8 @@ class FleetClient(NamespacedClient):
388
388
  """
389
389
  .. raw:: html
390
390
 
391
- <p>Run a Fleet search.
392
- The purpose of the Fleet search API is to provide an API where the search will be run only
391
+ <p>Run a Fleet search.</p>
392
+ <p>The purpose of the Fleet search API is to provide an API where the search will be run only
393
393
  after the provided checkpoint has been processed and is visible for searches inside of Elasticsearch.</p>
394
394
 
395
395
 
@@ -642,11 +642,7 @@ class FleetClient(NamespacedClient):
642
642
  __body["track_total_hits"] = track_total_hits
643
643
  if version is not None:
644
644
  __body["version"] = version
645
- if not __body:
646
- __body = None # type: ignore[assignment]
647
- __headers = {"accept": "application/json"}
648
- if __body is not None:
649
- __headers["content-type"] = "application/json"
645
+ __headers = {"accept": "application/json", "content-type": "application/json"}
650
646
  return await self.perform_request( # type: ignore[return-value]
651
647
  "POST",
652
648
  __path,
@@ -47,8 +47,8 @@ class GraphClient(NamespacedClient):
47
47
  """
48
48
  .. raw:: html
49
49
 
50
- <p>Explore graph analytics.
51
- Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.
50
+ <p>Explore graph analytics.</p>
51
+ <p>Extract and summarize information about the documents and terms in an Elasticsearch data stream or index.
52
52
  The easiest way to understand the behavior of this API is to use the Graph UI to explore connections.
53
53
  An initial request to the <code>_explore</code> API contains a seed query that identifies the documents of interest and specifies the fields that define the vertices and connections you want to include in the graph.
54
54
  Subsequent requests enable you to spider out from one more vertices of interest.
@@ -97,11 +97,7 @@ class GraphClient(NamespacedClient):
97
97
  __body["query"] = query
98
98
  if vertices is not None:
99
99
  __body["vertices"] = vertices
100
- if not __body:
101
- __body = None # type: ignore[assignment]
102
- __headers = {"accept": "application/json"}
103
- if __body is not None:
104
- __headers["content-type"] = "application/json"
100
+ __headers = {"accept": "application/json", "content-type": "application/json"}
105
101
  return await self.perform_request( # type: ignore[return-value]
106
102
  "POST",
107
103
  __path,
@@ -40,8 +40,8 @@ class IlmClient(NamespacedClient):
40
40
  """
41
41
  .. raw:: html
42
42
 
43
- <p>Delete a lifecycle policy.
44
- You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.</p>
43
+ <p>Delete a lifecycle policy.</p>
44
+ <p>You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.</p>
45
45
 
46
46
 
47
47
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle>`_
@@ -96,8 +96,8 @@ class IlmClient(NamespacedClient):
96
96
  """
97
97
  .. raw:: html
98
98
 
99
- <p>Explain the lifecycle state.
100
- Get the current lifecycle status for one or more indices.
99
+ <p>Explain the lifecycle state.</p>
100
+ <p>Get the current lifecycle status for one or more indices.
101
101
  For data streams, the API retrieves the current lifecycle status for the stream's backing indices.</p>
102
102
  <p>The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.</p>
103
103
 
@@ -260,8 +260,8 @@ class IlmClient(NamespacedClient):
260
260
  """
261
261
  .. raw:: html
262
262
 
263
- <p>Migrate to data tiers routing.
264
- Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers.
263
+ <p>Migrate to data tiers routing.</p>
264
+ <p>Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers.
265
265
  Optionally, delete one legacy index template.
266
266
  Using node roles enables ILM to automatically move the indices between data tiers.</p>
267
267
  <p>Migrating away from custom node attributes routing can be manually performed.
@@ -341,8 +341,8 @@ class IlmClient(NamespacedClient):
341
341
  """
342
342
  .. raw:: html
343
343
 
344
- <p>Move to a lifecycle step.
345
- Manually move an index into a specific step in the lifecycle policy and run that step.</p>
344
+ <p>Move to a lifecycle step.</p>
345
+ <p>Manually move an index into a specific step in the lifecycle policy and run that step.</p>
346
346
  <p>WARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API.</p>
347
347
  <p>You must specify both the current step and the step to be executed in the body of the request.
348
348
  The request will fail if the current step does not match the step currently running for the index
@@ -383,11 +383,7 @@ class IlmClient(NamespacedClient):
383
383
  __body["current_step"] = current_step
384
384
  if next_step is not None:
385
385
  __body["next_step"] = next_step
386
- if not __body:
387
- __body = None # type: ignore[assignment]
388
- __headers = {"accept": "application/json"}
389
- if __body is not None:
390
- __headers["content-type"] = "application/json"
386
+ __headers = {"accept": "application/json", "content-type": "application/json"}
391
387
  return await self.perform_request( # type: ignore[return-value]
392
388
  "POST",
393
389
  __path,
@@ -417,8 +413,8 @@ class IlmClient(NamespacedClient):
417
413
  """
418
414
  .. raw:: html
419
415
 
420
- <p>Create or update a lifecycle policy.
421
- If the specified policy exists, it is replaced and the policy version is incremented.</p>
416
+ <p>Create or update a lifecycle policy.</p>
417
+ <p>If the specified policy exists, it is replaced and the policy version is incremented.</p>
422
418
  <p>NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.</p>
423
419
 
424
420
 
@@ -453,11 +449,7 @@ class IlmClient(NamespacedClient):
453
449
  if not __body:
454
450
  if policy is not None:
455
451
  __body["policy"] = policy
456
- if not __body:
457
- __body = None # type: ignore[assignment]
458
- __headers = {"accept": "application/json"}
459
- if __body is not None:
460
- __headers["content-type"] = "application/json"
452
+ __headers = {"accept": "application/json", "content-type": "application/json"}
461
453
  return await self.perform_request( # type: ignore[return-value]
462
454
  "PUT",
463
455
  __path,
@@ -481,8 +473,8 @@ class IlmClient(NamespacedClient):
481
473
  """
482
474
  .. raw:: html
483
475
 
484
- <p>Remove policies from an index.
485
- Remove the assigned lifecycle policies from an index or a data stream's backing indices.
476
+ <p>Remove policies from an index.</p>
477
+ <p>Remove the assigned lifecycle policies from an index or a data stream's backing indices.
486
478
  It also stops managing the indices.</p>
487
479
 
488
480
 
@@ -526,8 +518,8 @@ class IlmClient(NamespacedClient):
526
518
  """
527
519
  .. raw:: html
528
520
 
529
- <p>Retry a policy.
530
- Retry running the lifecycle policy for an index that is in the ERROR step.
521
+ <p>Retry a policy.</p>
522
+ <p>Retry running the lifecycle policy for an index that is in the ERROR step.
531
523
  The API sets the policy back to the step where the error occurred and runs the step.
532
524
  Use the explain lifecycle state API to determine whether an index is in the ERROR step.</p>
533
525
 
@@ -574,8 +566,8 @@ class IlmClient(NamespacedClient):
574
566
  """
575
567
  .. raw:: html
576
568
 
577
- <p>Start the ILM plugin.
578
- Start the index lifecycle management plugin if it is currently stopped.
569
+ <p>Start the ILM plugin.</p>
570
+ <p>Start the index lifecycle management plugin if it is currently stopped.
579
571
  ILM is started automatically when the cluster is formed.
580
572
  Restarting ILM is necessary only when it has been stopped using the stop ILM API.</p>
581
573
 
@@ -627,8 +619,8 @@ class IlmClient(NamespacedClient):
627
619
  """
628
620
  .. raw:: html
629
621
 
630
- <p>Stop the ILM plugin.
631
- Halt all lifecycle management operations and stop the index lifecycle management plugin.
622
+ <p>Stop the ILM plugin.</p>
623
+ <p>Halt all lifecycle management operations and stop the index lifecycle management plugin.
632
624
  This is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices.</p>
633
625
  <p>The API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped.
634
626
  Use the get ILM status API to check whether ILM is running.</p>