elasticsearch 8.15.1__py3-none-any.whl → 8.17.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 (94) hide show
  1. elasticsearch/_async/client/__init__.py +237 -120
  2. elasticsearch/_async/client/async_search.py +33 -43
  3. elasticsearch/_async/client/autoscaling.py +59 -11
  4. elasticsearch/_async/client/cat.py +75 -66
  5. elasticsearch/_async/client/ccr.py +85 -35
  6. elasticsearch/_async/client/cluster.py +165 -70
  7. elasticsearch/_async/client/connector.py +112 -51
  8. elasticsearch/_async/client/dangling_indices.py +27 -12
  9. elasticsearch/_async/client/enrich.py +11 -11
  10. elasticsearch/_async/client/eql.py +13 -11
  11. elasticsearch/_async/client/esql.py +44 -5
  12. elasticsearch/_async/client/features.py +29 -6
  13. elasticsearch/_async/client/fleet.py +10 -2
  14. elasticsearch/_async/client/graph.py +9 -3
  15. elasticsearch/_async/client/ilm.py +74 -35
  16. elasticsearch/_async/client/indices.py +422 -152
  17. elasticsearch/_async/client/inference.py +4 -4
  18. elasticsearch/_async/client/ingest.py +47 -26
  19. elasticsearch/_async/client/license.py +38 -22
  20. elasticsearch/_async/client/logstash.py +3 -3
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +346 -291
  23. elasticsearch/_async/client/monitoring.py +1 -1
  24. elasticsearch/_async/client/nodes.py +43 -21
  25. elasticsearch/_async/client/query_rules.py +69 -15
  26. elasticsearch/_async/client/rollup.py +23 -9
  27. elasticsearch/_async/client/search_application.py +35 -16
  28. elasticsearch/_async/client/searchable_snapshots.py +13 -5
  29. elasticsearch/_async/client/security.py +378 -180
  30. elasticsearch/_async/client/slm.py +9 -9
  31. elasticsearch/_async/client/snapshot.py +97 -12
  32. elasticsearch/_async/client/sql.py +21 -16
  33. elasticsearch/_async/client/ssl.py +18 -3
  34. elasticsearch/_async/client/synonyms.py +17 -14
  35. elasticsearch/_async/client/tasks.py +19 -9
  36. elasticsearch/_async/client/text_structure.py +2 -2
  37. elasticsearch/_async/client/transform.py +78 -72
  38. elasticsearch/_async/client/utils.py +4 -0
  39. elasticsearch/_async/client/watcher.py +11 -11
  40. elasticsearch/_async/client/xpack.py +5 -3
  41. elasticsearch/_async/helpers.py +19 -10
  42. elasticsearch/_otel.py +2 -2
  43. elasticsearch/_sync/client/__init__.py +237 -120
  44. elasticsearch/_sync/client/async_search.py +33 -43
  45. elasticsearch/_sync/client/autoscaling.py +59 -11
  46. elasticsearch/_sync/client/cat.py +75 -66
  47. elasticsearch/_sync/client/ccr.py +85 -35
  48. elasticsearch/_sync/client/cluster.py +165 -70
  49. elasticsearch/_sync/client/connector.py +112 -51
  50. elasticsearch/_sync/client/dangling_indices.py +27 -12
  51. elasticsearch/_sync/client/enrich.py +11 -11
  52. elasticsearch/_sync/client/eql.py +13 -11
  53. elasticsearch/_sync/client/esql.py +44 -5
  54. elasticsearch/_sync/client/features.py +29 -6
  55. elasticsearch/_sync/client/fleet.py +10 -2
  56. elasticsearch/_sync/client/graph.py +9 -3
  57. elasticsearch/_sync/client/ilm.py +74 -35
  58. elasticsearch/_sync/client/indices.py +422 -152
  59. elasticsearch/_sync/client/inference.py +4 -4
  60. elasticsearch/_sync/client/ingest.py +47 -26
  61. elasticsearch/_sync/client/license.py +38 -22
  62. elasticsearch/_sync/client/logstash.py +3 -3
  63. elasticsearch/_sync/client/migration.py +3 -3
  64. elasticsearch/_sync/client/ml.py +346 -291
  65. elasticsearch/_sync/client/monitoring.py +1 -1
  66. elasticsearch/_sync/client/nodes.py +43 -21
  67. elasticsearch/_sync/client/query_rules.py +69 -15
  68. elasticsearch/_sync/client/rollup.py +23 -9
  69. elasticsearch/_sync/client/search_application.py +35 -16
  70. elasticsearch/_sync/client/searchable_snapshots.py +13 -5
  71. elasticsearch/_sync/client/security.py +378 -180
  72. elasticsearch/_sync/client/slm.py +9 -9
  73. elasticsearch/_sync/client/snapshot.py +97 -12
  74. elasticsearch/_sync/client/sql.py +21 -16
  75. elasticsearch/_sync/client/ssl.py +18 -3
  76. elasticsearch/_sync/client/synonyms.py +17 -14
  77. elasticsearch/_sync/client/tasks.py +19 -9
  78. elasticsearch/_sync/client/text_structure.py +2 -2
  79. elasticsearch/_sync/client/transform.py +78 -72
  80. elasticsearch/_sync/client/utils.py +40 -0
  81. elasticsearch/_sync/client/watcher.py +11 -11
  82. elasticsearch/_sync/client/xpack.py +5 -3
  83. elasticsearch/_version.py +1 -1
  84. elasticsearch/exceptions.py +4 -0
  85. elasticsearch/helpers/actions.py +19 -10
  86. elasticsearch/helpers/errors.py +12 -4
  87. elasticsearch/helpers/vectorstore/_async/strategies.py +30 -9
  88. elasticsearch/helpers/vectorstore/_sync/strategies.py +30 -9
  89. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/METADATA +4 -3
  90. elasticsearch-8.17.0.dist-info/RECORD +117 -0
  91. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/WHEEL +1 -1
  92. elasticsearch-8.15.1.dist-info/RECORD +0 -117
  93. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/licenses/LICENSE +0 -0
  94. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/licenses/NOTICE +0 -0
@@ -20,7 +20,13 @@ import typing as t
20
20
  from elastic_transport import HeadApiResponse, ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
23
+ from .utils import (
24
+ SKIP_IN_PATH,
25
+ Stability,
26
+ _quote,
27
+ _rewrite_parameters,
28
+ _stability_warning,
29
+ )
24
30
 
25
31
 
26
32
  class IndicesClient(NamespacedClient):
@@ -49,9 +55,10 @@ class IndicesClient(NamespacedClient):
49
55
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
50
56
  ) -> ObjectApiResponse[t.Any]:
51
57
  """
52
- Adds a block to an index.
58
+ Add an index block. Limits the operations allowed on an index by blocking specific
59
+ operation types.
53
60
 
54
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-modules-blocks.html>`_
61
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-modules-blocks.html>`_
55
62
 
56
63
  :param index: A comma separated list of indices to add a block to
57
64
  :param block: The block to add (one of read, write, read_only or metadata)
@@ -136,9 +143,10 @@ class IndicesClient(NamespacedClient):
136
143
  body: t.Optional[t.Dict[str, t.Any]] = None,
137
144
  ) -> ObjectApiResponse[t.Any]:
138
145
  """
139
- Performs analysis on a text string and returns the resulting tokens.
146
+ Get tokens from text analysis. The analyze API performs [analysis](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html)
147
+ on a text string and returns the resulting tokens.
140
148
 
141
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-analyze.html>`_
149
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-analyze.html>`_
142
150
 
143
151
  :param index: Index used to derive the analyzer. If specified, the `analyzer`
144
152
  or field parameter overrides this value. If no index is specified or the
@@ -237,10 +245,10 @@ class IndicesClient(NamespacedClient):
237
245
  request: t.Optional[bool] = None,
238
246
  ) -> ObjectApiResponse[t.Any]:
