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
@@ -57,23 +57,40 @@ class IndicesClient(NamespacedClient):
57
57
  """
58
58
  .. raw:: html
59
59
 
60
- <p>Add an index block.
61
- Limits the operations allowed on an index by blocking specific operation types.</p>
60
+ <p>Add an index block.</p>
61
+ <p>Add an index block to an index.
62
+ Index blocks limit the operations allowed on an index by blocking specific operation types.</p>
62
63
 
63
64
 
64
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-modules-blocks.html>`_
65
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-add-block>`_
65
66
 
66
- :param index: A comma separated list of indices to add a block to
67
- :param block: The block to add (one of read, write, read_only or metadata)
68
- :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
69
- into no concrete indices. (This includes `_all` string or when no indices
70
- have been specified)
71
- :param expand_wildcards: Whether to expand wildcard expression to concrete indices
72
- that are open, closed or both.
73
- :param ignore_unavailable: Whether specified concrete indices should be ignored
74
- when unavailable (missing or closed)
75
- :param master_timeout: Specify timeout for connection to master
76
- :param timeout: Explicit operation timeout
67
+ :param index: A comma-separated list or wildcard expression of index names used
68
+ to limit the request. By default, you must explicitly name the indices you
69
+ are adding blocks to. To allow the adding of blocks to indices with `_all`,
70
+ `*`, or other wildcard expressions, change the `action.destructive_requires_name`
71
+ setting to `false`. You can update this setting in the `elasticsearch.yml`
72
+ file or by using the cluster update settings API.
73
+ :param block: The block type to add to the index.
74
+ :param allow_no_indices: If `false`, the request returns an error if any wildcard
75
+ expression, index alias, or `_all` value targets only missing or closed indices.
76
+ This behavior applies even if the request targets other open indices. For
77
+ example, a request targeting `foo*,bar*` returns an error if an index starts
78
+ with `foo` but no index starts with `bar`.
79
+ :param expand_wildcards: The type of index that wildcard patterns can match.
80
+ If the request can target data streams, this argument determines whether
81
+ wildcard expressions match hidden data streams. It supports comma-separated
82
+ values, such as `open,hidden`.
83
+ :param ignore_unavailable: If `false`, the request returns an error if it targets
84
+ a missing or closed index.
85
+ :param master_timeout: The period to wait for the master node. If the master
86
+ node is not available before the timeout expires, the request fails and returns
87
+ an error. It can also be set to `-1` to indicate that the request should
88
+ never timeout.
89
+ :param timeout: The period to wait for a response from all relevant nodes in
90
+ the cluster after updating the cluster metadata. If no response is received
91
+ before the timeout expires, the cluster metadata update still applies but
92
+ the response will indicate that it was not completely acknowledged. It can
93
+ also be set to `-1` to indicate that the request should never timeout.
77
94
  """
78
95
  if index in SKIP_IN_PATH:
79
96
  raise ValueError("Empty value passed for parameter 'index'")
@@ -156,7 +173,7 @@ class IndicesClient(NamespacedClient):
156
173
  The <code>_analyze</code> endpoint without a specified index will always use <code>10000</code> as its limit.</p>
157
174
 
158
175
 
159
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-analyze.html>`_
176
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-analyze>`_
160
177
 
161
178
  :param index: Index used to derive the analyzer. If specified, the `analyzer`
162
179
  or field parameter overrides this value. If no index is specified or the
@@ -230,6 +247,51 @@ class IndicesClient(NamespacedClient):
230
247
  path_parts=__path_parts,
231
248
  )
232
249
 
250
+ @_rewrite_parameters()
251
+ @_stability_warning(Stability.EXPERIMENTAL)
252
+ def cancel_migrate_reindex(
253
+ self,
254
+ *,
255
+ index: t.Union[str, t.Sequence[str]],
256
+ error_trace: t.Optional[bool] = None,
257
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
258
+ human: t.Optional[bool] = None,
259
+ pretty: t.Optional[bool] = None,
260
+ ) -> ObjectApiResponse[t.Any]:
261
+ """
262
+ .. raw:: html
263
+
264
+ <p>Cancel a migration reindex operation.</p>
265
+ <p>Cancel a migration reindex attempt for a data stream or index.</p>
266
+
267
+
268
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-migration>`_
269
+
270
+ :param index: The index or data stream name
271
+ """
272
+ if index in SKIP_IN_PATH:
273
+ raise ValueError("Empty value passed for parameter 'index'")
274
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
275
+ __path = f'/_migration/reindex/{__path_parts["index"]}/_cancel'
276
+ __query: t.Dict[str, t.Any] = {}
277
+ if error_trace is not None:
278
+ __query["error_trace"] = error_trace
279
+ if filter_path is not None:
280
+ __query["filter_path"] = filter_path
281
+ if human is not None:
282
+ __query["human"] = human
283
+ if pretty is not None:
284
+ __query["pretty"] = pretty
285
+ __headers = {"accept": "application/json"}
286
+ return self.perform_request( # type: ignore[return-value]
287
+ "POST",
288
+ __path,
289
+ params=__query,
290
+ headers=__headers,
291
+ endpoint_id="indices.cancel_migrate_reindex",
292
+ path_parts=__path_parts,
293
+ )
294
+
233
295
  @_rewrite_parameters()