239
247
  """
240
- Clears the caches of one or more indices. For data streams, the API clears the
241
- caches of the streams backing indices.
248
+ Clear the cache. Clear the cache of one or more indices. For data streams, the
249
+ API clears the caches of the stream's backing indices.
242
250
 
243
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-clearcache.html>`_
251
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clearcache.html>`_
244
252
 
245
253
  :param index: Comma-separated list of data streams, indices, and aliases used
246
254
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -323,9 +331,28 @@ class IndicesClient(NamespacedClient):
323
331
  body: t.Optional[t.Dict[str, t.Any]] = None,
324
332
  ) -> ObjectApiResponse[t.Any]:
325
333
  """
326
- Clones an existing index.
327
-
328
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-clone-index.html>`_
334
+ Clone an index. Clone an existing index into a new index. Each original primary
335
+ shard is cloned into a new primary shard in the new index. IMPORTANT: Elasticsearch
336
+ does not apply index templates to the resulting index. The API also does not
337
+ copy index metadata from the original index. Index metadata includes aliases,
338
+ index lifecycle management phase definitions, and cross-cluster replication (CCR)
339
+ follower information. For example, if you clone a CCR follower index, the resulting
340
+ clone will not be a follower index. The clone API copies most index settings
341
+ from the source index to the resulting index, with the exception of `index.number_of_replicas`
342
+ and `index.auto_expand_replicas`. To set the number of replicas in the resulting
343
+ index, configure these settings in the clone request. Cloning works as follows:
344
+ * First, it creates a new target index with the same definition as the source
345
+ index. * Then it hard-links segments from the source index into the target index.
346
+ If the file system does not support hard-linking, all segments are copied into
347
+ the new index, which is a much more time consuming process. * Finally, it recovers
348
+ the target index as though it were a closed index which had just been re-opened.
349
+ IMPORTANT: Indices can only be cloned if they meet the following requirements:
350
+ * The target index must not exist. * The source index must have the same number
351
+ of primary shards as the target index. * The node handling the clone process
352
+ must have sufficient free disk space to accommodate a second copy of the existing
353
+ index.
354
+
355
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clone-index.html>`_
329
356
 
330
357
  :param index: Name of the source index to clone.
331
358
  :param target: Name of the target index to create.
@@ -411,9 +438,26 @@ class IndicesClient(NamespacedClient):
411
438
  ] = None,
412
439
  ) -> ObjectApiResponse[t.Any]:
413
440
  """
414
- Closes an index.
415
-
416
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-close.html>`_
441
+ Close an index. A closed index is blocked for read or write operations and does
442
+ not allow all operations that opened indices allow. It is not possible to index
443
+ documents or to search for documents in a closed index. Closed indices do not
444
+ have to maintain internal data structures for indexing or searching documents,
445
+ which results in a smaller overhead on the cluster. When opening or closing an
446
+ index, the master node is responsible for restarting the index shards to reflect
447
+ the new state of the index. The shards will then go through the normal recovery
448
+ process. The data of opened and closed indices is automatically replicated by
449
+ the cluster to ensure that enough shard copies are safely kept around at all
450
+ times. You can open and close multiple indices. An error is thrown if the request
451
+ explicitly refers to a missing index. This behaviour can be turned off using
452
+ the `ignore_unavailable=true` parameter. By default, you must explicitly name
453
+ the indices you are opening or closing. To open or close indices with `_all`,
454
+ `*`, or other wildcard expressions, change the` action.destructive_requires_name`
455
+ setting to `false`. This setting can also be changed with the cluster update
456
+ settings API. Closed indices consume a significant amount of disk-space which
457
+ can cause problems in managed environments. Closing indices can be turned off
458
+ with the cluster settings API by setting `cluster.indices.close.enable` to `false`.
459
+
460
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-close.html>`_
417
461
 
418
462
  :param index: Comma-separated list or wildcard expression of index names used
419
463
  to limit the request.
@@ -492,9 +536,9 @@ class IndicesClient(NamespacedClient):
492
536
  body: t.Optional[t.Dict[str, t.Any]] = None,
493
537
  ) -> ObjectApiResponse[t.Any]:
494
538
  """
495
- Creates a new index.
539
+ Create an index. Creates a new index.
496
540
 
497
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-create-index.html>`_
541
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-create-index.html>`_
498
542
 
499
543
  :param index: Name of the index you wish to create.
500
544
  :param aliases: Aliases for the index.
@@ -560,19 +604,26 @@ class IndicesClient(NamespacedClient):
560
604
  error_trace: t.Optional[bool] = None,
561
605
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
562
606
  human: t.Optional[bool] = None,
607
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
563
608
  pretty: t.Optional[bool] = None,
609
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
564
610
  ) -> ObjectApiResponse[t.Any]:
565
611
  """
566
- Creates a data stream. You must have a matching index template with data stream
567
- enabled.
612
+ Create a data stream. Creates a data stream. You must have a matching index template
613
+ with data stream enabled.
568
614
 
569
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
615
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
570
616
 
571
617
  :param name: Name of the data stream, which must meet the following criteria:
572
618
  Lowercase only; Cannot include `\\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`,
573
619
  `#`, `:`, or a space character; Cannot start with `-`, `_`, `+`, or `.ds-`;
574
620
  Cannot be `.` or `..`; Cannot be longer than 255 bytes. Multi-byte characters
575
621
  count towards this limit faster.
622
+ :param master_timeout: Period to wait for a connection to the master node. If
623
+ no response is received before the timeout expires, the request fails and
624
+ returns an error.
625
+ :param timeout: Period to wait for a response. If no response is received before
626
+ the timeout expires, the request fails and returns an error.
576
627
  """
577
628
  if name in SKIP_IN_PATH:
578
629
  raise ValueError("Empty value passed for parameter 'name'")
@@ -585,8 +636,12 @@ class IndicesClient(NamespacedClient):
585
636
  __query["filter_path"] = filter_path
586
637
  if human is not None:
587
638
  __query["human"] = human
639
+ if master_timeout is not None:
640
+ __query["master_timeout"] = master_timeout
588
641
  if pretty is not None:
589
642
  __query["pretty"] = pretty
643
+ if timeout is not None:
644
+ __query["timeout"] = timeout
590
645
  __headers = {"accept": "application/json"}
591
646
  return await self.perform_request( # type: ignore[return-value]
592
647
  "PUT",
@@ -616,9 +671,9 @@ class IndicesClient(NamespacedClient):
616
671
  pretty: t.Optional[bool] = None,
617
672
  ) -> ObjectApiResponse[t.Any]:
618
673
  """
619
- Retrieves statistics for one or more data streams.
674
+ Get data stream stats. Retrieves statistics for one or more data streams.
620
675
 
621
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
676
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
622
677
 
623
678
  :param name: Comma-separated list of data streams used to limit the request.
624
679
  Wildcard expressions (`*`) are supported. To target all data streams in a
@@ -677,9 +732,9 @@ class IndicesClient(NamespacedClient):
677
732
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
678
733
  ) -> ObjectApiResponse[t.Any]:
679
734
  """
680
- Deletes one or more indices.
735
+ Delete indices. Deletes one or more indices.
681
736
 
682
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-delete-index.html>`_
737
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-index.html>`_
683
738
 
684
739
  :param index: Comma-separated list of indices to delete. You cannot specify index
685
740
  aliases. By default, this parameter does not support wildcards (`*`) or `_all`.
@@ -747,9 +802,9 @@ class IndicesClient(NamespacedClient):
747
802
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
748
803
  ) -> ObjectApiResponse[t.Any]:
749
804
  """
750
- Removes a data stream or index from an alias.
805
+ Delete an alias. Removes a data stream or index from an alias.
751
806
 
752
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
807
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
753
808
 
754
809
  :param index: Comma-separated list of data streams or indices used to limit the
755
810
  request. Supports wildcards (`*`).
@@ -811,10 +866,10 @@ class IndicesClient(NamespacedClient):
811
866
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
812
867
  ) -> ObjectApiResponse[t.Any]:
813
868
  """
814
- Removes the data lifecycle from a data stream rendering it not managed by the
815
- data stream lifecycle
869
+ Delete data stream lifecycles. Removes the data stream lifecycle from a data
870
+ stream, rendering it not managed by the data stream lifecycle.
816
871
 
817
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-delete-lifecycle.html>`_
872
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-delete-lifecycle.html>`_
818
873
 