234
296
  def clear_cache(
235
297
  self,
@@ -265,7 +327,7 @@ class IndicesClient(NamespacedClient):
265
327
  To clear the cache only of specific fields, use the <code>fields</code> parameter.</p>
266
328
 
267
329
 
268
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clearcache.html>`_
330
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-clear-cache>`_
269
331
 
270
332
  :param index: Comma-separated list of data streams, indices, and aliases used
271
333
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -387,7 +449,7 @@ class IndicesClient(NamespacedClient):
387
449
  <p>Because the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.</p>
388
450
 
389
451
 
390
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clone-index.html>`_
452
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-clone>`_
391
453
 
392
454
  :param index: Name of the source index to clone.
393
455
  :param target: Name of the target index to create.
@@ -491,7 +553,7 @@ class IndicesClient(NamespacedClient):
491
553
  Closing indices can be turned off with the cluster settings API by setting <code>cluster.indices.close.enable</code> to <code>false</code>.</p>
492
554
 
493
555
 
494
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-close.html>`_
556
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-close>`_
495
557
 
496
558
  :param index: Comma-separated list or wildcard expression of index names used
497
559
  to limit the request.
@@ -592,7 +654,7 @@ class IndicesClient(NamespacedClient):
592
654
  Note that changing this setting will also affect the <code>wait_for_active_shards</code> value on all subsequent write operations.</p>
593
655
 
594
656
 
595
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-create-index.html>`_
657
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-create>`_
596
658
 
597
659
  :param index: Name of the index you wish to create.
598
660
  :param aliases: Aliases for the index.
@@ -665,12 +727,11 @@ class IndicesClient(NamespacedClient):
665
727
  """
666
728
  .. raw:: html
667
729
 
668
- <p>Create a data stream.
669
- Creates a data stream.
670
- You must have a matching index template with data stream enabled.</p>
730
+ <p>Create a data stream.</p>
731
+ <p>You must have a matching index template with data stream enabled.</p>
671
732
 
672
733
 
673
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
734
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-create-data-stream>`_
674
735
 
675
736
  :param name: Name of the data stream, which must meet the following criteria:
676
737
  Lowercase only; Cannot include `\\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`,
@@ -710,6 +771,71 @@ class IndicesClient(NamespacedClient):
710
771
  path_parts=__path_parts,
711
772
  )
712
773
 
774
+ @_rewrite_parameters(
775
+ body_name="create_from",
776
+ )
777
+ @_stability_warning(Stability.EXPERIMENTAL)
778
+ def create_from(
779
+ self,
780
+ *,
781
+ source: str,
782
+ dest: str,
783
+ create_from: t.Optional[t.Mapping[str, t.Any]] = None,
784
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
785
+ error_trace: t.Optional[bool] = None,
786
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
787
+ human: t.Optional[bool] = None,
788
+ pretty: t.Optional[bool] = None,
789
+ ) -> ObjectApiResponse[t.Any]:
790
+ """
791
+ .. raw:: html
792
+
793
+ <p>Create an index from a source index.</p>
794
+ <p>Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.</p>
795
+
796
+
797
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-migration>`_
798
+
799
+ :param source: The source index or data stream name
800
+ :param dest: The destination index or data stream name
801
+ :param create_from:
802
+ """
803
+ if source in SKIP_IN_PATH:
804
+ raise ValueError("Empty value passed for parameter 'source'")
805
+ if dest in SKIP_IN_PATH:
806
+ raise ValueError("Empty value passed for parameter 'dest'")
807
+ if create_from is None and body is None:
808
+ raise ValueError(
809
+ "Empty value passed for parameters 'create_from' and 'body', one of them should be set."
810
+ )
811
+ elif create_from is not None and body is not None:
812
+ raise ValueError("Cannot set both 'create_from' and 'body'")
813
+ __path_parts: t.Dict[str, str] = {
814
+ "source": _quote(source),
815
+ "dest": _quote(dest),
816
+ }
817
+ __path = f'/_create_from/{__path_parts["source"]}/{__path_parts["dest"]}'
818
+ __query: t.Dict[str, t.Any] = {}
819
+ if error_trace is not None:
820
+ __query["error_trace"] = error_trace
821
+ if filter_path is not None:
822
+ __query["filter_path"] = filter_path
823
+ if human is not None:
824
+ __query["human"] = human
825
+ if pretty is not None:
826
+ __query["pretty"] = pretty
827
+ __body = create_from if create_from is not None else body
828
+ __headers = {"accept": "application/json", "content-type": "application/json"}
829
+ return self.perform_request( # type: ignore[return-value]
830
+ "PUT",
831
+ __path,
832
+ params=__query,
833
+ headers=__headers,
834
+ body=__body,
835
+ endpoint_id="indices.create_from",
836
+ path_parts=__path_parts,
837
+ )
838
+
713
839
  @_rewrite_parameters()
714
840
  def data_streams_stats(
715
841
  self,
@@ -731,11 +857,11 @@ class IndicesClient(NamespacedClient):
731
857
  """
732
858
  .. raw:: html
733
859
 
734
- <p>Get data stream stats.
735
- Retrieves statistics for one or more data streams.</p>
860
+ <p>Get data stream stats.</p>
861
+ <p>Get statistics for one or more data streams.</p>
736
862
 
737
863
 
738
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
864
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-data-streams-stats-1>`_
739
865
 
740
866
  :param name: Comma-separated list of data streams used to limit the request.
741
867
  Wildcard expressions (`*`) are supported. To target all data streams in a
@@ -804,7 +930,7 @@ class IndicesClient(NamespacedClient):
804
930
  You can then use the delete index API to delete the previous write index.</p>
805
931
 
806
932
 
807
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-index.html>`_
933
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete>`_
808
934
 
809
935
  :param index: Comma-separated list of indices to delete. You cannot specify index
810
936
  aliases. By default, this parameter does not support wildcards (`*`) or `_all`.
@@ -878,7 +1004,7 @@ class IndicesClient(NamespacedClient):
878
1004
  Removes a data stream or index from an alias.</p>
879
1005
 
880
1006
 
881
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-alias.html>`_
1007
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-alias>`_
882
1008
 
883
1009
  :param index: Comma-separated list of data streams or indices used to limit the
884
1010
  request. Supports wildcards (`*`).
@@ -946,7 +1072,7 @@ class IndicesClient(NamespacedClient):
946
1072
  Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
947
1073
 
948
1074
 
949
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-delete-lifecycle.html>`_
1075
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-data-lifecycle>`_
950
1076
 
951
1077
  :param name: A comma-separated list of data streams of which the data stream
952
1078
  lifecycle will be deleted; use `*` to get all data streams
@@ -1010,7 +1136,7 @@ class IndicesClient(NamespacedClient):
1010
1136
  Deletes one or more data streams and their backing indices.</p>
1011
1137
 
1012
1138
 
1013
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
1139
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-data-stream>`_
1014
1140
 
1015
1141
  :param name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions
1016
1142
  are supported.
@@ -1068,7 +1194,7 @@ class IndicesClient(NamespacedClient):
1068
1194
  existing templates.</p>
1069
1195
 
1070
1196
 
1071
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template.html>`_
1197
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-index-template>`_
1072
1198
 
1073
1199
  :param name: Comma-separated list of index template names used to limit the request.
1074
1200
  Wildcard (*) expressions are supported.
@@ -1123,7 +1249,7 @@ class IndicesClient(NamespacedClient):
1123
1249
  <p>Delete a legacy index template.</p>
1124
1250
 
1125
1251
 
1126
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template-v1.html>`_
1252
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-template>`_
1127
1253
 
1128
1254
  :param name: The name of the legacy index template to delete. Wildcard (`*`)
1129
1255
  expressions are supported.
@@ -1195,7 +1321,7 @@ class IndicesClient(NamespacedClient):
1195
1321
  The stored size of the <code>_id</code> field is likely underestimated while the <code>_source</code> field is overestimated.</p>
1196
1322
 
1197
1323
 
1198
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-disk-usage.html>`_
1324
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-disk-usage>`_
1199
1325
 
1200
1326
  :param index: Comma-separated list of data streams, indices, and aliases used
1201
1327
  to limit the request. It’s recommended to execute this API with a single
@@ -1278,7 +1404,7 @@ class IndicesClient(NamespacedClient):
1278
1404
  The source index must be read only (<code>index.blocks.write: true</code>).</p>
1279
1405
 
1280
1406
 
1281
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-downsample-data-stream.html>`_
1407
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-downsample>`_
1282
1408
 
1283
1409
  :param index: Name of the time series index to downsample.
1284
1410
  :param target_index: Name of the index to create.
@@ -1350,7 +1476,7 @@ class IndicesClient(NamespacedClient):
1350
1476
  Check if one or more indices, index aliases, or data streams exist.</p>
1351
1477
 
1352
1478
 
1353
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-exists.html>`_
1479
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists>`_
1354
1480
 
1355
1481
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1356
1482
  wildcards (`*`).
@@ -1422,17 +1548,17 @@ class IndicesClient(NamespacedClient):
1422
1548
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1423
1549
  human: t.Optional[bool] = None,
1424
1550
  ignore_unavailable: t.Optional[bool] = None,
1425
- local: t.Optional[bool] = None,
1551
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1426
1552
  pretty: t.Optional[bool] = None,
1427
1553
  ) -> HeadApiResponse:
1428
1554
  """
1429
1555
  .. raw:: html
1430
1556
 
1431
- <p>Check aliases.
1432
- Checks if one or more data stream or index aliases exist.</p>
1557
+ <p>Check aliases.</p>
1558
+ <p>Check if one or more data stream or index aliases exist.</p>
1433
1559
 
1434
1560
 
1435
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
1561
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists-alias>`_
1436
1562
 
1437
1563
  :param name: Comma-separated list of aliases to check. Supports wildcards (`*`).
1438
1564
  :param index: Comma-separated list of data streams or indices used to limit the
@@ -1447,8 +1573,9 @@ class IndicesClient(NamespacedClient):
1447
1573
  as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
1448
1574
  :param ignore_unavailable: If `false`, requests that include a missing data stream
1449
1575
  or index in the target indices or data streams return an error.
1450
- :param local: If `true`, the request retrieves information from the local node
1451
- only.
1576
+ :param master_timeout: Period to wait for a connection to the master node. If
1577
+ no response is received before the timeout expires, the request fails and
1578
+ returns an error.
1452
1579
  """
1453
1580
  if name in SKIP_IN_PATH:
1454
1581
  raise ValueError("Empty value passed for parameter 'name'")
@@ -1474,8 +1601,8 @@ class IndicesClient(NamespacedClient):
1474
1601
  __query["human"] = human
1475
1602
  if ignore_unavailable is not None:
1476
1603
  __query["ignore_unavailable"] = ignore_unavailable
1477
- if local is not None:
1478
- __query["local"] = local
1604
+ if master_timeout is not None:
1605
+ __query["master_timeout"] = master_timeout
1479
1606
  if pretty is not None:
1480
1607
  __query["pretty"] = pretty
1481
1608
  __headers = {"accept": "application/json"}
@@ -1495,21 +1622,27 @@ class IndicesClient(NamespacedClient):
1495
1622
  name: str,
1496
1623
  error_trace: t.Optional[bool] = None,
1497
1624
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1625
+ flat_settings: t.Optional[bool] = None,
1498
1626
  human: t.Optional[bool] = None,
1627
+ local: t.Optional[bool] = None,
1499
1628
  master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1500
1629
  pretty: t.Optional[bool] = None,
1501
1630
  ) -> HeadApiResponse:
1502
1631
  """
1503
1632
  .. raw:: html
1504
1633
 
1505
- <p>Check index templates.
1506
- Check whether index templates exist.</p>
1634
+ <p>Check index templates.</p>
1635
+ <p>Check whether index templates exist.</p>
1507
1636
 
1508
1637
 
1509
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-templates.html>`_
1638
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists-index-template>`_
1510
1639
 
1511
1640
  :param name: Comma-separated list of index template names used to limit the request.
1512
1641
  Wildcard (*) expressions are supported.
1642
+ :param flat_settings: If true, returns settings in flat format.
1643
+ :param local: If true, the request retrieves information from the local node
1644
+ only. Defaults to false, which means information is retrieved from the master
1645
+ node.
1513
1646
  :param master_timeout: Period to wait for a connection to the master node. If
1514
1647
  no response is received before the timeout expires, the request fails and
1515
1648
  returns an error.
@@ -1523,8 +1656,12 @@ class IndicesClient(NamespacedClient):
1523
1656
  __query["error_trace"] = error_trace
1524
1657
  if filter_path is not None:
1525
1658
  __query["filter_path"] = filter_path
1659
+ if flat_settings is not None:
1660
+ __query["flat_settings"] = flat_settings
1526
1661
  if human is not None:
1527
1662
  __query["human"] = human
1663
+ if local is not None:
1664
+ __query["local"] = local
1528
1665
  if master_timeout is not None:
1529
1666
  __query["master_timeout"] = master_timeout
1530
1667
  if pretty is not None:
@@ -1561,7 +1698,7 @@ class IndicesClient(NamespacedClient):
1561
1698
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
1562
1699
 
1563
1700
 
1564
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-template-exists-v1.html>`_
1701
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists-template>`_
1565
1702
 
1566
1703
  :param name: A comma-separated list of index template names used to limit the
1567
1704
  request. Wildcard (`*`) expressions are supported.
@@ -1619,7 +1756,7 @@ class IndicesClient(NamespacedClient):
1619
1756
  Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.</p>
1620
1757
 
1621
1758
 
1622
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-explain-lifecycle.html>`_
1759
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-explain-data-lifecycle>`_
1623
1760
 
1624
1761
  :param index: The name of the index to explain
1625
1762
  :param include_defaults: indicates if the API should return the default values
@@ -1673,12 +1810,7 @@ class IndicesClient(NamespacedClient):
1673
1810
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1674
1811
  human: t.Optional[bool] = None,
1675
1812
  ignore_unavailable: t.Optional[bool] = None,
1676
- master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1677
1813
  pretty: t.Optional[bool] = None,
1678
- timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1679
- wait_for_active_shards: t.Optional[
1680
- t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
1681
- ] = None,
1682
1814
  ) -> ObjectApiResponse[t.Any]:
1683
1815
  """
1684
1816
  .. raw:: html
@@ -1691,7 +1823,7 @@ class IndicesClient(NamespacedClient):
1691
1823
  A given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.</p>
1692
1824
 
1693
1825
 
1694
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/field-usage-stats.html>`_
1826
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-field-usage-stats>`_
1695
1827
 
1696
1828
  :param index: Comma-separated list or wildcard expression of index names used
1697
1829
  to limit the request.
@@ -1708,14 +1840,6 @@ class IndicesClient(NamespacedClient):
1708
1840
  in the statistics.
1709
1841
  :param ignore_unavailable: If `true`, missing or closed indices are not included
1710
1842
  in the response.
1711
- :param master_timeout: Period to wait for a connection to the master node. If
1712
- no response is received before the timeout expires, the request fails and
1713
- returns an error.
1714
- :param timeout: Period to wait for a response. If no response is received before
1715
- the timeout expires, the request fails and returns an error.
1716
- :param wait_for_active_shards: The number of shard copies that must be active
1717
- before proceeding with the operation. Set to all or any positive integer
1718
- up to the total number of shards in the index (`number_of_replicas+1`).
1719
1843
  """
1720
1844
  if index in SKIP_IN_PATH:
1721
1845
  raise ValueError("Empty value passed for parameter 'index'")
@@ -1736,14 +1860,8 @@ class IndicesClient(NamespacedClient):
1736
1860
  __query["human"] = human
1737
1861
  if ignore_unavailable is not None:
1738
1862
  __query["ignore_unavailable"] = ignore_unavailable
1739
- if master_timeout is not None:
1740
- __query["master_timeout"] = master_timeout
1741
1863
  if pretty is not None:
1742
1864
  __query["pretty"] = pretty
1743
- if timeout is not None:
1744
- __query["timeout"] = timeout
1745
- if wait_for_active_shards is not None:
1746
- __query["wait_for_active_shards"] = wait_for_active_shards
1747
1865
  __headers = {"accept": "application/json"}
1748
1866
  return self.perform_request( # type: ignore[return-value]
1749
1867
  "GET",
@@ -1790,7 +1908,7 @@ class IndicesClient(NamespacedClient):
1790
1908
  If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.</p>
1791
1909
 
1792
1910
 
1793
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-flush.html>`_
1911
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-flush>`_
1794
1912
 
1795
1913
  :param index: Comma-separated list of data streams, indices, and aliases to flush.
1796
1914
  Supports wildcards (`*`). To flush all data streams and indices, omit this
@@ -1915,7 +2033,7 @@ class IndicesClient(NamespacedClient):
1915
2033
  </code></pre>
1916
2034
 
1917
2035
 
1918
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-forcemerge.html>`_
2036
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-forcemerge>`_
1919
2037
 
1920
2038
  :param index: A comma-separated list of index names; use `_all` or empty string
1921
2039
  to perform the operation on all indices
@@ -2013,7 +2131,7 @@ class IndicesClient(NamespacedClient):
2013
2131
  stream’s backing indices.</p>
2014
2132
 
2015
2133
 
2016
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-index.html>`_
2134
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get>`_
2017
2135
 
2018
2136
  :param index: Comma-separated list of data streams, indices, and index aliases
2019
2137
  used to limit the request. Wildcard expressions (*) are supported.
@@ -2096,7 +2214,7 @@ class IndicesClient(NamespacedClient):
2096
2214
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2097
2215
  human: t.Optional[bool] = None,
2098
2216
  ignore_unavailable: t.Optional[bool] = None,
2099
- local: t.Optional[bool] = None,
2217
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2100
2218
  pretty: t.Optional[bool] = None,
2101
2219
  ) -> ObjectApiResponse[t.Any]:
2102
2220
  """
@@ -2106,7 +2224,7 @@ class IndicesClient(NamespacedClient):
2106
2224
  Retrieves information for one or more data stream or index aliases.</p>
2107
2225
 
2108
2226
 
2109
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-alias.html>`_
2227
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-alias>`_
2110
2228
 
2111
2229
  :param index: Comma-separated list of data streams or indices used to limit the
2112
2230
  request. Supports wildcards (`*`). To target all data streams and indices,
@@ -2122,8 +2240,9 @@ class IndicesClient(NamespacedClient):
2122
2240
  as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
2123
2241
  :param ignore_unavailable: If `false`, the request returns an error if it targets
2124
2242
  a missing or closed index.
2125
- :param local: If `true`, the request retrieves information from the local node
2126
- only.
2243
+ :param master_timeout: Period to wait for a connection to the master node. If
2244
+ no response is received before the timeout expires, the request fails and
2245
+ returns an error.
2127
2246
  """
2128
2247
  __path_parts: t.Dict[str, str]
2129
2248
  if index not in SKIP_IN_PATH and name not in SKIP_IN_PATH:
@@ -2151,8 +2270,8 @@ class IndicesClient(NamespacedClient):
2151
2270
  __query["human"] = human
2152
2271
  if ignore_unavailable is not None:
2153
2272
  __query["ignore_unavailable"] = ignore_unavailable
2154
- if local is not None:
2155
- __query["local"] = local
2273
+ if master_timeout is not None:
2274
+ __query["master_timeout"] = master_timeout
2156
2275
  if pretty is not None:
2157
2276
  __query["pretty"] = pretty
2158
2277
  __headers = {"accept": "application/json"}