819
874
  :param name: A comma-separated list of data streams of which the data stream
820
875
  lifecycle will be deleted; use `*` to get all data streams
@@ -868,17 +923,21 @@ class IndicesClient(NamespacedClient):
868
923
  ] = None,
869
924
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
870
925
  human: t.Optional[bool] = None,
926
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
871
927
  pretty: t.Optional[bool] = None,
872
928
  ) -> ObjectApiResponse[t.Any]:
873
929
  """
874
- Deletes one or more data streams and their backing indices.
930
+ Delete data streams. Deletes one or more data streams and their backing indices.
875
931
 
876
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
932
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
877
933
 
878
934
  :param name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions
879
935
  are supported.
880
936
  :param expand_wildcards: Type of data stream that wildcard patterns can match.
881
937
  Supports comma-separated values,such as `open,hidden`.
938
+ :param master_timeout: Period to wait for a connection to the master node. If
939
+ no response is received before the timeout expires, the request fails and
940
+ returns an error.
882
941
  """
883
942
  if name in SKIP_IN_PATH:
884
943
  raise ValueError("Empty value passed for parameter 'name'")
@@ -893,6 +952,8 @@ class IndicesClient(NamespacedClient):
893
952
  __query["filter_path"] = filter_path
894
953
  if human is not None:
895
954
  __query["human"] = human
955
+ if master_timeout is not None:
956
+ __query["master_timeout"] = master_timeout
896
957
  if pretty is not None:
897
958
  __query["pretty"] = pretty
898
959
  __headers = {"accept": "application/json"}
@@ -923,7 +984,7 @@ class IndicesClient(NamespacedClient):
923
984
  then there is no wildcard support and the provided names should match completely
924
985
  with existing templates.
925
986
 
926
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-delete-template.html>`_
987
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template.html>`_
927
988
 
928
989
  :param name: Comma-separated list of index template names used to limit the request.
929
990
  Wildcard (*) expressions are supported.
@@ -975,7 +1036,7 @@ class IndicesClient(NamespacedClient):
975
1036
  """
976
1037
  Deletes a legacy index template.
977
1038
 
978
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-delete-template-v1.html>`_
1039
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template-v1.html>`_
979
1040
 
980
1041
  :param name: The name of the legacy index template to delete. Wildcard (`*`)
981
1042
  expressions are supported.
@@ -1013,6 +1074,7 @@ class IndicesClient(NamespacedClient):
1013
1074
  )
1014
1075
 
1015
1076
  @_rewrite_parameters()
1077
+ @_stability_warning(Stability.EXPERIMENTAL)
1016
1078
  async def disk_usage(
1017
1079
  self,
1018
1080
  *,
@@ -1035,9 +1097,12 @@ class IndicesClient(NamespacedClient):
1035
1097
  run_expensive_tasks: t.Optional[bool] = None,
1036
1098
  ) -> ObjectApiResponse[t.Any]:
1037
1099
  """
1038
- Analyzes the disk usage of each field of an index or data stream.
1100
+ Analyze the index disk usage. Analyze the disk usage of each field of an index
1101
+ or data stream. This API might not support indices created in previous Elasticsearch
1102
+ versions. The result of a small index can be inaccurate as some parts of an index
1103
+ might not be analyzed by the API.
1039
1104
 
1040
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-disk-usage.html>`_
1105
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-disk-usage.html>`_
1041
1106
 
1042
1107
  :param index: Comma-separated list of data streams, indices, and aliases used
1043
1108
  to limit the request. It’s recommended to execute this API with a single
@@ -1095,6 +1160,7 @@ class IndicesClient(NamespacedClient):
1095
1160
  @_rewrite_parameters(
1096
1161
  body_name="config",
1097
1162
  )
1163
+ @_stability_warning(Stability.EXPERIMENTAL)
1098
1164
  async def downsample(
1099
1165
  self,
1100
1166
  *,
@@ -1108,11 +1174,16 @@ class IndicesClient(NamespacedClient):
1108
1174
  pretty: t.Optional[bool] = None,
1109
1175
  ) -> ObjectApiResponse[t.Any]:
1110
1176
  """
1111
- Aggregates a time series (TSDS) index and stores pre-computed statistical summaries
1112
- (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped
1113
- by a configured time interval.
1177
+ Downsample an index. Aggregate a time series (TSDS) index and store pre-computed
1178
+ statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each
1179
+ metric field grouped by a configured time interval. For example, a TSDS index
1180
+ that contains metrics sampled every 10 seconds can be downsampled to an hourly
1181
+ index. All documents within an hour interval are summarized and stored as a single
1182
+ document in the downsample index. NOTE: Only indices in a time series data stream
1183
+ are supported. Neither field nor document level security can be defined on the
1184
+ source index. The source index must be read only (`index.blocks.write: true`).
1114
1185
 
1115
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-downsample-data-stream.html>`_
1186
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-downsample-data-stream.html>`_
1116
1187
 
1117
1188
  :param index: Name of the time series index to downsample.
1118
1189
  :param target_index: Name of the index to create.
@@ -1178,9 +1249,10 @@ class IndicesClient(NamespacedClient):
1178
1249
  pretty: t.Optional[bool] = None,
1179
1250
  ) -> HeadApiResponse:
1180
1251
  """
1181
- Checks if a data stream, index, or alias exists.
1252
+ Check indices. Checks if one or more indices, index aliases, or data streams
1253
+ exist.
1182
1254
 
1183
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-exists.html>`_
1255
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-exists.html>`_
1184
1256
 
1185
1257
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1186
1258
  wildcards (`*`).
@@ -1256,9 +1328,9 @@ class IndicesClient(NamespacedClient):
1256
1328
  pretty: t.Optional[bool] = None,
1257
1329
  ) -> HeadApiResponse:
1258
1330
  """
1259
- Checks if an alias exists.
1331
+ Check aliases. Checks if one or more data stream or index aliases exist.
1260
1332
 
1261
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
1333
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
1262
1334
 
1263
1335
  :param name: Comma-separated list of aliases to check. Supports wildcards (`*`).
1264
1336
  :param index: Comma-separated list of data streams or indices used to limit the
@@ -1326,9 +1398,9 @@ class IndicesClient(NamespacedClient):
1326
1398
  pretty: t.Optional[bool] = None,
1327
1399
  ) -> HeadApiResponse:
1328
1400
  """
1329
- Returns information about whether a particular index template exists.
1401
+ Check index templates. Check whether index templates exist.
1330
1402
 
1331
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-templates.html>`_
1403
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-templates.html>`_
1332
1404
 
1333
1405
  :param name: Comma-separated list of index template names used to limit the request.
1334
1406
  Wildcard (*) expressions are supported.
@@ -1378,7 +1450,7 @@ class IndicesClient(NamespacedClient):
1378
1450
  Check existence of index templates. Returns information about whether a particular
1379
1451
  index template exists.
1380
1452
 
1381
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-template-exists-v1.html>`_
1453
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-template-exists-v1.html>`_
1382
1454
 
1383
1455
  :param name: The comma separated names of the index templates
1384
1456
  :param flat_settings: Return settings in flat format (default: false)
@@ -1428,10 +1500,12 @@ class IndicesClient(NamespacedClient):
1428
1500
  pretty: t.Optional[bool] = None,
1429
1501
  ) -> ObjectApiResponse[t.Any]:
1430
1502
  """
1431
- Retrieves information about the index's current data stream lifecycle, such as
1432
- any potential encountered error, time since creation etc.
1503
+ Get the status for a data stream lifecycle. Get information about an index or
1504
+ data stream's current data stream lifecycle status, such as time since index
1505
+ creation, time since rollover, the lifecycle configuration managing the index,
1506
+ or any errors encountered during lifecycle execution.
1433
1507
 
1434
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-explain-lifecycle.html>`_
1508
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-explain-lifecycle.html>`_
1435
1509
 
1436
1510
  :param index: The name of the index to explain
1437
1511
  :param include_defaults: indicates if the API should return the default values
@@ -1466,6 +1540,7 @@ class IndicesClient(NamespacedClient):
1466
1540
  )
1467
1541
 
1468
1542
  @_rewrite_parameters()
1543
+ @_stability_warning(Stability.EXPERIMENTAL)
1469
1544
  async def field_usage_stats(
1470
1545
  self,
1471
1546
  *,
@@ -1492,9 +1567,12 @@ class IndicesClient(NamespacedClient):
1492
1567
  ] = None,
1493
1568
  ) -> ObjectApiResponse[t.Any]:
1494
1569
  """