@@ -2188,11 +2307,11 @@ class IndicesClient(NamespacedClient):
2188
2307
  """
2189
2308
  .. raw:: html
2190
2309
 
2191
- <p>Get data stream lifecycles.
2192
- Retrieves the data stream lifecycle configuration of one or more data streams.</p>
2310
+ <p>Get data stream lifecycles.</p>
2311
+ <p>Get the data stream lifecycle configuration of one or more data streams.</p>
2193
2312
 
2194
2313
 
2195
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle.html>`_
2314
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-data-lifecycle>`_
2196
2315
 
2197
2316
  :param name: Comma-separated list of data streams to limit the request. Supports
2198
2317
  wildcards (`*`). To target all data streams, omit this parameter or use `*`
@@ -2250,7 +2369,7 @@ class IndicesClient(NamespacedClient):
2250
2369
  Get statistics about the data streams that are managed by a data stream lifecycle.</p>
2251
2370
 
2252
2371
 
2253
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle-stats.html>`_
2372
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-data-lifecycle-stats>`_
2254
2373
  """
2255
2374
  __path_parts: t.Dict[str, str] = {}
2256
2375
  __path = "/_lifecycle/stats"
@@ -2297,11 +2416,11 @@ class IndicesClient(NamespacedClient):
2297
2416
  """
2298
2417
  .. raw:: html
2299
2418
 
2300
- <p>Get data streams.
2301
- Retrieves information about one or more data streams.</p>
2419
+ <p>Get data streams.</p>
2420
+ <p>Get information about one or more data streams.</p>
2302
2421
 
2303
2422
 
2304
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2423
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-data-stream>`_
2305
2424
 
2306
2425
  :param name: Comma-separated list of data stream names used to limit the request.
2307
2426
  Wildcard (`*`) expressions are supported. If omitted, all data streams are
@@ -2382,7 +2501,7 @@ class IndicesClient(NamespacedClient):
2382
2501
  <p>This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.</p>
2383
2502
 
2384
2503
 
2385
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-field-mapping.html>`_
2504
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-mapping>`_
2386
2505
 
2387
2506
  :param fields: Comma-separated list or wildcard expression of fields used to
2388
2507
  limit returned information. Supports wildcards (`*`).
@@ -2463,7 +2582,7 @@ class IndicesClient(NamespacedClient):
2463
2582
  Get information about one or more index templates.</p>
2464
2583
 
2465
2584
 
2466
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template.html>`_
2585
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-index-template>`_
2467
2586
 
2468
2587
  :param name: Comma-separated list of index template names used to limit the request.
2469
2588
  Wildcard (*) expressions are supported.
@@ -2540,7 +2659,7 @@ class IndicesClient(NamespacedClient):
2540
2659
  For data streams, the API retrieves mappings for the stream’s backing indices.</p>
2541
2660
 
2542
2661
 
2543
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-mapping.html>`_
2662
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-mapping>`_
2544
2663
 
2545
2664
  :param index: Comma-separated list of data streams, indices, and aliases used
2546
2665
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2596,6 +2715,51 @@ class IndicesClient(NamespacedClient):
2596
2715
  path_parts=__path_parts,
2597
2716
  )
2598
2717
 
2718
+ @_rewrite_parameters()
2719
+ @_stability_warning(Stability.EXPERIMENTAL)
2720
+ def get_migrate_reindex_status(
2721
+ self,
2722
+ *,
2723
+ index: t.Union[str, t.Sequence[str]],
2724
+ error_trace: t.Optional[bool] = None,
2725
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2726
+ human: t.Optional[bool] = None,
2727
+ pretty: t.Optional[bool] = None,
2728
+ ) -> ObjectApiResponse[t.Any]:
2729
+ """
2730
+ .. raw:: html
2731
+
2732
+ <p>Get the migration reindexing status.</p>
2733
+ <p>Get the status of a migration reindex attempt for a data stream or index.</p>
2734
+
2735
+
2736
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-migration>`_
2737
+
2738
+ :param index: The index or data stream name.
2739
+ """
2740
+ if index in SKIP_IN_PATH:
2741
+ raise ValueError("Empty value passed for parameter 'index'")
2742
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
2743
+ __path = f'/_migration/reindex/{__path_parts["index"]}/_status'
2744
+ __query: t.Dict[str, t.Any] = {}
2745
+ if error_trace is not None:
2746
+ __query["error_trace"] = error_trace
2747
+ if filter_path is not None:
2748
+ __query["filter_path"] = filter_path
2749
+ if human is not None:
2750
+ __query["human"] = human
2751
+ if pretty is not None:
2752
+ __query["pretty"] = pretty
2753
+ __headers = {"accept": "application/json"}
2754
+ return self.perform_request( # type: ignore[return-value]
2755
+ "GET",
2756
+ __path,
2757
+ params=__query,
2758
+ headers=__headers,
2759
+ endpoint_id="indices.get_migrate_reindex_status",
2760
+ path_parts=__path_parts,
2761
+ )
2762
+
2599
2763
  @_rewrite_parameters()
2600
2764
  def get_settings(
2601
2765
  self,
@@ -2629,7 +2793,7 @@ class IndicesClient(NamespacedClient):
2629
2793
  For data streams, it returns setting information for the stream's backing indices.</p>
2630
2794
 
2631
2795
 
2632
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-settings.html>`_
2796
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-settings>`_
2633
2797
 
2634
2798
  :param index: Comma-separated list of data streams, indices, and aliases used
2635
2799
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2721,7 +2885,7 @@ class IndicesClient(NamespacedClient):
2721
2885
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
2722
2886
 
2723
2887
 
2724
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template-v1.html>`_
2888
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-template>`_
2725
2889
 
2726
2890
  :param name: Comma-separated list of index template names used to limit the request.
2727
2891
  Wildcard (`*`) expressions are supported. To return all index templates,
@@ -2765,6 +2929,62 @@ class IndicesClient(NamespacedClient):
2765
2929
  path_parts=__path_parts,
2766
2930
  )
2767
2931
 
2932
+ @_rewrite_parameters(
2933
+ body_name="reindex",
2934
+ )
2935
+ @_stability_warning(Stability.EXPERIMENTAL)
2936
+ def migrate_reindex(
2937
+ self,
2938
+ *,
2939
+ reindex: t.Optional[t.Mapping[str, t.Any]] = None,
2940
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
2941
+ error_trace: t.Optional[bool] = None,
2942
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2943
+ human: t.Optional[bool] = None,
2944
+ pretty: t.Optional[bool] = None,
2945
+ ) -> ObjectApiResponse[t.Any]:
2946
+ """
2947
+ .. raw:: html
2948
+
2949
+ <p>Reindex legacy backing indices.</p>
2950
+ <p>Reindex all legacy backing indices for a data stream.
2951
+ This operation occurs in a persistent task.
2952
+ The persistent task ID is returned immediately and the reindexing work is completed in that task.</p>
2953
+
2954
+
2955
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-migration>`_
2956
+
2957
+ :param reindex:
2958
+ """
2959
+ if reindex is None and body is None:
2960
+ raise ValueError(
2961
+ "Empty value passed for parameters 'reindex' and 'body', one of them should be set."
2962
+ )
2963
+ elif reindex is not None and body is not None:
2964
+ raise ValueError("Cannot set both 'reindex' and 'body'")
2965
+ __path_parts: t.Dict[str, str] = {}
2966
+ __path = "/_migration/reindex"
2967
+ __query: t.Dict[str, t.Any] = {}
2968
+ if error_trace is not None:
2969
+ __query["error_trace"] = error_trace
2970
+ if filter_path is not None:
2971
+ __query["filter_path"] = filter_path
2972
+ if human is not None:
2973
+ __query["human"] = human
2974
+ if pretty is not None:
2975
+ __query["pretty"] = pretty
2976
+ __body = reindex if reindex is not None else body
2977
+ __headers = {"accept": "application/json", "content-type": "application/json"}
2978
+ return self.perform_request( # type: ignore[return-value]
2979
+ "POST",
2980
+ __path,
2981
+ params=__query,
2982
+ headers=__headers,
2983
+ body=__body,
2984
+ endpoint_id="indices.migrate_reindex",
2985
+ path_parts=__path_parts,
2986
+ )
2987
+
2768
2988
  @_rewrite_parameters()
2769
2989
  def migrate_to_data_stream(
2770
2990
  self,
@@ -2793,7 +3013,7 @@ class IndicesClient(NamespacedClient):
2793
3013
  The write index for the alias becomes the write index for the stream.</p>
2794
3014
 
2795
3015
 
2796
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
3016
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-migrate-to-data-stream>`_
2797
3017
 
2798
3018
  :param name: Name of the index alias to convert to a data stream.
2799
3019
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -2849,7 +3069,7 @@ class IndicesClient(NamespacedClient):
2849
3069
  Performs one or more data stream modification actions in a single atomic operation.</p>
2850
3070
 
2851
3071
 
2852
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
3072
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-modify-data-stream>`_
2853
3073
 
2854
3074
  :param actions: Actions to perform.
2855
3075
  """