1495
- Returns field usage information for each shard and field of an index.
1570
+ Get field usage stats. Get field usage information for each shard and field of
1571
+ an index. Field usage statistics are automatically captured when queries are
1572
+ running on a cluster. A shard-level search request that accesses a given field,
1573
+ even if multiple times during that request, is counted as a single use.
1496
1574
 
1497
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/field-usage-stats.html>`_
1575
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/field-usage-stats.html>`_
1498
1576
 
1499
1577
  :param index: Comma-separated list or wildcard expression of index names used
1500
1578
  to limit the request.
@@ -1580,9 +1658,24 @@ class IndicesClient(NamespacedClient):
1580
1658
  wait_if_ongoing: t.Optional[bool] = None,
1581
1659
  ) -> ObjectApiResponse[t.Any]:
1582
1660
  """
1583
- Flushes one or more data streams or indices.
1584
-
1585
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-flush.html>`_
1661
+ Flush data streams or indices. Flushing a data stream or index is the process
1662
+ of making sure that any data that is currently only stored in the transaction
1663
+ log is also permanently stored in the Lucene index. When restarting, Elasticsearch
1664
+ replays any unflushed operations from the transaction log into the Lucene index
1665
+ to bring it back into the state that it was in before the restart. Elasticsearch
1666
+ automatically triggers flushes as needed, using heuristics that trade off the
1667
+ size of the unflushed transaction log against the cost of performing each flush.
1668
+ After each operation has been flushed it is permanently stored in the Lucene
1669
+ index. This may mean that there is no need to maintain an additional copy of
1670
+ it in the transaction log. The transaction log is made up of multiple files,
1671
+ called generations, and Elasticsearch will delete any generation files when they
1672
+ are no longer needed, freeing up disk space. It is also possible to trigger a
1673
+ flush on one or more indices using the flush API, although it is rare for users
1674
+ to need to call this API directly. If you call the flush API after indexing some
1675
+ documents then a successful response indicates that Elasticsearch has flushed
1676
+ all the documents that were indexed before the flush API was called.
1677
+
1678
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-flush.html>`_
1586
1679
 
1587
1680
  :param index: Comma-separated list of data streams, indices, and aliases to flush.
1588
1681
  Supports wildcards (`*`). To flush all data streams and indices, omit this
@@ -1663,9 +1756,23 @@ class IndicesClient(NamespacedClient):
1663
1756
  wait_for_completion: t.Optional[bool] = None,
1664
1757
  ) -> ObjectApiResponse[t.Any]:
1665
1758
  """
1666
- Performs the force merge operation on one or more indices.
1667
-
1668
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-forcemerge.html>`_
1759
+ Force a merge. Perform the force merge operation on the shards of one or more
1760
+ indices. For data streams, the API forces a merge on the shards of the stream's
1761
+ backing indices. Merging reduces the number of segments in each shard by merging
1762
+ some of them together and also frees up the space used by deleted documents.
1763
+ Merging normally happens automatically, but sometimes it is useful to trigger
1764
+ a merge manually. WARNING: We recommend force merging only a read-only index
1765
+ (meaning the index is no longer receiving writes). When documents are updated
1766
+ or deleted, the old version is not immediately removed but instead soft-deleted
1767
+ and marked with a "tombstone". These soft-deleted documents are automatically
1768
+ cleaned up during regular segment merges. But force merge can cause very large
1769
+ (greater than 5 GB) segments to be produced, which are not eligible for regular
1770
+ merges. So the number of soft-deleted documents can then grow rapidly, resulting
1771
+ in higher disk usage and worse search performance. If you regularly force merge
1772
+ an index receiving writes, this can also make snapshots more expensive, since
1773
+ the new documents can't be backed up incrementally.
1774
+
1775
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-forcemerge.html>`_
1669
1776
 
1670
1777
  :param index: A comma-separated list of index names; use `_all` or empty string
1671
1778
  to perform the operation on all indices
@@ -1756,10 +1863,10 @@ class IndicesClient(NamespacedClient):
1756
1863
  pretty: t.Optional[bool] = None,
1757
1864
  ) -> ObjectApiResponse[t.Any]:
1758
1865
  """
1759
- Returns information about one or more indices. For data streams, the API returns
1760
- information about the stream’s backing indices.
1866
+ Get index information. Returns information about one or more indices. For data
1867
+ streams, the API returns information about the stream’s backing indices.
1761
1868
 
1762
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-index.html>`_
1869
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-index.html>`_
1763
1870
 
1764
1871
  :param index: Comma-separated list of data streams, indices, and index aliases
1765
1872
  used to limit the request. Wildcard expressions (*) are supported.
@@ -1846,9 +1953,9 @@ class IndicesClient(NamespacedClient):
1846
1953
  pretty: t.Optional[bool] = None,
1847
1954
  ) -> ObjectApiResponse[t.Any]:
1848
1955
  """
1849
- Retrieves information for one or more aliases.
1956
+ Get aliases. Retrieves information for one or more data stream or index aliases.
1850
1957
 
1851
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
1958
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
1852
1959
 
1853
1960
  :param index: Comma-separated list of data streams or indices used to limit the
1854
1961
  request. Supports wildcards (`*`). To target all data streams and indices,
@@ -1924,12 +2031,14 @@ class IndicesClient(NamespacedClient):
1924
2031
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1925
2032
  human: t.Optional[bool] = None,
1926
2033
  include_defaults: t.Optional[bool] = None,
2034
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1927
2035
  pretty: t.Optional[bool] = None,
1928
2036
  ) -> ObjectApiResponse[t.Any]:
1929
2037
  """
1930
- Retrieves the data stream lifecycle configuration of one or more data streams.
2038
+ Get data stream lifecycles. Retrieves the data stream lifecycle configuration
2039
+ of one or more data streams.
1931
2040
 
1932
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-get-lifecycle.html>`_
2041
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle.html>`_
1933
2042
 
1934
2043
  :param name: Comma-separated list of data streams to limit the request. Supports
1935
2044
  wildcards (`*`). To target all data streams, omit this parameter or use `*`
@@ -1938,6 +2047,9 @@ class IndicesClient(NamespacedClient):
1938
2047
  Supports comma-separated values, such as `open,hidden`. Valid values are:
1939
2048
  `all`, `open`, `closed`, `hidden`, `none`.
1940
2049
  :param include_defaults: If `true`, return all default settings in the response.
2050
+ :param master_timeout: Period to wait for a connection to the master node. If
2051
+ no response is received before the timeout expires, the request fails and
2052
+ returns an error.
1941
2053
  """
1942
2054
  if name in SKIP_IN_PATH:
1943
2055
  raise ValueError("Empty value passed for parameter 'name'")
@@ -1954,6 +2066,8 @@ class IndicesClient(NamespacedClient):
1954
2066
  __query["human"] = human
1955
2067
  if include_defaults is not None:
1956
2068
  __query["include_defaults"] = include_defaults
2069
+ if master_timeout is not None:
2070
+ __query["master_timeout"] = master_timeout
1957
2071
  if pretty is not None:
1958
2072
  __query["pretty"] = pretty
1959
2073
  __headers = {"accept": "application/json"}
@@ -1983,12 +2097,14 @@ class IndicesClient(NamespacedClient):
1983
2097
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1984
2098
  human: t.Optional[bool] = None,
1985
2099
  include_defaults: t.Optional[bool] = None,
2100
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1986
2101
  pretty: t.Optional[bool] = None,
2102
+ verbose: t.Optional[bool] = None,
1987
2103
  ) -> ObjectApiResponse[t.Any]:
1988
2104
  """
1989
- Retrieves information about one or more data streams.
2105
+ Get data streams. Retrieves information about one or more data streams.
1990
2106
 
1991
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2107
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
1992
2108
 
1993
2109
  :param name: Comma-separated list of data stream names used to limit the request.
1994
2110
  Wildcard (`*`) expressions are supported. If omitted, all data streams are
@@ -1997,6 +2113,11 @@ class IndicesClient(NamespacedClient):
1997
2113
  Supports comma-separated values, such as `open,hidden`.
1998
2114
  :param include_defaults: If true, returns all relevant default configurations
1999
2115
  for the index template.
2116
+ :param master_timeout: Period to wait for a connection to the master node. If
2117
+ no response is received before the timeout expires, the request fails and
2118
+ returns an error.
2119
+ :param verbose: Whether the maximum timestamp for each data stream should be
2120
+ calculated and returned.
2000
2121
  """
2001
2122
  __path_parts: t.Dict[str, str]
2002
2123
  if name not in SKIP_IN_PATH:
@@ -2016,8 +2137,12 @@ class IndicesClient(NamespacedClient):
2016
2137
  __query["human"] = human
2017
2138
  if include_defaults is not None:
2018
2139
  __query["include_defaults"] = include_defaults
2140
+ if master_timeout is not None:
2141
+ __query["master_timeout"] = master_timeout
2019
2142
  if pretty is not None:
2020
2143
  __query["pretty"] = pretty
2144
+ if verbose is not None:
2145
+ __query["verbose"] = verbose
2021
2146
  __headers = {"accept": "application/json"}
2022
2147
  return await self.perform_request( # type: ignore[return-value]
2023
2148
  "GET",
@@ -2052,10 +2177,10 @@ class IndicesClient(NamespacedClient):
2052
2177
  pretty: t.Optional[bool] = None,
2053
2178
  ) -> ObjectApiResponse[t.Any]:
2054
2179
  """
2055
- Retrieves mapping definitions for one or more fields. For data streams, the API
2056
- retrieves field mappings for the stream’s backing indices.
2180
+ Get mapping definitions. Retrieves mapping definitions for one or more fields.
2181
+ For data streams, the API retrieves field mappings for the stream’s backing indices.
2057
2182
 
2058
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-field-mapping.html>`_
2183
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-field-mapping.html>`_
2059
2184
 
2060
2185
  :param fields: Comma-separated list or wildcard expression of fields used to
2061
2186
  limit returned information.
@@ -2132,7 +2257,7 @@ class IndicesClient(NamespacedClient):
2132
2257
  """
2133
2258
  Get index templates. Returns information about one or more index templates.
2134
2259
 
2135
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-template.html>`_
2260
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template.html>`_
2136
2261
 
2137
2262
  :param name: Comma-separated list of index template names used to limit the request.
2138
2263
  Wildcard (*) expressions are supported.
@@ -2203,10 +2328,10 @@ class IndicesClient(NamespacedClient):
2203
2328
  pretty: t.Optional[bool] = None,
2204
2329
  ) -> ObjectApiResponse[t.Any]:
2205
2330
  """
2206
- Retrieves mapping definitions for one or more indices. For data streams, the
2207
- API retrieves mappings for the stream’s backing indices.
2331
+ Get mapping definitions. Retrieves mapping definitions for one or more indices.
2332
+ For data streams, the API retrieves mappings for the stream’s backing indices.
2208
2333
 
2209
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-mapping.html>`_
2334
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-mapping.html>`_
2210
2335
 
2211
2336
  :param index: Comma-separated list of data streams, indices, and aliases used
2212
2337
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2288,10 +2413,10 @@ class IndicesClient(NamespacedClient):
2288
2413
  pretty: t.Optional[bool] = None,
2289
2414
  ) -> ObjectApiResponse[t.Any]:
2290
2415
  """
2291
- Returns setting information for one or more indices. For data streams, returns
2292
- setting information for the stream’s backing indices.
2416
+ Get index settings. Returns setting information for one or more indices. For
2417
+ data streams, returns setting information for the stream’s backing indices.
2293
2418
 
2294
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-settings.html>`_
2419
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-settings.html>`_
2295
2420
 
2296
2421
  :param index: Comma-separated list of data streams, indices, and aliases used
2297
2422
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2378,7 +2503,7 @@ class IndicesClient(NamespacedClient):
2378
2503
  """
2379
2504
  Get index templates. Retrieves information about one or more index templates.
2380
2505
 
2381
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-template-v1.html>`_
2506
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template-v1.html>`_
2382
2507
 
2383
2508
  :param name: Comma-separated list of index template names used to limit the request.
2384
2509
  Wildcard (`*`) expressions are supported. To return all index templates,
@@ -2430,21 +2555,28 @@ class IndicesClient(NamespacedClient):
2430
2555
  error_trace: t.Optional[bool] = None,
2431
2556
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2432
2557
  human: t.Optional[bool] = None,
2558
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2433
2559
  pretty: t.Optional[bool] = None,
2560
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2434
2561
  ) -> ObjectApiResponse[t.Any]:
2435
2562
  """