@@ -2928,7 +3148,7 @@ class IndicesClient(NamespacedClient):
2928
3148
  <p>Because opening or closing an index allocates its shards, the <code>wait_for_active_shards</code> setting on index creation applies to the <code>_open</code> and <code>_close</code> index actions as well.</p>
2929
3149
 
2930
3150
 
2931
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-open-close.html>`_
3151
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-open>`_
2932
3152
 
2933
3153
  :param index: Comma-separated list of data streams, indices, and aliases used
2934
3154
  to limit the request. Supports wildcards (`*`). By default, you must explicitly
@@ -3014,7 +3234,7 @@ class IndicesClient(NamespacedClient):
3014
3234
  This will affect the lifecycle management of the data stream and interfere with the data stream size and retention.</p>
3015
3235
 
3016
3236
 
3017
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
3237
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-promote-data-stream>`_
3018
3238
 
3019
3239
  :param name: The name of the data stream
3020
3240
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -3080,7 +3300,7 @@ class IndicesClient(NamespacedClient):
3080
3300
  Adds a data stream or index to an alias.</p>
3081
3301
 
3082
3302
 
3083
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
3303
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-alias>`_
3084
3304
 
3085
3305
  :param index: Comma-separated list of data streams or indices to add. Supports
3086
3306
  wildcards (`*`). Wildcard patterns that match both data streams and indices
@@ -3155,7 +3375,7 @@ class IndicesClient(NamespacedClient):
3155
3375
  )
3156
3376
 
3157
3377
  @_rewrite_parameters(
3158
- body_fields=("data_retention", "downsampling"),
3378
+ body_fields=("data_retention", "downsampling", "enabled"),
3159
3379
  )
3160
3380
  def put_data_lifecycle(
3161
3381
  self,
@@ -3163,6 +3383,7 @@ class IndicesClient(NamespacedClient):
3163
3383
  name: t.Union[str, t.Sequence[str]],
3164
3384
  data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3165
3385
  downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3386
+ enabled: t.Optional[bool] = None,
3166
3387
  error_trace: t.Optional[bool] = None,
3167
3388
  expand_wildcards: t.Optional[
3168
3389
  t.Union[
@@ -3186,7 +3407,7 @@ class IndicesClient(NamespacedClient):
3186
3407
  Update the data stream lifecycle of the specified data streams.</p>
3187
3408
 
3188
3409
 
3189
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-put-lifecycle.html>`_
3410
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-data-lifecycle>`_
3190
3411
 
3191
3412
  :param name: Comma-separated list of data streams used to limit the request.
3192
3413
  Supports wildcards (`*`). To target all data streams use `*` or `_all`.
@@ -3194,9 +3415,11 @@ class IndicesClient(NamespacedClient):
3194
3415
  be stored at least for this time frame. Any time after this duration the
3195
3416
  document could be deleted. When empty, every document in this data stream
3196
3417
  will be stored indefinitely.
3197
- :param downsampling: If defined, every backing index will execute the configured
3198
- downsampling configuration after the backing index is not the data stream
3199
- write index anymore.
3418
+ :param downsampling: The downsampling configuration to execute for the managed
3419
+ backing index after rollover.
3420
+ :param enabled: If defined, it turns data stream lifecycle on/off (`true`/`false`)
3421
+ for this data stream. A data stream lifecycle that's disabled (enabled: `false`)
3422
+ will have no effect on the data stream.
3200
3423
  :param expand_wildcards: Type of data stream that wildcard patterns can match.
3201
3424
  Supports comma-separated values, such as `open,hidden`. Valid values are:
3202
3425
  `all`, `hidden`, `open`, `closed`, `none`.
@@ -3231,6 +3454,8 @@ class IndicesClient(NamespacedClient):
3231
3454
  __body["data_retention"] = data_retention
3232
3455
  if downsampling is not None:
3233
3456
  __body["downsampling"] = downsampling
3457
+ if enabled is not None:
3458
+ __body["enabled"] = enabled
3234
3459
  if not __body:
3235
3460
  __body = None # type: ignore[assignment]
3236
3461
  __headers = {"accept": "application/json"}
@@ -3310,7 +3535,7 @@ class IndicesClient(NamespacedClient):
3310
3535
  If an entry already exists with the same key, then it is overwritten by the new definition.</p>
3311
3536
 
3312
3537
 
3313
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-template.html>`_
3538
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-index-template>`_
3314
3539
 
3315
3540
  :param name: Index or template name
3316
3541
  :param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
@@ -3493,7 +3718,7 @@ class IndicesClient(NamespacedClient):
3493
3718
  Instead, add an alias field to create an alternate field name.</p>
3494
3719
 
3495
3720
 
3496
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-mapping.html>`_
3721
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-mapping>`_
3497
3722
 
3498
3723
  :param index: A comma-separated list of index names the mapping should be added
3499
3724
  to (supports wildcards); use `_all` or omit to add the mapping on all indices.
@@ -3617,6 +3842,7 @@ class IndicesClient(NamespacedClient):
3617
3842
  master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3618
3843
  preserve_existing: t.Optional[bool] = None,
3619
3844
  pretty: t.Optional[bool] = None,
3845
+ reopen: t.Optional[bool] = None,
3620
3846
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3621
3847
  ) -> ObjectApiResponse[t.Any]:
3622
3848
  """
@@ -3638,7 +3864,7 @@ class IndicesClient(NamespacedClient):
3638
3864
  To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.</p>
3639
3865
 
3640
3866
 
3641
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-update-settings.html>`_
3867
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-settings>`_
3642
3868
 
3643
3869
  :param settings:
3644
3870
  :param index: Comma-separated list of data streams, indices, and aliases used
@@ -3659,6 +3885,9 @@ class IndicesClient(NamespacedClient):
3659
3885
  no response is received before the timeout expires, the request fails and
3660
3886
  returns an error.
3661
3887
  :param preserve_existing: If `true`, existing index settings remain unchanged.
3888
+ :param reopen: Whether to close and reopen the index to apply non-dynamic settings.
3889
+ If set to `true` the indices to which the settings are being applied will
3890
+ be closed temporarily and then reopened in order to apply the changes.
3662
3891
  :param timeout: Period to wait for a response. If no response is received before
3663
3892
  the timeout expires, the request fails and returns an error.
3664
3893
  """
@@ -3696,6 +3925,8 @@ class IndicesClient(NamespacedClient):
3696
3925
  __query["preserve_existing"] = preserve_existing
3697
3926
  if pretty is not None:
3698
3927
  __query["pretty"] = pretty
3928
+ if reopen is not None:
3929
+ __query["reopen"] = reopen
3699
3930
  if timeout is not None:
3700
3931
  __query["timeout"] = timeout
3701
3932
  __body = settings if settings is not None else body
@@ -3759,11 +3990,11 @@ class IndicesClient(NamespacedClient):
3759
3990
  NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.</p>
3760
3991
 
3761
3992
 
3762
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-templates-v1.html>`_
3993
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-template>`_
3763
3994
 
3764
3995
  :param name: The name of the template
3765
3996
  :param aliases: Aliases for the index.
3766
- :param cause:
3997
+ :param cause: User defined reason for creating/updating the index template
3767
3998
  :param create: If true, this request cannot replace or update existing index
3768
3999
  templates.
3769
4000
  :param index_patterns: Array of wildcard expressions used to match the names
@@ -3861,7 +4092,7 @@ class IndicesClient(NamespacedClient):
3861
4092
  This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.</p>
3862
4093
 
3863
4094
 
3864
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-recovery.html>`_
4095
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-recovery>`_
3865
4096
 
3866
4097
  :param index: Comma-separated list of data streams, indices, and aliases used
3867
4098
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3935,7 +4166,7 @@ class IndicesClient(NamespacedClient):
3935
4166
  This option ensures the indexing operation waits for a periodic refresh before running the search.</p>
3936
4167
 
3937
4168
 
3938
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-refresh.html>`_
4169
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-refresh>`_
3939
4170
 
3940
4171
  :param index: Comma-separated list of data streams, indices, and aliases used
3941
4172
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -4001,6 +4232,7 @@ class IndicesClient(NamespacedClient):
4001
4232
  human: t.Optional[bool] = None,
4002
4233
  ignore_unavailable: t.Optional[bool] = None,
4003
4234
  pretty: t.Optional[bool] = None,
4235
+ resource: t.Optional[str] = None,
4004
4236
  ) -> ObjectApiResponse[t.Any]:
4005
4237
  """
4006
4238
  .. raw:: html
@@ -4018,7 +4250,7 @@ class IndicesClient(NamespacedClient):
4018
4250
  This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.</p>
4019
4251
 
4020
4252
 
4021
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-reload-analyzers.html>`_
4253
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-reload-search-analyzers>`_
4022
4254
 
4023
4255
  :param index: A comma-separated list of index names to reload analyzers for
4024
4256
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
@@ -4028,6 +4260,7 @@ class IndicesClient(NamespacedClient):
4028
4260
  that are open, closed or both.
4029
4261
  :param ignore_unavailable: Whether specified concrete indices should be ignored
4030
4262
  when unavailable (missing or closed)
4263
+ :param resource: Changed resource to reload analyzers from if applicable
4031
4264
  """
4032
4265
  if index in SKIP_IN_PATH:
4033
4266
  raise ValueError("Empty value passed for parameter 'index'")
@@ -4048,6 +4281,8 @@ class IndicesClient(NamespacedClient):
4048
4281
  __query["ignore_unavailable"] = ignore_unavailable
4049
4282
  if pretty is not None:
4050
4283
  __query["pretty"] = pretty
4284
+ if resource is not None:
4285
+ __query["resource"] = resource
4051
4286
  __headers = {"accept": "application/json"}
4052
4287
  return self.perform_request( # type: ignore[return-value]
4053
4288
  "POST",
@@ -4062,7 +4297,7 @@ class IndicesClient(NamespacedClient):
4062
4297
  def resolve_cluster(
4063
4298
  self,
4064
4299
  *,
4065
- name: t.Union[str, t.Sequence[str]],
4300
+ name: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4066
4301
  allow_no_indices: t.Optional[bool] = None,
4067
4302
  error_trace: t.Optional[bool] = None,
4068
4303
  expand_wildcards: t.Optional[
@@ -4078,19 +4313,20 @@ class IndicesClient(NamespacedClient):
4078
4313
  ignore_throttled: t.Optional[bool] = None,
4079
4314
  ignore_unavailable: t.Optional[bool] = None,
4080
4315
  pretty: t.Optional[bool] = None,
4316
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4081
4317
  ) -> ObjectApiResponse[t.Any]:
4082
4318
  """
4083
4319
  .. raw:: html
4084
4320
 
4085
- <p>Resolve the cluster.
4086
- Resolve the specified index expressions to return information about each cluster, including the local cluster, if included.
4087
- Multiple patterns and remote clusters are supported.</p>
4321
+ <p>Resolve the cluster.</p>
4322
+ <p>Resolve the specified index expressions to return information about each cluster, including the local &quot;querying&quot; cluster, if included.
4323
+ If no index expression is provided, the API will return information about all the remote clusters that are configured on the querying cluster.</p>
4088
4324
  <p>This endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search.</p>
4089
4325
  <p>You use the same index expression with this endpoint as you would for cross-cluster search.
4090
4326
  Index and cluster exclusions are also supported with this endpoint.</p>
4091
4327
  <p>For each cluster in the index expression, information is returned about:</p>
4092
4328
  <ul>
4093
- <li>Whether the querying (&quot;local&quot;) cluster is currently connected to each remote cluster in the index expression scope.</li>
4329
+ <li>Whether the querying (&quot;local&quot;) cluster is currently connected to each remote cluster specified in the index expression. Note that this endpoint actively attempts to contact the remote clusters, unlike the <code>remote/info</code> endpoint.</li>
4094
4330
  <li>Whether each remote cluster is configured with <code>skip_unavailable</code> as <code>true</code> or <code>false</code>.</li>
4095
4331
  <li>Whether there are any indices, aliases, or data streams on that cluster that match the index expression.</li>
4096
4332
  <li>Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index).</li>
@@ -4098,7 +4334,13 @@ class IndicesClient(NamespacedClient):
4098
4334
  </ul>
4099
4335
  <p>For example, <code>GET /_resolve/cluster/my-index-*,cluster*:my-index-*</code> returns information about the local cluster and all remotely configured clusters that start with the alias <code>cluster*</code>.
4100
4336
  Each cluster returns information about whether it has any indices, aliases or data streams that match <code>my-index-*</code>.</p>
4101
- <p><strong>Advantages of using this endpoint before a cross-cluster search</strong></p>
4337
+ <h2>Note on backwards compatibility</h2>
4338
+ <p>The ability to query without an index expression was added in version 8.18, so when
4339
+ querying remote clusters older than that, the local cluster will send the index
4340
+ expression <code>dummy*</code> to those remote clusters. Thus, if an errors occur, you may see a reference
4341
+ to that index expression even though you didn't request it. If it causes a problem, you can
4342
+ instead include an index expression like <code>*:*</code> to bypass the issue.</p>
4343
+ <h2>Advantages of using this endpoint before a cross-cluster search</h2>
4102
4344
  <p>You may want to exclude a cluster or index from a search when:</p>
4103
4345
  <ul>
4104
4346
  <li>A remote cluster is not currently connected and is configured with <code>skip_unavailable=false</code>. Running a cross-cluster search under those conditions will cause the entire search to fail.</li>
@@ -4106,31 +4348,60 @@ class IndicesClient(NamespacedClient):
4106
4348
  <li>The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the &quot;error&quot; field in the <code>_resolve/cluster</code> response will be present. (This is also where security/permission errors will be shown.)</li>
4107
4349
  <li>A remote cluster is an older version that does not support the feature you want to use in your search.</li>
4108
4350
  </ul>
4109
-
4110
-
4111
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-cluster-api.html>`_
4112
-
4113
- :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
4114
- and data streams to resolve. Resources on remote clusters can be specified
4115
- using the `<cluster>`:`<name>` syntax.
4351
+ <h2>Test availability of remote clusters</h2>
4352
+ <p>The <code>remote/info</code> endpoint is commonly used to test whether the &quot;local&quot; cluster (the cluster being queried) is connected to its remote clusters, but it does not necessarily reflect whether the remote cluster is available or not.
4353
+ The remote cluster may be available, while the local cluster is not currently connected to it.</p>
4354
+ <p>You can use the <code>_resolve/cluster</code> API to attempt to reconnect to remote clusters.
4355
+ For example with <code>GET _resolve/cluster</code> or <code>GET _resolve/cluster/*:*</code>.
4356
+ The <code>connected</code> field in the response will indicate whether it was successful.
4357
+ If a connection was (re-)established, this will also cause the <code>remote/info</code> endpoint to now indicate a connected status.</p>
4358
+
4359
+
4360
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-resolve-cluster>`_
4361
+
4362
+ :param name: A comma-separated list of names or index patterns for the indices,
4363
+ aliases, and data streams to resolve. Resources on remote clusters can be
4364
+ specified using the `<cluster>`:`<name>` syntax. Index and cluster exclusions
4365
+ (e.g., `-cluster1:*`) are also supported. If no index expression is specified,
4366
+ information about all remote clusters configured on the local cluster is
4367
+ returned without doing any index matching
4116
4368
  :param allow_no_indices: If false, the request returns an error if any wildcard
4117
- expression, index alias, or _all value targets only missing or closed indices.
4369
+ expression, index alias, or `_all` value targets only missing or closed indices.
4118
4370
  This behavior applies even if the request targets other open indices. For
4119
- example, a request targeting foo*,bar* returns an error if an index starts
4120
- with foo but no index starts with bar.
4371
+ example, a request targeting `foo*,bar*` returns an error if an index starts
4372
+ with `foo` but no index starts with `bar`. NOTE: This option is only supported
4373
+ when specifying an index expression. You will get an error if you specify
4374
+ index options to the `_resolve/cluster` API endpoint that takes no index
4375
+ expression.
4121
4376
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
4122
4377
  request can target data streams, this argument determines whether wildcard
4123
4378
  expressions match hidden data streams. Supports comma-separated values, such
4124
4379
  as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
4125
- :param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
4126
- when frozen. Defaults to false.
4380
+ NOTE: This option is only supported when specifying an index expression.
4381
+ You will get an error if you specify index options to the `_resolve/cluster`
4382
+ API endpoint that takes no index expression.
4383
+ :param ignore_throttled: If true, concrete, expanded, or aliased indices are
4384
+ ignored when frozen. NOTE: This option is only supported when specifying
4385
+ an index expression. You will get an error if you specify index options to
4386
+ the `_resolve/cluster` API endpoint that takes no index expression.
4127
4387
  :param ignore_unavailable: If false, the request returns an error if it targets
4128
- a missing or closed index. Defaults to false.
4388
+ a missing or closed index. NOTE: This option is only supported when specifying
4389
+ an index expression. You will get an error if you specify index options to
4390
+ the `_resolve/cluster` API endpoint that takes no index expression.
4391
+ :param timeout: The maximum time to wait for remote clusters to respond. If a
4392
+ remote cluster does not respond within this timeout period, the API response
4393
+ will show the cluster as not connected and include an error message that
4394
+ the request timed out. The default timeout is unset and the query can take
4395
+ as long as the networking layer is configured to wait for remote clusters
4396
+ that are not responding (typically 30 seconds).
4129
4397
  """
4130
- if name in SKIP_IN_PATH:
4131
- raise ValueError("Empty value passed for parameter 'name'")
4132
- __path_parts: t.Dict[str, str] = {"name": _quote(name)}
4133
- __path = f'/_resolve/cluster/{__path_parts["name"]}'
4398
+ __path_parts: t.Dict[str, str]
4399
+ if name not in SKIP_IN_PATH:
4400
+ __path_parts = {"name": _quote(name)}
4401
+ __path = f'/_resolve/cluster/{__path_parts["name"]}'
4402
+ else:
4403
+ __path_parts = {}
4404
+ __path = "/_resolve/cluster"
4134
4405
  __query: t.Dict[str, t.Any] = {}
4135
4406
  if allow_no_indices is not None:
4136
4407
  __query["allow_no_indices"] = allow_no_indices
@@ -4148,6 +4419,8 @@ class IndicesClient(NamespacedClient):
4148
4419
  __query["ignore_unavailable"] = ignore_unavailable
4149
4420
  if pretty is not None:
4150
4421
  __query["pretty"] = pretty
4422
+ if timeout is not None:
4423
+ __query["timeout"] = timeout
4151
4424
  __headers = {"accept": "application/json"}
4152
4425
  return self.perform_request( # type: ignore[return-value]
4153
4426
  "GET",
@@ -4186,7 +4459,7 @@ class IndicesClient(NamespacedClient):
4186
4459
  Multiple patterns and remote clusters are supported.</p>
4187
4460
 
4188
4461
 
4189
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-index-api.html>`_
4462
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-resolve-index>`_
4190
4463
 
4191
4464
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
4192
4465
  and data streams to resolve. Resources on remote clusters can be specified
@@ -4246,6 +4519,7 @@ class IndicesClient(NamespacedClient):
4246
4519
  error_trace: t.Optional[bool] = None,
4247
4520
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4248
4521
  human: t.Optional[bool] = None,
4522
+ lazy: t.Optional[bool] = None,
4249
4523
  mappings: t.Optional[t.Mapping[str, t.Any]] = None,
4250
4524
  master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4251
4525
  pretty: t.Optional[bool] = None,
@@ -4287,7 +4561,7 @@ class IndicesClient(NamespacedClient):
4287
4561
  If you roll over the alias on May 7, 2099, the new index's name is <code>my-index-2099.05.07-000002</code>.</p>
4288
4562
 
4289
4563
 
4290
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-rollover-index.html>`_
4564
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-rollover>`_
4291
4565
 
4292
4566
  :param alias: Name of the data stream or index alias to roll over.
4293
4567
  :param new_index: Name of the index to create. Supports date math. Data streams
@@ -4302,6 +4576,9 @@ class IndicesClient(NamespacedClient):
4302
4576
  conditions are satisfied.
4303
4577
  :param dry_run: If `true`, checks whether the current index satisfies the specified
4304
4578
  conditions but does not perform a rollover.
4579
+ :param lazy: If set to true, the rollover action will only mark a data stream
4580
+ to signal that it needs to be rolled over at the next write. Only allowed
4581
+ on data streams.
4305
4582
  :param mappings: Mapping for fields in the index. If specified, this mapping
4306
4583
  can include field names, field data types, and mapping paramaters.
4307
4584
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -4336,6 +4613,8 @@ class IndicesClient(NamespacedClient):
4336
4613
  __query["filter_path"] = filter_path
4337
4614
  if human is not None:
4338
4615
  __query["human"] = human
4616
+ if lazy is not None:
4617
+ __query["lazy"] = lazy
4339
4618
  if master_timeout is not None:
4340
4619
  __query["master_timeout"] = master_timeout
4341
4620
  if pretty is not None:
@@ -4387,7 +4666,6 @@ class IndicesClient(NamespacedClient):
4387
4666
  human: t.Optional[bool] = None,
4388
4667
  ignore_unavailable: t.Optional[bool] = None,
4389
4668
  pretty: t.Optional[bool] = None,
4390
- verbose: t.Optional[bool] = None,
4391
4669
  ) -> ObjectApiResponse[t.Any]:
4392
4670
  """
4393
4671
  .. raw:: html
@@ -4397,7 +4675,7 @@ class IndicesClient(NamespacedClient):
4397
4675
  For data streams, the API returns information about the stream's backing indices.</p>
4398
4676
 
4399
4677
 
4400
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-segments.html>`_
4678
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-segments>`_
4401
4679
 
4402
4680
  :param index: Comma-separated list of data streams, indices, and aliases used
4403
4681
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -4411,7 +4689,6 @@ class IndicesClient(NamespacedClient):
4411
4689
  as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
4412
4690
  :param ignore_unavailable: If `false`, the request returns an error if it targets
4413
4691
  a missing or closed index.
4414
- :param verbose: If `true`, the request returns a verbose response.
4415
4692
  """
4416
4693
  __path_parts: t.Dict[str, str]
4417
4694
  if index not in SKIP_IN_PATH:
@@ -4435,8 +4712,6 @@ class IndicesClient(NamespacedClient):
4435
4712
  __query["ignore_unavailable"] = ignore_unavailable
4436
4713
  if pretty is not None:
4437
4714
  __query["pretty"] = pretty
4438
- if verbose is not None:
4439
- __query["verbose"] = verbose
4440
4715
  __headers = {"accept": "application/json"}
4441
4716
  return self.perform_request( # type: ignore[return-value]
4442
4717
  "GET",
@@ -4489,7 +4764,7 @@ class IndicesClient(NamespacedClient):
4489
4764
  <p>By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.</p>
4490
4765
 
4491
4766
 
4492
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shards-stores.html>`_
4767
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-shard-stores>`_
4493
4768
 
4494
4769
  :param index: List of data streams, indices, and aliases used to limit the request.
4495
4770
  :param allow_no_indices: If false, the request returns an error if any wildcard
@@ -4591,7 +4866,7 @@ class IndicesClient(NamespacedClient):
4591
4866
  </ul>
4592
4867
 
4593
4868
 
4594
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shrink-index.html>`_
4869
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-shrink>`_
4595
4870
 
4596
4871
  :param index: Name of the source index to shrink.
4597
4872
  :param target: Name of the target index to create.
@@ -4656,6 +4931,8 @@ class IndicesClient(NamespacedClient):
4656
4931
  self,
4657
4932
  *,
4658
4933
  name: str,
4934
+ cause: t.Optional[str] = None,
4935
+ create: t.Optional[bool] = None,
4659
4936
  error_trace: t.Optional[bool] = None,
4660
4937
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4661
4938
  human: t.Optional[bool] = None,
@@ -4670,9 +4947,13 @@ class IndicesClient(NamespacedClient):
4670
4947
  Get the index configuration that would be applied to the specified index from an existing index template.</p>
4671
4948
 
4672
4949
 
4673
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-index.html>`_
4950
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-simulate-index-template>`_
4674
4951
 
4675
4952
  :param name: Name of the index to simulate
4953
+ :param cause: User defined reason for dry-run creating the new template for simulation
4954
+ purposes
4955
+ :param create: Whether the index template we optionally defined in the body should
4956
+ only be dry-run added if new or can also replace an existing one
4676
4957
  :param include_defaults: If true, returns all relevant default configurations
4677
4958
  for the index template.
4678
4959
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -4684,6 +4965,10 @@ class IndicesClient(NamespacedClient):
4684
4965
  __path_parts: t.Dict[str, str] = {"name": _quote(name)}
4685
4966
  __path = f'/_index_template/_simulate_index/{__path_parts["name"]}'
4686
4967
  __query: t.Dict[str, t.Any] = {}
4968
+ if cause is not None:
4969
+ __query["cause"] = cause
4970
+ if create is not None:
4971
+ __query["create"] = create
4687
4972
  if error_trace is not None:
4688
4973
  __query["error_trace"] = error_trace
4689
4974
  if filter_path is not None:
@@ -4726,6 +5011,7 @@ class IndicesClient(NamespacedClient):
4726
5011
  *,
4727
5012
  name: t.Optional[str] = None,
4728
5013
  allow_auto_create: t.Optional[bool] = None,
5014
+ cause: t.Optional[str] = None,
4729
5015
  composed_of: t.Optional[t.Sequence[str]] = None,
4730
5016
  create: t.Optional[bool] = None,
4731
5017
  data_stream: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -4751,7 +5037,7 @@ class IndicesClient(NamespacedClient):
4751
5037
  Get the index configuration that would be applied by a particular index template.</p>
4752
5038
 
4753
5039
 
4754
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-template.html>`_
5040
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-simulate-template>`_
4755
5041
 
4756
5042
  :param name: Name of the index template to simulate. To test a template configuration
4757
5043
  before you add it to the cluster, omit this parameter and specify the template
@@ -4762,6 +5048,8 @@ class IndicesClient(NamespacedClient):
4762
5048
  via `actions.auto_create_index`. If set to `false`, then indices or data
4763
5049
  streams matching the template must always be explicitly created, and may
4764
5050
  never be automatically created.
5051
+ :param cause: User defined reason for dry-run creating the new template for simulation
5052
+ purposes
4765
5053
  :param composed_of: An ordered list of component template names. Component templates
4766
5054
  are merged in the order specified, meaning that the last component template
4767
5055
  specified has the highest precedence.
@@ -4806,6 +5094,8 @@ class IndicesClient(NamespacedClient):
4806
5094
  __path = "/_index_template/_simulate"
4807
5095
  __query: t.Dict[str, t.Any] = {}
4808
5096
  __body: t.Dict[str, t.Any] = body if body is not None else {}
5097
+ if cause is not None:
5098
+ __query["cause"] = cause
4809
5099
  if create is not None:
4810
5100
  __query["create"] = create
4811
5101
  if error_trace is not None:
@@ -4919,7 +5209,7 @@ class IndicesClient(NamespacedClient):
4919
5209
  </ul>
4920
5210
 
4921
5211
 
4922
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-split-index.html>`_
5212
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-split>`_
4923
5213
 
4924
5214
  :param index: Name of the source index to split.
4925
5215
  :param target: Name of the target index to create.
@@ -5021,7 +5311,7 @@ class IndicesClient(NamespacedClient):
5021
5311
  Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.</p>
5022
5312
 
5023
5313
 
5024
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-stats.html>`_
5314
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-stats>`_
5025
5315
 
5026
5316
  :param index: A comma-separated list of index names; use `_all` or empty string
5027
5317
  to perform the operation on all indices
@@ -5098,92 +5388,6 @@ class IndicesClient(NamespacedClient):
5098
5388
  path_parts=__path_parts,
5099
5389
  )
5100
5390
 
5101
- @_rewrite_parameters()
5102
- def unfreeze(
5103
- self,
5104
- *,
5105
- index: str,
5106
- allow_no_indices: t.Optional[bool] = None,
5107
- error_trace: t.Optional[bool] = None,
5108
- expand_wildcards: t.Optional[
5109
- t.Union[
5110
- t.Sequence[
5111
- t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
5112
- ],
5113
- t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
5114
- ]
5115
- ] = None,
5116
- filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
5117
- human: t.Optional[bool] = None,
5118
- ignore_unavailable: t.Optional[bool] = None,
5119
- master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
5120
- pretty: t.Optional[bool] = None,
5121
- timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
5122
- wait_for_active_shards: t.Optional[str] = None,
5123
- ) -> ObjectApiResponse[t.Any]:
5124
- """
5125
- .. raw:: html
5126
-
5127
- <p>Unfreeze an index.
5128
- When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.</p>
5129
-
5130
-
5131
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/unfreeze-index-api.html>`_
5132
-
5133
- :param index: Identifier for the index.
5134
- :param allow_no_indices: If `false`, the request returns an error if any wildcard
5135
- expression, index alias, or `_all` value targets only missing or closed indices.
5136
- This behavior applies even if the request targets other open indices.
5137
- :param expand_wildcards: Type of index that wildcard patterns can match. If the
5138
- request can target data streams, this argument determines whether wildcard
5139
- expressions match hidden data streams. Supports comma-separated values, such
5140
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
5141
- :param ignore_unavailable: If `false`, the request returns an error if it targets
5142
- a missing or closed index.
5143
- :param master_timeout: Period to wait for a connection to the master node. If
5144
- no response is received before the timeout expires, the request fails and
5145
- returns an error.
5146
- :param timeout: Period to wait for a response. If no response is received before
5147
- the timeout expires, the request fails and returns an error.
5148
- :param wait_for_active_shards: The number of shard copies that must be active
5149
- before proceeding with the operation. Set to `all` or any positive integer
5150
- up to the total number of shards in the index (`number_of_replicas+1`).
5151
- """
5152
- if index in SKIP_IN_PATH:
5153
- raise ValueError("Empty value passed for parameter 'index'")
5154
- __path_parts: t.Dict[str, str] = {"index": _quote(index)}
5155
- __path = f'/{__path_parts["index"]}/_unfreeze'
5156
- __query: t.Dict[str, t.Any] = {}
5157
- if allow_no_indices is not None:
5158
- __query["allow_no_indices"] = allow_no_indices
5159
- if error_trace is not None:
5160
- __query["error_trace"] = error_trace
5161
- if expand_wildcards is not None:
5162
- __query["expand_wildcards"] = expand_wildcards
5163
- if filter_path is not None:
5164
- __query["filter_path"] = filter_path
5165
- if human is not None:
5166
- __query["human"] = human
5167
- if ignore_unavailable is not None:
5168
- __query["ignore_unavailable"] = ignore_unavailable
5169
- if master_timeout is not None:
5170
- __query["master_timeout"] = master_timeout
5171
- if pretty is not None:
5172
- __query["pretty"] = pretty
5173
- if timeout is not None:
5174
- __query["timeout"] = timeout
5175
- if wait_for_active_shards is not None:
5176
- __query["wait_for_active_shards"] = wait_for_active_shards
5177
- __headers = {"accept": "application/json"}
5178
- return self.perform_request( # type: ignore[return-value]
5179
- "POST",
5180
- __path,
5181
- params=__query,
5182
- headers=__headers,
5183
- endpoint_id="indices.unfreeze",
5184
- path_parts=__path_parts,
5185
- )
5186
-
5187
5391
  @_rewrite_parameters(
5188
5392
  body_fields=("actions",),
5189
5393
  )
@@ -5206,7 +5410,7 @@ class IndicesClient(NamespacedClient):
5206
5410
  Adds a data stream or index to an alias.</p>
5207
5411
 
5208
5412
 
5209
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
5413
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-update-aliases>`_
5210
5414
 
5211
5415
  :param actions: Actions to perform.
5212
5416
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -5285,7 +5489,7 @@ class IndicesClient(NamespacedClient):
5285
5489
  Validates a query without running it.</p>
5286
5490
 
5287
5491
 
5288
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-validate.html>`_
5492
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-validate-query>`_
5289
5493
 
5290
5494
  :param index: Comma-separated list of data streams, indices, and aliases to search.
5291
5495
  Supports wildcards (`*`). To search all data streams or indices, omit this