2436
- Converts an index alias to a data stream. You must have a matching index template
2437
- that is data stream enabled. The alias must meet the following criteria: The
2438
- alias must have a write index; All indices for the alias must have a `@timestamp`
2439
- field mapping of a `date` or `date_nanos` field type; The alias must not have
2440
- any filters; The alias must not use custom routing. If successful, the request
2441
- removes the alias and creates a data stream with the same name. The indices for
2442
- the alias become hidden backing indices for the stream. The write index for the
2443
- alias becomes the write index for the stream.
2563
+ Convert an index alias to a data stream. Converts an index alias to a data stream.
2564
+ You must have a matching index template that is data stream enabled. The alias
2565
+ must meet the following criteria: The alias must have a write index; All indices
2566
+ for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos`
2567
+ field type; The alias must not have any filters; The alias must not use custom
2568
+ routing. If successful, the request removes the alias and creates a data stream
2569
+ with the same name. The indices for the alias become hidden backing indices for
2570
+ the stream. The write index for the alias becomes the write index for the stream.
2444
2571
 
2445
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2572
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2446
2573
 
2447
2574
  :param name: Name of the index alias to convert to a data stream.
2575
+ :param master_timeout: Period to wait for a connection to the master node. If
2576
+ no response is received before the timeout expires, the request fails and
2577
+ returns an error.
2578
+ :param timeout: Period to wait for a response. If no response is received before
2579
+ the timeout expires, the request fails and returns an error.
2448
2580
  """
2449
2581
  if name in SKIP_IN_PATH:
2450
2582
  raise ValueError("Empty value passed for parameter 'name'")
@@ -2457,8 +2589,12 @@ class IndicesClient(NamespacedClient):
2457
2589
  __query["filter_path"] = filter_path
2458
2590
  if human is not None:
2459
2591
  __query["human"] = human
2592
+ if master_timeout is not None:
2593
+ __query["master_timeout"] = master_timeout
2460
2594
  if pretty is not None:
2461
2595
  __query["pretty"] = pretty
2596
+ if timeout is not None:
2597
+ __query["timeout"] = timeout
2462
2598
  __headers = {"accept": "application/json"}
2463
2599
  return await self.perform_request( # type: ignore[return-value]
2464
2600
  "POST",
@@ -2483,9 +2619,10 @@ class IndicesClient(NamespacedClient):
2483
2619
  body: t.Optional[t.Dict[str, t.Any]] = None,
2484
2620
  ) -> ObjectApiResponse[t.Any]:
2485
2621
  """
2486
- Performs one or more data stream modification actions in a single atomic operation.
2622
+ Update data streams. Performs one or more data stream modification actions in
2623
+ a single atomic operation.
2487
2624
 
2488
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2625
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2489
2626
 
2490
2627
  :param actions: Actions to perform.
2491
2628
  """
@@ -2545,7 +2682,7 @@ class IndicesClient(NamespacedClient):
2545
2682
  """
2546
2683
  Opens a closed index. For data streams, the API opens any closed backing indices.
2547
2684
 
2548
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-open-close.html>`_
2685
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-open-close.html>`_
2549
2686
 
2550
2687
  :param index: Comma-separated list of data streams, indices, and aliases used
2551
2688
  to limit the request. Supports wildcards (`*`). By default, you must explicitly
@@ -2614,15 +2751,29 @@ class IndicesClient(NamespacedClient):
2614
2751
  error_trace: t.Optional[bool] = None,
2615
2752
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2616
2753
  human: t.Optional[bool] = None,
2754
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2617
2755
  pretty: t.Optional[bool] = None,
2618
2756
  ) -> ObjectApiResponse[t.Any]:
2619
2757
  """
2620
- Promotes a data stream from a replicated data stream managed by CCR to a regular
2621
- data stream
2622
-
2623
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2758
+ Promote a data stream. Promote a data stream from a replicated data stream managed
2759
+ by cross-cluster replication (CCR) to a regular data stream. With CCR auto following,
2760
+ a data stream from a remote cluster can be replicated to the local cluster. These
2761
+ data streams can't be rolled over in the local cluster. These replicated data
2762
+ streams roll over only if the upstream data stream rolls over. In the event that
2763
+ the remote cluster is no longer available, the data stream in the local cluster
2764
+ can be promoted to a regular data stream, which allows these data streams to
2765
+ be rolled over in the local cluster. NOTE: When promoting a data stream, ensure
2766
+ the local cluster has a data stream enabled index template that matches the data
2767
+ stream. If this is missing, the data stream will not be able to roll over until
2768
+ a matching index template is created. This will affect the lifecycle management
2769
+ of the data stream and interfere with the data stream size and retention.
2770
+
2771
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2624
2772
 
2625
2773
  :param name: The name of the data stream
2774
+ :param master_timeout: Period to wait for a connection to the master node. If
2775
+ no response is received before the timeout expires, the request fails and
2776
+ returns an error.
2626
2777
  """
2627
2778
  if name in SKIP_IN_PATH:
2628
2779
  raise ValueError("Empty value passed for parameter 'name'")
@@ -2635,6 +2786,8 @@ class IndicesClient(NamespacedClient):
2635
2786
  __query["filter_path"] = filter_path
2636
2787
  if human is not None:
2637
2788
  __query["human"] = human
2789
+ if master_timeout is not None:
2790
+ __query["master_timeout"] = master_timeout
2638
2791
  if pretty is not None:
2639
2792
  __query["pretty"] = pretty
2640
2793
  __headers = {"accept": "application/json"}
@@ -2675,9 +2828,9 @@ class IndicesClient(NamespacedClient):
2675
2828
  body: t.Optional[t.Dict[str, t.Any]] = None,
2676
2829
  ) -> ObjectApiResponse[t.Any]:
2677
2830
  """
2678
- Adds a data stream or index to an alias.
2831
+ Create or update an alias. Adds a data stream or index to an alias.
2679
2832
 
2680
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
2833
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
2681
2834
 
2682
2835
  :param index: Comma-separated list of data streams or indices to add. Supports
2683
2836
  wildcards (`*`). Wildcard patterns that match both data streams and indices
@@ -2777,9 +2930,10 @@ class IndicesClient(NamespacedClient):
2777
2930
  body: t.Optional[t.Dict[str, t.Any]] = None,
2778
2931
  ) -> ObjectApiResponse[t.Any]:
2779
2932
  """
2780
- Update the data lifecycle of the specified data streams.
2933
+ Update data stream lifecycles. Update the data stream lifecycle of the specified
2934
+ data streams.
2781
2935
 
2782
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-put-lifecycle.html>`_
2936
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-put-lifecycle.html>`_
2783
2937
 
2784
2938
  :param name: Comma-separated list of data streams used to limit the request.
2785
2939
  Supports wildcards (`*`). To target all data streams use `*` or `_all`.
@@ -2881,7 +3035,7 @@ class IndicesClient(NamespacedClient):
2881
3035
  Create or update an index template. Index templates define settings, mappings,
2882
3036
  and aliases that can be applied automatically to new indices.
2883
3037
 
2884
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-put-template.html>`_
3038
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-template.html>`_
2885
3039
 
2886
3040
  :param name: Index or template name
2887
3041
  :param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
@@ -3038,11 +3192,11 @@ class IndicesClient(NamespacedClient):
3038
3192
  body: t.Optional[t.Dict[str, t.Any]] = None,
3039
3193
  ) -> ObjectApiResponse[t.Any]:
3040
3194
  """
3041
- Adds new fields to an existing data stream or index. You can also use this API
3042
- to change the search settings of existing fields. For data streams, these changes
3043
- are applied to all backing indices by default.
3195
+ Update field mappings. Adds new fields to an existing data stream or index. You
3196
+ can also use this API to change the search settings of existing fields. For data
3197
+ streams, these changes are applied to all backing indices by default.
3044
3198
 
3045
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-put-mapping.html>`_
3199
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-mapping.html>`_
3046
3200
 
3047
3201
  :param index: A comma-separated list of index names the mapping should be added
3048
3202
  to (supports wildcards); use `_all` or omit to add the mapping on all indices.
@@ -3169,10 +3323,10 @@ class IndicesClient(NamespacedClient):
3169
3323
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3170
3324
  ) -> ObjectApiResponse[t.Any]:
3171
3325
  """
3172
- Changes a dynamic index setting in real time. For data streams, index setting
3173
- changes are applied to all backing indices by default.
3326
+ Update index settings. Changes dynamic index settings in real time. For data
3327
+ streams, index setting changes are applied to all backing indices by default.
3174
3328
 
3175
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-update-settings.html>`_
3329
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-update-settings.html>`_
3176
3330
 
3177
3331
  :param settings:
3178
3332
  :param index: Comma-separated list of data streams, indices, and aliases used
@@ -3275,9 +3429,18 @@ class IndicesClient(NamespacedClient):
3275
3429
  ) -> ObjectApiResponse[t.Any]:
3276
3430
  """
3277
3431
  Create or update an index template. Index templates define settings, mappings,
3278
- and aliases that can be applied automatically to new indices.
3279
-
3280
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-templates-v1.html>`_
3432
+ and aliases that can be applied automatically to new indices. Elasticsearch applies
3433
+ templates to new indices based on an index pattern that matches the index name.
3434
+ IMPORTANT: This documentation is about legacy index templates, which are deprecated
3435
+ and will be replaced by the composable templates introduced in Elasticsearch
3436
+ 7.8. Composable templates always take precedence over legacy templates. If no
3437
+ composable template matches a new index, matching legacy templates are applied
3438
+ according to their order. Index templates are only applied during index creation.
3439
+ Changes to index templates do not affect existing indices. Settings and mappings
3440
+ specified in create index API requests override any settings or mappings specified
3441
+ in an index template.
3442
+
3443
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-templates-v1.html>`_
3281
3444
 
3282
3445
  :param name: The name of the template
3283
3446
  :param aliases: Aliases for the index.
@@ -3355,11 +3518,27 @@ class IndicesClient(NamespacedClient):
3355
3518
  pretty: t.Optional[bool] = None,
3356
3519
  ) -> ObjectApiResponse[t.Any]:
3357
3520
  """
3358
- Returns information about ongoing and completed shard recoveries for one or more
3359
- indices. For data streams, the API returns information for the stream’s backing
3360
- indices.
3361
-
3362
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-recovery.html>`_
3521
+ Get index recovery information. Get information about ongoing and completed shard
3522
+ recoveries for one or more indices. For data streams, the API returns information
3523
+ for the stream's backing indices. Shard recovery is the process of initializing
3524
+ a shard copy, such as restoring a primary shard from a snapshot or creating a
3525
+ replica shard from a primary shard. When a shard recovery completes, the recovered
3526
+ shard is available for search and indexing. Recovery automatically occurs during
3527
+ the following processes: * When creating an index for the first time. * When
3528
+ a node rejoins the cluster and starts up any missing primary shard copies using
3529
+ the data that it holds in its data path. * Creation of new replica shard copies
3530
+ from the primary. * Relocation of a shard copy to a different node in the same
3531
+ cluster. * A snapshot restore operation. * A clone, shrink, or split operation.
3532
+ You can determine the cause of a shard recovery using the recovery or cat recovery
3533
+ APIs. The index recovery API reports information about completed recoveries only
3534
+ for shard copies that currently exist in the cluster. It only reports the last
3535
+ recovery for each shard copy and does not report historical information about
3536
+ earlier recoveries, nor does it report information about the recoveries of shard
3537
+ copies that no longer exist. This means that if a shard copy completes a recovery
3538
+ and then Elasticsearch relocates it onto a different node then the information
3539
+ about the original recovery will not be shown in the recovery API.
3540
+
3541
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-recovery.html>`_
3363
3542
 
3364
3543
  :param index: Comma-separated list of data streams, indices, and aliases used
3365
3544
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3419,11 +3598,11 @@ class IndicesClient(NamespacedClient):
3419
3598
  pretty: t.Optional[bool] = None,
3420
3599
  ) -> ObjectApiResponse[t.Any]:
3421
3600
  """
3422
- A refresh makes recent operations performed on one or more indices available
3423
- for search. For data streams, the API runs the refresh operation on the stream’s
3424
- backing indices.
3601
+ Refresh an index. A refresh makes recent operations performed on one or more
3602
+ indices available for search. For data streams, the API runs the refresh operation
3603
+ on the stream’s backing indices.
3425
3604
 
3426
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-refresh.html>`_
3605
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-refresh.html>`_
3427
3606
 
3428
3607
  :param index: Comma-separated list of data streams, indices, and aliases used
3429
3608
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3491,9 +3670,23 @@ class IndicesClient(NamespacedClient):
3491
3670
  pretty: t.Optional[bool] = None,
3492
3671
  ) -> ObjectApiResponse[t.Any]:
3493
3672
  """
3494
- Reloads an index's search analyzers and their resources.
3495
-
3496
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-reload-analyzers.html>`_
3673
+ Reload search analyzers. Reload an index's search analyzers and their resources.
3674
+ For data streams, the API reloads search analyzers and resources for the stream's
3675
+ backing indices. IMPORTANT: After reloading the search analyzers you should clear
3676
+ the request cache to make sure it doesn't contain responses derived from the
3677
+ previous versions of the analyzer. You can use the reload search analyzers API
3678
+ to pick up changes to synonym files used in the `synonym_graph` or `synonym`
3679
+ token filter of a search analyzer. To be eligible, the token filter must have
3680
+ an `updateable` flag of `true` and only be used in search analyzers. NOTE: This
3681
+ API does not perform a reload for each shard of an index. Instead, it performs
3682
+ a reload for each node containing index shards. As a result, the total shard
3683
+ count returned by the API can differ from the number of index shards. Because
3684
+ reloading affects every node with an index shard, it is important to update the
3685
+ synonym file on every data node in the cluster--including nodes that don't contain
3686
+ a shard replica--before using this API. This ensures the synonym file is updated
3687
+ everywhere in the cluster in case shards are relocated in the future.
3688
+
3689
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-reload-analyzers.html>`_
3497
3690
 
3498
3691
  :param index: A comma-separated list of index names to reload analyzers for
3499
3692
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
@@ -3555,11 +3748,22 @@ class IndicesClient(NamespacedClient):
3555
3748
  pretty: t.Optional[bool] = None,
3556
3749
  ) -> ObjectApiResponse[t.Any]:
3557
3750
  """
3558
- Resolves the specified index expressions to return information about each cluster,
3559
- including the local cluster, if included. Multiple patterns and remote clusters
3560
- are supported.
3561
-
3562
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-resolve-cluster-api.html>`_
3751
+ Resolve the cluster. Resolve the specified index expressions to return information
3752
+ about each cluster, including the local cluster, if included. Multiple patterns
3753
+ and remote clusters are supported. This endpoint is useful before doing a cross-cluster
3754
+ search in order to determine which remote clusters should be included in a search.
3755
+ You use the same index expression with this endpoint as you would for cross-cluster
3756
+ search. Index and cluster exclusions are also supported with this endpoint. For
3757
+ each cluster in the index expression, information is returned about: * Whether
3758
+ the querying ("local") cluster is currently connected to each remote cluster
3759
+ in the index expression scope. * Whether each remote cluster is configured with
3760
+ `skip_unavailable` as `true` or `false`. * Whether there are any indices, aliases,
3761
+ or data streams on that cluster that match the index expression. * Whether the
3762
+ search is likely to have errors returned when you do the cross-cluster search
3763
+ (including any authorization errors if you do not have permission to query the
3764
+ index). * Cluster version information, including the Elasticsearch server version.
3765
+
3766
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-cluster-api.html>`_
3563
3767
 
3564
3768
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3565
3769
  and data streams to resolve. Resources on remote clusters can be specified
@@ -3630,10 +3834,10 @@ class IndicesClient(NamespacedClient):
3630
3834
  pretty: t.Optional[bool] = None,
3631
3835
  ) -> ObjectApiResponse[t.Any]:
3632
3836
  """
3633
- Resolves the specified name(s) and/or index patterns for indices, aliases, and
3634
- data streams. Multiple patterns and remote clusters are supported.
3837
+ Resolve indices. Resolve the names and/or index patterns for indices, aliases,
3838
+ and data streams. Multiple patterns and remote clusters are supported.
3635
3839
 
3636
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-resolve-index-api.html>`_
3840
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-index-api.html>`_
3637
3841
 
3638
3842
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3639
3843
  and data streams to resolve. Resources on remote clusters can be specified
@@ -3704,9 +3908,9 @@ class IndicesClient(NamespacedClient):
3704
3908
  body: t.Optional[t.Dict[str, t.Any]] = None,
3705
3909
  ) -> ObjectApiResponse[t.Any]:
3706
3910
  """
3707
- Creates a new index for a data stream or index alias.
3911
+ Roll over to a new index. Creates a new index for a data stream or index alias.
3708
3912
 
3709
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-rollover-index.html>`_
3913
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-rollover-index.html>`_
3710
3914
 
3711
3915
  :param alias: Name of the data stream or index alias to roll over.
3712
3916
  :param new_index: Name of the index to create. Supports date math. Data streams
@@ -3809,10 +4013,11 @@ class IndicesClient(NamespacedClient):
3809
4013
  verbose: t.Optional[bool] = None,
3810
4014
  ) -> ObjectApiResponse[t.Any]:
3811
4015
  """
3812
- Returns low-level information about the Lucene segments in index shards. For
3813
- data streams, the API returns information about the streams backing indices.
4016
+ Get index segments. Get low-level information about the Lucene segments in index
4017
+ shards. For data streams, the API returns information about the stream's backing
4018
+ indices.
3814
4019
 
3815
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-segments.html>`_
4020
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-segments.html>`_
3816
4021
 
3817
4022
  :param index: Comma-separated list of data streams, indices, and aliases used
3818
4023
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3889,10 +4094,16 @@ class IndicesClient(NamespacedClient):
3889
4094
  ] = None,
3890
4095
  ) -> ObjectApiResponse[t.Any]:
3891
4096
  """
3892
- Retrieves store information about replica shards in one or more indices. For
3893
- data streams, the API retrieves store information for the streams backing indices.
4097
+ Get index shard stores. Get store information about replica shards in one or
4098
+ more indices. For data streams, the API retrieves store information for the stream's
4099
+ backing indices. The index shard stores API returns the following information:
4100
+ * The node on which each replica shard exists. * The allocation ID for each replica
4101
+ shard. * A unique ID for each replica shard. * Any errors encountered while opening
4102
+ the shard index or from an earlier failure. By default, the API returns store
4103
+ information only for primary shards that are unassigned or have one or more unassigned
4104
+ replica shards.
3894
4105
 
3895
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-shards-stores.html>`_
4106
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shards-stores.html>`_
3896
4107
 
3897
4108
  :param index: List of data streams, indices, and aliases used to limit the request.
3898
4109
  :param allow_no_indices: If false, the request returns an error if any wildcard
@@ -3961,9 +4172,41 @@ class IndicesClient(NamespacedClient):
3961
4172
  body: t.Optional[t.Dict[str, t.Any]] = None,
3962
4173
  ) -> ObjectApiResponse[t.Any]:
3963
4174
  """
3964
- Shrinks an existing index into a new index with fewer primary shards.
3965
-
3966
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-shrink-index.html>`_
4175
+ Shrink an index. Shrink an index into a new index with fewer primary shards.
4176
+ Before you can shrink an index: * The index must be read-only. * A copy of every
4177
+ shard in the index must reside on the same node. * The index must have a green
4178
+ health status. To make shard allocation easier, we recommend you also remove
4179
+ the index's replica shards. You can later re-add replica shards as part of the
4180
+ shrink operation. The requested number of primary shards in the target index
4181
+ must be a factor of the number of shards in the source index. For example an
4182
+ index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an
4183
+ index with 15 primary shards can be shrunk into 5, 3 or 1. If the number of shards
4184
+ in the index is a prime number it can only be shrunk into a single primary shard
4185
+ Before shrinking, a (primary or replica) copy of every shard in the index must
4186
+ be present on the same node. The current write index on a data stream cannot
4187
+ be shrunk. In order to shrink the current write index, the data stream must first
4188
+ be rolled over so that a new write index is created and then the previous write
4189
+ index can be shrunk. A shrink operation: * Creates a new target index with the
4190
+ same definition as the source index, but with a smaller number of primary shards.
4191
+ * Hard-links segments from the source index into the target index. If the file
4192
+ system does not support hard-linking, then all segments are copied into the new
4193
+ index, which is a much more time consuming process. Also if using multiple data
4194
+ paths, shards on different data paths require a full copy of segment files if
4195
+ they are not on the same disk since hardlinks do not work across disks. * Recovers
4196
+ the target index as though it were a closed index which had just been re-opened.
4197
+ Recovers shards to the `.routing.allocation.initial_recovery._id` index setting.
4198
+ IMPORTANT: Indices can only be shrunk if they satisfy the following requirements:
4199
+ * The target index must not exist. * The source index must have more primary
4200
+ shards than the target index. * The number of primary shards in the target index
4201
+ must be a factor of the number of primary shards in the source index. The source
4202
+ index must have more primary shards than the target index. * The index must not
4203
+ contain more than 2,147,483,519 documents in total across all shards that will
4204
+ be shrunk into a single shard on the target index as this is the maximum number
4205
+ of docs that can fit into a single shard. * The node handling the shrink process
4206
+ must have sufficient free disk space to accommodate a second copy of the existing
4207
+ index.
4208
+
4209
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shrink-index.html>`_
3967
4210
 
3968
4211
  :param index: Name of the source index to shrink.
3969
4212
  :param target: Name of the target index to create.
@@ -4039,7 +4282,7 @@ class IndicesClient(NamespacedClient):
4039
4282
  Simulate an index. Returns the index configuration that would be applied to the
4040
4283
  specified index from an existing index template.
4041
4284
 
4042
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-simulate-index.html>`_
4285
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-index.html>`_
4043
4286
 
4044
4287
  :param name: Name of the index to simulate
4045
4288
  :param include_defaults: If true, returns all relevant default configurations
@@ -4117,7 +4360,7 @@ class IndicesClient(NamespacedClient):
4117
4360
  Simulate an index template. Returns the index configuration that would be applied
4118
4361
  by a particular index template.
4119
4362
 
4120
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-simulate-template.html>`_
4363
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-template.html>`_
4121
4364
 
4122
4365
  :param name: Name of the index template to simulate. To test a template configuration
4123
4366
  before you add it to the cluster, omit this parameter and specify the template
@@ -4246,9 +4489,29 @@ class IndicesClient(NamespacedClient):
4246
4489
  body: t.Optional[t.Dict[str, t.Any]] = None,
4247
4490
  ) -> ObjectApiResponse[t.Any]:
4248
4491
  """
4249
- Splits an existing index into a new index with more primary shards.
4250
-
4251
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-split-index.html>`_
4492
+ Split an index. Split an index into a new index with more primary shards. * Before
4493
+ you can split an index: * The index must be read-only. * The cluster health status
4494
+ must be green. The number of times the index can be split (and the number of
4495
+ shards that each original shard can be split into) is determined by the `index.number_of_routing_shards`
4496
+ setting. The number of routing shards specifies the hashing space that is used
4497
+ internally to distribute documents across shards with consistent hashing. For
4498
+ instance, a 5 shard index with `number_of_routing_shards` set to 30 (5 x 2 x
4499
+ 3) could be split by a factor of 2 or 3. A split operation: * Creates a new target
4500
+ index with the same definition as the source index, but with a larger number
4501
+ of primary shards. * Hard-links segments from the source index into the target
4502
+ index. If the file system doesn't support hard-linking, all segments are copied
4503
+ into the new index, which is a much more time consuming process. * Hashes all
4504
+ documents again, after low level files are created, to delete documents that
4505
+ belong to a different shard. * Recovers the target index as though it were a
4506
+ closed index which had just been re-opened. IMPORTANT: Indices can only be split
4507
+ if they satisfy the following requirements: * The target index must not exist.
4508
+ * The source index must have fewer primary shards than the target index. * The
4509
+ number of primary shards in the target index must be a multiple of the number
4510
+ of primary shards in the source index. * The node handling the split process
4511
+ must have sufficient free disk space to accommodate a second copy of the existing
4512
+ index.
4513
+
4514
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-split-index.html>`_
4252
4515
 
4253
4516
  :param index: Name of the source index to split.
4254
4517
  :param target: Name of the target index to create.
@@ -4338,10 +4601,16 @@ class IndicesClient(NamespacedClient):
4338
4601
  pretty: t.Optional[bool] = None,
4339
4602
  ) -> ObjectApiResponse[t.Any]:
4340
4603
  """
4341
- Returns statistics for one or more indices. For data streams, the API retrieves
4342
- statistics for the streams backing indices.
4604
+ Get index statistics. For data streams, the API retrieves statistics for the
4605
+ stream's backing indices. By default, the returned statistics are index-level
4606
+ with `primaries` and `total` aggregations. `primaries` are the values for only
4607
+ the primary shards. `total` are the accumulated values for both primary and replica
4608
+ shards. To get shard-level statistics, set the `level` parameter to `shards`.
4609
+ NOTE: When moving to another node, the shard-level statistics for a shard are
4610
+ cleared. Although the shard is no longer part of the node, that node retains
4611
+ any node-level statistics to which the shard contributed.
4343
4612
 
4344
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-stats.html>`_
4613
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-stats.html>`_
4345
4614
 
4346
4615
  :param index: A comma-separated list of index names; use `_all` or empty string
4347
4616
  to perform the operation on all indices
@@ -4442,9 +4711,10 @@ class IndicesClient(NamespacedClient):
4442
4711
  wait_for_active_shards: t.Optional[str] = None,
4443
4712
  ) -> ObjectApiResponse[t.Any]:
4444
4713
  """
4445
- Unfreezes an index.
4714
+ Unfreeze an index. When a frozen index is unfrozen, the index goes through the
4715
+ normal recovery process and becomes writeable again.
4446
4716
 
4447
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/unfreeze-index-api.html>`_
4717
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/unfreeze-index-api.html>`_
4448
4718
 
4449
4719
  :param index: Identifier for the index.
4450
4720
  :param allow_no_indices: If `false`, the request returns an error if any wildcard
@@ -4516,9 +4786,9 @@ class IndicesClient(NamespacedClient):
4516
4786
  body: t.Optional[t.Dict[str, t.Any]] = None,
4517
4787
  ) -> ObjectApiResponse[t.Any]:
4518
4788
  """
4519
- Adds a data stream or index to an alias.
4789
+ Create or update an alias. Adds a data stream or index to an alias.
4520
4790
 
4521
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
4791
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
4522
4792
 
4523
4793
  :param actions: Actions to perform.
4524
4794
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -4591,9 +4861,9 @@ class IndicesClient(NamespacedClient):
4591
4861
  body: t.Optional[t.Dict[str, t.Any]] = None,
4592
4862
  ) -> ObjectApiResponse[t.Any]:
4593
4863
  """
4594
- Validates a potentially expensive query without executing it.
4864
+ Validate a query. Validates a query without running it.
4595
4865
 
4596
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-validate.html>`_
4866
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-validate.html>`_
4597
4867
 
4598
4868
  :param index: Comma-separated list of data streams, indices, and aliases to search.
4599
4869
  Supports wildcards (`*`). To search all data streams or indices, omit this