elasticsearch 8.13.2__py3-none-any.whl → 8.15.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 (96) hide show
  1. elasticsearch/_async/client/__init__.py +204 -169
  2. elasticsearch/_async/client/async_search.py +35 -20
  3. elasticsearch/_async/client/autoscaling.py +4 -4
  4. elasticsearch/_async/client/cat.py +785 -180
  5. elasticsearch/_async/client/ccr.py +20 -32
  6. elasticsearch/_async/client/cluster.py +94 -88
  7. elasticsearch/_async/client/connector.py +1470 -0
  8. elasticsearch/_async/client/dangling_indices.py +7 -11
  9. elasticsearch/_async/client/enrich.py +8 -8
  10. elasticsearch/_async/client/eql.py +17 -16
  11. elasticsearch/_async/client/esql.py +2 -2
  12. elasticsearch/_async/client/features.py +2 -2
  13. elasticsearch/_async/client/fleet.py +18 -17
  14. elasticsearch/_async/client/graph.py +4 -4
  15. elasticsearch/_async/client/ilm.py +36 -44
  16. elasticsearch/_async/client/indices.py +401 -411
  17. elasticsearch/_async/client/inference.py +65 -39
  18. elasticsearch/_async/client/ingest.py +22 -23
  19. elasticsearch/_async/client/license.py +18 -10
  20. elasticsearch/_async/client/logstash.py +6 -6
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +383 -176
  23. elasticsearch/_async/client/monitoring.py +2 -2
  24. elasticsearch/_async/client/nodes.py +32 -32
  25. elasticsearch/_async/client/query_rules.py +384 -0
  26. elasticsearch/_async/client/rollup.py +13 -13
  27. elasticsearch/_async/client/search_application.py +15 -10
  28. elasticsearch/_async/client/searchable_snapshots.py +9 -13
  29. elasticsearch/_async/client/security.py +587 -104
  30. elasticsearch/_async/client/shutdown.py +7 -7
  31. elasticsearch/_async/client/slm.py +11 -13
  32. elasticsearch/_async/client/snapshot.py +39 -52
  33. elasticsearch/_async/client/sql.py +12 -14
  34. elasticsearch/_async/client/ssl.py +1 -1
  35. elasticsearch/_async/client/synonyms.py +8 -8
  36. elasticsearch/_async/client/tasks.py +9 -10
  37. elasticsearch/_async/client/text_structure.py +3 -3
  38. elasticsearch/_async/client/transform.py +89 -34
  39. elasticsearch/_async/client/watcher.py +30 -15
  40. elasticsearch/_async/client/xpack.py +6 -7
  41. elasticsearch/_otel.py +2 -6
  42. elasticsearch/_sync/client/__init__.py +204 -169
  43. elasticsearch/_sync/client/async_search.py +35 -20
  44. elasticsearch/_sync/client/autoscaling.py +4 -4
  45. elasticsearch/_sync/client/cat.py +785 -180
  46. elasticsearch/_sync/client/ccr.py +20 -32
  47. elasticsearch/_sync/client/cluster.py +94 -88
  48. elasticsearch/_sync/client/connector.py +1470 -0
  49. elasticsearch/_sync/client/dangling_indices.py +7 -11
  50. elasticsearch/_sync/client/enrich.py +8 -8
  51. elasticsearch/_sync/client/eql.py +17 -16
  52. elasticsearch/_sync/client/esql.py +2 -2
  53. elasticsearch/_sync/client/features.py +2 -2
  54. elasticsearch/_sync/client/fleet.py +18 -17
  55. elasticsearch/_sync/client/graph.py +4 -4
  56. elasticsearch/_sync/client/ilm.py +36 -44
  57. elasticsearch/_sync/client/indices.py +401 -411
  58. elasticsearch/_sync/client/inference.py +65 -39
  59. elasticsearch/_sync/client/ingest.py +22 -23
  60. elasticsearch/_sync/client/license.py +18 -10
  61. elasticsearch/_sync/client/logstash.py +6 -6
  62. elasticsearch/_sync/client/migration.py +3 -3
  63. elasticsearch/_sync/client/ml.py +383 -176
  64. elasticsearch/_sync/client/monitoring.py +2 -2
  65. elasticsearch/_sync/client/nodes.py +32 -32
  66. elasticsearch/_sync/client/query_rules.py +384 -0
  67. elasticsearch/_sync/client/rollup.py +13 -13
  68. elasticsearch/_sync/client/search_application.py +15 -10
  69. elasticsearch/_sync/client/searchable_snapshots.py +9 -13
  70. elasticsearch/_sync/client/security.py +587 -104
  71. elasticsearch/_sync/client/shutdown.py +7 -7
  72. elasticsearch/_sync/client/slm.py +11 -13
  73. elasticsearch/_sync/client/snapshot.py +39 -52
  74. elasticsearch/_sync/client/sql.py +12 -14
  75. elasticsearch/_sync/client/ssl.py +1 -1
  76. elasticsearch/_sync/client/synonyms.py +8 -8
  77. elasticsearch/_sync/client/tasks.py +9 -10
  78. elasticsearch/_sync/client/text_structure.py +3 -3
  79. elasticsearch/_sync/client/transform.py +89 -34
  80. elasticsearch/_sync/client/watcher.py +30 -15
  81. elasticsearch/_sync/client/xpack.py +6 -7
  82. elasticsearch/_version.py +1 -1
  83. elasticsearch/client.py +3 -3
  84. elasticsearch/helpers/vectorstore/_async/vectorstore.py +36 -6
  85. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +36 -6
  86. elasticsearch/serializer.py +34 -1
  87. elasticsearch-8.15.0.dist-info/METADATA +177 -0
  88. elasticsearch-8.15.0.dist-info/RECORD +117 -0
  89. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info}/WHEEL +1 -2
  90. elasticsearch/_async/client/query_ruleset.py +0 -205
  91. elasticsearch/_sync/client/query_ruleset.py +0 -205
  92. elasticsearch-8.13.2.dist-info/METADATA +0 -147
  93. elasticsearch-8.13.2.dist-info/RECORD +0 -116
  94. elasticsearch-8.13.2.dist-info/top_level.txt +0 -1
  95. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/LICENSE +0 -0
  96. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/NOTICE +0 -0
@@ -30,30 +30,28 @@ class IndicesClient(NamespacedClient):
30
30
  self,
31
31
  *,
32
32
  index: str,
33
- block: t.Union["t.Literal['metadata', 'read', 'read_only', 'write']", str],
33
+ block: t.Union[str, t.Literal["metadata", "read", "read_only", "write"]],
34
34
  allow_no_indices: t.Optional[bool] = None,
35
35
  error_trace: t.Optional[bool] = None,
36
36
  expand_wildcards: t.Optional[
37
37
  t.Union[
38
38
  t.Sequence[
39
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
39
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
40
40
  ],
41
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
41
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
42
42
  ]
43
43
  ] = None,
44
44
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
45
45
  human: t.Optional[bool] = None,
46
46
  ignore_unavailable: t.Optional[bool] = None,
47
- master_timeout: t.Optional[
48
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
49
- ] = None,
47
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
50
48
  pretty: t.Optional[bool] = None,
51
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
49
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
52
50
  ) -> ObjectApiResponse[t.Any]:
53
51
  """
54
52
  Adds a block to an index.
55
53
 
56
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/index-modules-blocks.html>`_
54
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-modules-blocks.html>`_
57
55
 
58
56
  :param index: A comma separated list of indices to add a block to
59
57
  :param block: The block to add (one of read, write, read_only or metadata)
@@ -138,10 +136,9 @@ class IndicesClient(NamespacedClient):
138
136
  body: t.Optional[t.Dict[str, t.Any]] = None,
139
137
  ) -> ObjectApiResponse[t.Any]:
140
138
  """
141
- Performs the analysis process on a text and return the tokens breakdown of the
142
- text.
139
+ Performs analysis on a text string and returns the resulting tokens.
143
140
 
144
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-analyze.html>`_
141
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-analyze.html>`_
145
142
 
146
143
  :param index: Index used to derive the analyzer. If specified, the `analyzer`
147
144
  or field parameter overrides this value. If no index is specified or the
@@ -225,9 +222,9 @@ class IndicesClient(NamespacedClient):
225
222
  expand_wildcards: t.Optional[
226
223
  t.Union[
227
224
  t.Sequence[
228
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
225
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
229
226
  ],
230
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
227
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
231
228
  ]
232
229
  ] = None,
233
230
  fielddata: t.Optional[bool] = None,
@@ -240,9 +237,10 @@ class IndicesClient(NamespacedClient):
240
237
  request: t.Optional[bool] = None,
241
238
  ) -> ObjectApiResponse[t.Any]:
242
239
  """
243
- Clears all or specific caches for one or more indices.
240
+ Clears the caches of one or more indices. For data streams, the API clears the
241
+ caches of the stream’s backing indices.
244
242
 
245
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-clearcache.html>`_
243
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-clearcache.html>`_
246
244
 
247
245
  :param index: Comma-separated list of data streams, indices, and aliases used
248
246
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -315,21 +313,19 @@ class IndicesClient(NamespacedClient):
315
313
  error_trace: t.Optional[bool] = None,
316
314
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
317
315
  human: t.Optional[bool] = None,
318
- master_timeout: t.Optional[
319
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
320
- ] = None,
316
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
321
317
  pretty: t.Optional[bool] = None,
322
318
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
323
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
319
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
324
320
  wait_for_active_shards: t.Optional[
325
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
321
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
326
322
  ] = None,
327
323
  body: t.Optional[t.Dict[str, t.Any]] = None,
328
324
  ) -> ObjectApiResponse[t.Any]:
329
325
  """
330
- Clones an index
326
+ Clones an existing index.
331
327
 
332
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-clone-index.html>`_
328
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-clone-index.html>`_
333
329
 
334
330
  :param index: Name of the source index to clone.
335
331
  :param target: Name of the target index to create.
@@ -399,27 +395,25 @@ class IndicesClient(NamespacedClient):
399
395
  expand_wildcards: t.Optional[
400
396
  t.Union[
401
397
  t.Sequence[
402
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
398
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
403
399
  ],
404
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
400
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
405
401
  ]
406
402
  ] = None,
407
403
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
408
404
  human: t.Optional[bool] = None,
409
405
  ignore_unavailable: t.Optional[bool] = None,
410
- master_timeout: t.Optional[
411
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
412
- ] = None,
406
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
413
407
  pretty: t.Optional[bool] = None,
414
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
408
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
415
409
  wait_for_active_shards: t.Optional[
416
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
410
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
417
411
  ] = None,
418
412
  ) -> ObjectApiResponse[t.Any]:
419
413
  """
420
414
  Closes an index.
421
415
 
422
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-close.html>`_
416
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-close.html>`_
423
417
 
424
418
  :param index: Comma-separated list or wildcard expression of index names used
425
419
  to limit the request.
@@ -488,21 +482,19 @@ class IndicesClient(NamespacedClient):
488
482
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
489
483
  human: t.Optional[bool] = None,
490
484
  mappings: t.Optional[t.Mapping[str, t.Any]] = None,
491
- master_timeout: t.Optional[
492
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
493
- ] = None,
485
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
494
486
  pretty: t.Optional[bool] = None,
495
487
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
496
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
488
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
497
489
  wait_for_active_shards: t.Optional[
498
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
490
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
499
491
  ] = None,
500
492
  body: t.Optional[t.Dict[str, t.Any]] = None,
501
493
  ) -> ObjectApiResponse[t.Any]:
502
494
  """
503
- Creates an index with optional settings and mappings.
495
+ Creates a new index.
504
496
 
505
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-create-index.html>`_
497
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-create-index.html>`_
506
498
 
507
499
  :param index: Name of the index you wish to create.
508
500
  :param aliases: Aliases for the index.
@@ -571,9 +563,10 @@ class IndicesClient(NamespacedClient):
571
563
  pretty: t.Optional[bool] = None,
572
564
  ) -> ObjectApiResponse[t.Any]:
573
565
  """
574
- Creates a data stream
566
+ Creates a data stream. You must have a matching index template with data stream
567
+ enabled.
575
568
 
576
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams.html>`_
569
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
577
570
 
578
571
  :param name: Name of the data stream, which must meet the following criteria:
579
572
  Lowercase only; Cannot include `\\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`,
@@ -613,9 +606,9 @@ class IndicesClient(NamespacedClient):
613
606
  expand_wildcards: t.Optional[
614
607
  t.Union[
615
608
  t.Sequence[
616
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
609
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
617
610
  ],
618
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
611
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
619
612
  ]
620
613
  ] = None,
621
614
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -623,9 +616,9 @@ class IndicesClient(NamespacedClient):
623
616
  pretty: t.Optional[bool] = None,
624
617
  ) -> ObjectApiResponse[t.Any]:
625
618
  """
626
- Provides statistics on operations happening in a data stream.
619
+ Retrieves statistics for one or more data streams.
627
620
 
628
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams.html>`_
621
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
629
622
 
630
623
  :param name: Comma-separated list of data streams used to limit the request.
631
624
  Wildcard expressions (`*`) are supported. To target all data streams in a
@@ -671,24 +664,22 @@ class IndicesClient(NamespacedClient):
671
664
  expand_wildcards: t.Optional[
672
665
  t.Union[
673
666
  t.Sequence[
674
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
667
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
675
668
  ],
676
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
669
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
677
670
  ]
678
671
  ] = None,
679
672
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
680
673
  human: t.Optional[bool] = None,
681
674
  ignore_unavailable: t.Optional[bool] = None,
682
- master_timeout: t.Optional[
683
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
684
- ] = None,
675
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
685
676
  pretty: t.Optional[bool] = None,
686
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
677
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
687
678
  ) -> ObjectApiResponse[t.Any]:
688
679
  """
689
- Deletes an index.
680
+ Deletes one or more indices.
690
681
 
691
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-delete-index.html>`_
682
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-delete-index.html>`_
692
683
 
693
684
  :param index: Comma-separated list of indices to delete. You cannot specify index
694
685
  aliases. By default, this parameter does not support wildcards (`*`) or `_all`.
@@ -751,16 +742,14 @@ class IndicesClient(NamespacedClient):
751
742
  error_trace: t.Optional[bool] = None,
752
743
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
753
744
  human: t.Optional[bool] = None,
754
- master_timeout: t.Optional[
755
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
756
- ] = None,
745
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
757
746
  pretty: t.Optional[bool] = None,
758
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
747
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
759
748
  ) -> ObjectApiResponse[t.Any]:
760
749
  """
761
- Deletes an alias.
750
+ Removes a data stream or index from an alias.
762
751
 
763
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-aliases.html>`_
752
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
764
753
 
765
754
  :param index: Comma-separated list of data streams or indices used to limit the
766
755
  request. Supports wildcards (`*`).
@@ -810,23 +799,22 @@ class IndicesClient(NamespacedClient):
810
799
  expand_wildcards: t.Optional[
811
800
  t.Union[
812
801
  t.Sequence[
813
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
802
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
814
803
  ],
815
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
804
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
816
805
  ]
817
806
  ] = None,
818
807
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
819
808
  human: t.Optional[bool] = None,
820
- master_timeout: t.Optional[
821
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
822
- ] = None,
809
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
823
810
  pretty: t.Optional[bool] = None,
824
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
811
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
825
812
  ) -> ObjectApiResponse[t.Any]:
826
813
  """
827
- Deletes the data stream lifecycle of the selected data streams.
814
+ Removes the data lifecycle from a data stream rendering it not managed by the
815
+ data stream lifecycle
828
816
 
829
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams-delete-lifecycle.html>`_
817
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-delete-lifecycle.html>`_
830
818
 
831
819
  :param name: A comma-separated list of data streams of which the data stream
832
820
  lifecycle will be deleted; use `*` to get all data streams
@@ -873,9 +861,9 @@ class IndicesClient(NamespacedClient):
873
861
  expand_wildcards: t.Optional[
874
862
  t.Union[
875
863
  t.Sequence[
876
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
864
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
877
865
  ],
878
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
866
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
879
867
  ]
880
868
  ] = None,
881
869
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -883,9 +871,9 @@ class IndicesClient(NamespacedClient):
883
871
  pretty: t.Optional[bool] = None,
884
872
  ) -> ObjectApiResponse[t.Any]:
885
873
  """
886
- Deletes a data stream.
874
+ Deletes one or more data streams and their backing indices.
887
875
 
888
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams.html>`_
876
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
889
877
 
890
878
  :param name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions
891
879
  are supported.
@@ -925,16 +913,17 @@ class IndicesClient(NamespacedClient):
925
913
  error_trace: t.Optional[bool] = None,
926
914
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
927
915
  human: t.Optional[bool] = None,
928
- master_timeout: t.Optional[
929
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
930
- ] = None,
916
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
931
917
  pretty: t.Optional[bool] = None,
932
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
918
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
933
919
  ) -> ObjectApiResponse[t.Any]:
934
920
  """
935
- Deletes an index template.
921
+ Delete an index template. The provided <index-template> may contain multiple
922
+ template names separated by a comma. If multiple template names are specified
923
+ then there is no wildcard support and the provided names should match completely
924
+ with existing templates.
936
925
 
937
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-delete-template.html>`_
926
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-delete-template.html>`_
938
927
 
939
928
  :param name: Comma-separated list of index template names used to limit the request.
940
929
  Wildcard (*) expressions are supported.
@@ -979,16 +968,14 @@ class IndicesClient(NamespacedClient):
979
968
  error_trace: t.Optional[bool] = None,
980
969
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
981
970
  human: t.Optional[bool] = None,
982
- master_timeout: t.Optional[
983
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
984
- ] = None,
971
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
985
972
  pretty: t.Optional[bool] = None,
986
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
973
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
987
974
  ) -> ObjectApiResponse[t.Any]:
988
975
  """
989
- Deletes an index template.
976
+ Deletes a legacy index template.
990
977
 
991
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-delete-template-v1.html>`_
978
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-delete-template-v1.html>`_
992
979
 
993
980
  :param name: The name of the legacy index template to delete. Wildcard (`*`)
994
981
  expressions are supported.
@@ -1035,9 +1022,9 @@ class IndicesClient(NamespacedClient):
1035
1022
  expand_wildcards: t.Optional[
1036
1023
  t.Union[
1037
1024
  t.Sequence[
1038
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1025
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1039
1026
  ],
1040
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1027
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1041
1028
  ]
1042
1029
  ] = None,
1043
1030
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1048,9 +1035,9 @@ class IndicesClient(NamespacedClient):
1048
1035
  run_expensive_tasks: t.Optional[bool] = None,
1049
1036
  ) -> ObjectApiResponse[t.Any]:
1050
1037
  """
1051
- Analyzes the disk usage of each field of an index or data stream
1038
+ Analyzes the disk usage of each field of an index or data stream.
1052
1039
 
1053
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-disk-usage.html>`_
1040
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-disk-usage.html>`_
1054
1041
 
1055
1042
  :param index: Comma-separated list of data streams, indices, and aliases used
1056
1043
  to limit the request. It’s recommended to execute this API with a single
@@ -1121,9 +1108,11 @@ class IndicesClient(NamespacedClient):
1121
1108
  pretty: t.Optional[bool] = None,
1122
1109
  ) -> ObjectApiResponse[t.Any]:
1123
1110
  """
1124
- Downsample an index
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.
1125
1114
 
1126
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-downsample-data-stream.html>`_
1115
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-downsample-data-stream.html>`_
1127
1116
 
1128
1117
  :param index: Name of the time series index to downsample.
1129
1118
  :param target_index: Name of the index to create.
@@ -1175,9 +1164,9 @@ class IndicesClient(NamespacedClient):
1175
1164
  expand_wildcards: t.Optional[
1176
1165
  t.Union[
1177
1166
  t.Sequence[
1178
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1167
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1179
1168
  ],
1180
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1169
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1181
1170
  ]
1182
1171
  ] = None,
1183
1172
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1189,9 +1178,9 @@ class IndicesClient(NamespacedClient):
1189
1178
  pretty: t.Optional[bool] = None,
1190
1179
  ) -> HeadApiResponse:
1191
1180
  """
1192
- Returns information about whether a particular index exists.
1181
+ Checks if a data stream, index, or alias exists.
1193
1182
 
1194
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-exists.html>`_
1183
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-exists.html>`_
1195
1184
 
1196
1185
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1197
1186
  wildcards (`*`).
@@ -1255,9 +1244,9 @@ class IndicesClient(NamespacedClient):
1255
1244
  expand_wildcards: t.Optional[
1256
1245
  t.Union[
1257
1246
  t.Sequence[
1258
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1247
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1259
1248
  ],
1260
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1249
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1261
1250
  ]
1262
1251
  ] = None,
1263
1252
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1267,9 +1256,9 @@ class IndicesClient(NamespacedClient):
1267
1256
  pretty: t.Optional[bool] = None,
1268
1257
  ) -> HeadApiResponse:
1269
1258
  """
1270
- Returns information about whether a particular alias exists.
1259
+ Checks if an alias exists.
1271
1260
 
1272
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-aliases.html>`_
1261
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
1273
1262
 
1274
1263
  :param name: Comma-separated list of aliases to check. Supports wildcards (`*`).
1275
1264
  :param index: Comma-separated list of data streams or indices used to limit the
@@ -1333,15 +1322,13 @@ class IndicesClient(NamespacedClient):
1333
1322
  error_trace: t.Optional[bool] = None,
1334
1323
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1335
1324
  human: t.Optional[bool] = None,
1336
- master_timeout: t.Optional[
1337
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
1338
- ] = None,
1325
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1339
1326
  pretty: t.Optional[bool] = None,
1340
1327
  ) -> HeadApiResponse:
1341
1328
  """
1342
1329
  Returns information about whether a particular index template exists.
1343
1330
 
1344
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/index-templates.html>`_
1331
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-templates.html>`_
1345
1332
 
1346
1333
  :param name: Comma-separated list of index template names used to limit the request.
1347
1334
  Wildcard (*) expressions are supported.
@@ -1384,15 +1371,14 @@ class IndicesClient(NamespacedClient):
1384
1371
  flat_settings: t.Optional[bool] = None,
1385
1372
  human: t.Optional[bool] = None,
1386
1373
  local: t.Optional[bool] = None,
1387
- master_timeout: t.Optional[
1388
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
1389
- ] = None,
1374
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1390
1375
  pretty: t.Optional[bool] = None,
1391
1376
  ) -> HeadApiResponse:
1392
1377
  """
1393
- Returns information about whether a particular index template exists.
1378
+ Check existence of index templates. Returns information about whether a particular
1379
+ index template exists.
1394
1380
 
1395
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-template-exists-v1.html>`_
1381
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-template-exists-v1.html>`_
1396
1382
 
1397
1383
  :param name: The comma separated names of the index templates
1398
1384
  :param flat_settings: Return settings in flat format (default: false)
@@ -1438,16 +1424,14 @@ class IndicesClient(NamespacedClient):
1438
1424
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1439
1425
  human: t.Optional[bool] = None,
1440
1426
  include_defaults: t.Optional[bool] = None,
1441
- master_timeout: t.Optional[
1442
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
1443
- ] = None,
1427
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1444
1428
  pretty: t.Optional[bool] = None,
1445
1429
  ) -> ObjectApiResponse[t.Any]:
1446
1430
  """
1447
1431
  Retrieves information about the index's current data stream lifecycle, such as
1448
1432
  any potential encountered error, time since creation etc.
1449
1433
 
1450
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams-explain-lifecycle.html>`_
1434
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-explain-lifecycle.html>`_
1451
1435
 
1452
1436
  :param index: The name of the index to explain
1453
1437
  :param include_defaults: indicates if the API should return the default values
@@ -1491,28 +1475,26 @@ class IndicesClient(NamespacedClient):
1491
1475
  expand_wildcards: t.Optional[
1492
1476
  t.Union[
1493
1477
  t.Sequence[
1494
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1478
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1495
1479
  ],
1496
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1480
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1497
1481
  ]
1498
1482
  ] = None,
1499
1483
  fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1500
1484
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1501
1485
  human: t.Optional[bool] = None,
1502
1486
  ignore_unavailable: t.Optional[bool] = None,
1503
- master_timeout: t.Optional[
1504
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
1505
- ] = None,
1487
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1506
1488
  pretty: t.Optional[bool] = None,
1507
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
1489
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1508
1490
  wait_for_active_shards: t.Optional[
1509
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
1491
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
1510
1492
  ] = None,
1511
1493
  ) -> ObjectApiResponse[t.Any]:
1512
1494
  """
1513
- Returns the field usage stats for each field of an index
1495
+ Returns field usage information for each shard and field of an index.
1514
1496
 
1515
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/field-usage-stats.html>`_
1497
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/field-usage-stats.html>`_
1516
1498
 
1517
1499
  :param index: Comma-separated list or wildcard expression of index names used
1518
1500
  to limit the request.
@@ -1585,9 +1567,9 @@ class IndicesClient(NamespacedClient):
1585
1567
  expand_wildcards: t.Optional[
1586
1568
  t.Union[
1587
1569
  t.Sequence[
1588
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1570
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1589
1571
  ],
1590
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1572
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1591
1573
  ]
1592
1574
  ] = None,
1593
1575
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1598,9 +1580,9 @@ class IndicesClient(NamespacedClient):
1598
1580
  wait_if_ongoing: t.Optional[bool] = None,
1599
1581
  ) -> ObjectApiResponse[t.Any]:
1600
1582
  """
1601
- Performs the flush operation on one or more indices.
1583
+ Flushes one or more data streams or indices.
1602
1584
 
1603
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-flush.html>`_
1585
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-flush.html>`_
1604
1586
 
1605
1587
  :param index: Comma-separated list of data streams, indices, and aliases to flush.
1606
1588
  Supports wildcards (`*`). To flush all data streams and indices, omit this
@@ -1666,9 +1648,9 @@ class IndicesClient(NamespacedClient):
1666
1648
  expand_wildcards: t.Optional[
1667
1649
  t.Union[
1668
1650
  t.Sequence[
1669
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1651
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1670
1652
  ],
1671
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1653
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1672
1654
  ]
1673
1655
  ] = None,
1674
1656
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1683,7 +1665,7 @@ class IndicesClient(NamespacedClient):
1683
1665
  """
1684
1666
  Performs the force merge operation on one or more indices.
1685
1667
 
1686
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-forcemerge.html>`_
1668
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-forcemerge.html>`_
1687
1669
 
1688
1670
  :param index: A comma-separated list of index names; use `_all` or empty string
1689
1671
  to perform the operation on all indices
@@ -1753,17 +1735,15 @@ class IndicesClient(NamespacedClient):
1753
1735
  expand_wildcards: t.Optional[
1754
1736
  t.Union[
1755
1737
  t.Sequence[
1756
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1738
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1757
1739
  ],
1758
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1740
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1759
1741
  ]
1760
1742
  ] = None,
1761
1743
  features: t.Optional[
1762
1744
  t.Union[
1763
- t.Sequence[
1764
- t.Union["t.Literal['aliases', 'mappings', 'settings']", str]
1765
- ],
1766
- t.Union["t.Literal['aliases', 'mappings', 'settings']", str],
1745
+ t.Sequence[t.Union[str, t.Literal["aliases", "mappings", "settings"]]],
1746
+ t.Union[str, t.Literal["aliases", "mappings", "settings"]],
1767
1747
  ]
1768
1748
  ] = None,
1769
1749
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1772,15 +1752,14 @@ class IndicesClient(NamespacedClient):
1772
1752
  ignore_unavailable: t.Optional[bool] = None,
1773
1753
  include_defaults: t.Optional[bool] = None,
1774
1754
  local: t.Optional[bool] = None,
1775
- master_timeout: t.Optional[
1776
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
1777
- ] = None,
1755
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1778
1756
  pretty: t.Optional[bool] = None,
1779
1757
  ) -> ObjectApiResponse[t.Any]:
1780
1758
  """
1781
- Returns information about one or more indices.
1759
+ Returns information about one or more indices. For data streams, the API returns
1760
+ information about the stream’s backing indices.
1782
1761
 
1783
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-get-index.html>`_
1762
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-index.html>`_
1784
1763
 
1785
1764
  :param index: Comma-separated list of data streams, indices, and index aliases
1786
1765
  used to limit the request. Wildcard expressions (*) are supported.
@@ -1855,9 +1834,9 @@ class IndicesClient(NamespacedClient):
1855
1834
  expand_wildcards: t.Optional[
1856
1835
  t.Union[
1857
1836
  t.Sequence[
1858
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1837
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1859
1838
  ],
1860
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1839
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1861
1840
  ]
1862
1841
  ] = None,
1863
1842
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1867,9 +1846,9 @@ class IndicesClient(NamespacedClient):
1867
1846
  pretty: t.Optional[bool] = None,
1868
1847
  ) -> ObjectApiResponse[t.Any]:
1869
1848
  """
1870
- Returns an alias.
1849
+ Retrieves information for one or more aliases.
1871
1850
 
1872
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-aliases.html>`_
1851
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
1873
1852
 
1874
1853
  :param index: Comma-separated list of data streams or indices used to limit the
1875
1854
  request. Supports wildcards (`*`). To target all data streams and indices,
@@ -1937,9 +1916,9 @@ class IndicesClient(NamespacedClient):
1937
1916
  expand_wildcards: t.Optional[
1938
1917
  t.Union[
1939
1918
  t.Sequence[
1940
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1919
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1941
1920
  ],
1942
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1921
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1943
1922
  ]
1944
1923
  ] = None,
1945
1924
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1948,9 +1927,9 @@ class IndicesClient(NamespacedClient):
1948
1927
  pretty: t.Optional[bool] = None,
1949
1928
  ) -> ObjectApiResponse[t.Any]:
1950
1929
  """
1951
- Returns the data stream lifecycle of the selected data streams.
1930
+ Retrieves the data stream lifecycle configuration of one or more data streams.
1952
1931
 
1953
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams-get-lifecycle.html>`_
1932
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-get-lifecycle.html>`_
1954
1933
 
1955
1934
  :param name: Comma-separated list of data streams to limit the request. Supports
1956
1935
  wildcards (`*`). To target all data streams, omit this parameter or use `*`
@@ -1996,9 +1975,9 @@ class IndicesClient(NamespacedClient):
1996
1975
  expand_wildcards: t.Optional[
1997
1976
  t.Union[
1998
1977
  t.Sequence[
1999
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1978
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2000
1979
  ],
2001
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
1980
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2002
1981
  ]
2003
1982
  ] = None,
2004
1983
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -2007,9 +1986,9 @@ class IndicesClient(NamespacedClient):
2007
1986
  pretty: t.Optional[bool] = None,
2008
1987
  ) -> ObjectApiResponse[t.Any]:
2009
1988
  """
2010
- Returns data streams.
1989
+ Retrieves information about one or more data streams.
2011
1990
 
2012
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams.html>`_
1991
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2013
1992
 
2014
1993
  :param name: Comma-separated list of data stream names used to limit the request.
2015
1994
  Wildcard (`*`) expressions are supported. If omitted, all data streams are
@@ -2060,9 +2039,9 @@ class IndicesClient(NamespacedClient):
2060
2039
  expand_wildcards: t.Optional[
2061
2040
  t.Union[
2062
2041
  t.Sequence[
2063
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
2042
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2064
2043
  ],
2065
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
2044
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2066
2045
  ]
2067
2046
  ] = None,
2068
2047
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -2073,9 +2052,10 @@ class IndicesClient(NamespacedClient):
2073
2052
  pretty: t.Optional[bool] = None,
2074
2053
  ) -> ObjectApiResponse[t.Any]:
2075
2054
  """
2076
- Returns mapping for one or more fields.
2055
+ Retrieves mapping definitions for one or more fields. For data streams, the API
2056
+ retrieves field mappings for the stream’s backing indices.
2077
2057
 
2078
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-get-field-mapping.html>`_
2058
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-field-mapping.html>`_
2079
2059
 
2080
2060
  :param fields: Comma-separated list or wildcard expression of fields used to
2081
2061
  limit returned information.
@@ -2146,15 +2126,13 @@ class IndicesClient(NamespacedClient):
2146
2126
  human: t.Optional[bool] = None,
2147
2127
  include_defaults: t.Optional[bool] = None,
2148
2128
  local: t.Optional[bool] = None,
2149
- master_timeout: t.Optional[
2150
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2151
- ] = None,
2129
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2152
2130
  pretty: t.Optional[bool] = None,
2153
2131
  ) -> ObjectApiResponse[t.Any]:
2154
2132
  """
2155
- Returns an index template.
2133
+ Get index templates. Returns information about one or more index templates.
2156
2134
 
2157
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-get-template.html>`_
2135
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-template.html>`_
2158
2136
 
2159
2137
  :param name: Comma-separated list of index template names used to limit the request.
2160
2138
  Wildcard (*) expressions are supported.
@@ -2212,24 +2190,23 @@ class IndicesClient(NamespacedClient):
2212
2190
  expand_wildcards: t.Optional[
2213
2191
  t.Union[
2214
2192
  t.Sequence[
2215
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
2193
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2216
2194
  ],
2217
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
2195
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2218
2196
  ]
2219
2197
  ] = None,
2220
2198
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2221
2199
  human: t.Optional[bool] = None,
2222
2200
  ignore_unavailable: t.Optional[bool] = None,
2223
2201
  local: t.Optional[bool] = None,
2224
- master_timeout: t.Optional[
2225
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2226
- ] = None,
2202
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2227
2203
  pretty: t.Optional[bool] = None,
2228
2204
  ) -> ObjectApiResponse[t.Any]:
2229
2205
  """
2230
- Returns mappings for one or more indices.
2206
+ Retrieves mapping definitions for one or more indices. For data streams, the
2207
+ API retrieves mappings for the stream’s backing indices.
2231
2208
 
2232
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-get-mapping.html>`_
2209
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-mapping.html>`_
2233
2210
 
2234
2211
  :param index: Comma-separated list of data streams, indices, and aliases used
2235
2212
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2296,9 +2273,9 @@ class IndicesClient(NamespacedClient):
2296
2273
  expand_wildcards: t.Optional[
2297
2274
  t.Union[
2298
2275
  t.Sequence[
2299
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
2276
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2300
2277
  ],
2301
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
2278
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2302
2279
  ]
2303
2280
  ] = None,
2304
2281
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -2307,15 +2284,14 @@ class IndicesClient(NamespacedClient):
2307
2284
  ignore_unavailable: t.Optional[bool] = None,
2308
2285
  include_defaults: t.Optional[bool] = None,
2309
2286
  local: t.Optional[bool] = None,
2310
- master_timeout: t.Optional[
2311
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2312
- ] = None,
2287
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2313
2288
  pretty: t.Optional[bool] = None,
2314
2289
  ) -> ObjectApiResponse[t.Any]:
2315
2290
  """
2316
- Returns settings for one or more indices.
2291
+ Returns setting information for one or more indices. For data streams, returns
2292
+ setting information for the stream’s backing indices.
2317
2293
 
2318
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-get-settings.html>`_
2294
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-settings.html>`_
2319
2295
 
2320
2296
  :param index: Comma-separated list of data streams, indices, and aliases used
2321
2297
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2396,15 +2372,13 @@ class IndicesClient(NamespacedClient):
2396
2372
  flat_settings: t.Optional[bool] = None,
2397
2373
  human: t.Optional[bool] = None,
2398
2374
  local: t.Optional[bool] = None,
2399
- master_timeout: t.Optional[
2400
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2401
- ] = None,
2375
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2402
2376
  pretty: t.Optional[bool] = None,
2403
2377
  ) -> ObjectApiResponse[t.Any]:
2404
2378
  """
2405
- Returns an index template.
2379
+ Get index templates. Retrieves information about one or more index templates.
2406
2380
 
2407
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-get-template-v1.html>`_
2381
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-get-template-v1.html>`_
2408
2382
 
2409
2383
  :param name: Comma-separated list of index template names used to limit the request.
2410
2384
  Wildcard (`*`) expressions are supported. To return all index templates,
@@ -2459,9 +2433,16 @@ class IndicesClient(NamespacedClient):
2459
2433
  pretty: t.Optional[bool] = None,
2460
2434
  ) -> ObjectApiResponse[t.Any]:
2461
2435
  """
2462
- Migrates an alias to a data stream
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.
2463
2444
 
2464
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams.html>`_
2445
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2465
2446
 
2466
2447
  :param name: Name of the index alias to convert to a data stream.
2467
2448
  """
@@ -2502,9 +2483,9 @@ class IndicesClient(NamespacedClient):
2502
2483
  body: t.Optional[t.Dict[str, t.Any]] = None,
2503
2484
  ) -> ObjectApiResponse[t.Any]:
2504
2485
  """
2505
- Modifies a data stream
2486
+ Performs one or more data stream modification actions in a single atomic operation.
2506
2487
 
2507
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams.html>`_
2488
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2508
2489
 
2509
2490
  :param actions: Actions to perform.
2510
2491
  """
@@ -2546,27 +2527,25 @@ class IndicesClient(NamespacedClient):
2546
2527
  expand_wildcards: t.Optional[
2547
2528
  t.Union[
2548
2529
  t.Sequence[
2549
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
2530
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2550
2531
  ],
2551
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
2532
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2552
2533
  ]
2553
2534
  ] = None,
2554
2535
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2555
2536
  human: t.Optional[bool] = None,
2556
2537
  ignore_unavailable: t.Optional[bool] = None,
2557
- master_timeout: t.Optional[
2558
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2559
- ] = None,
2538
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2560
2539
  pretty: t.Optional[bool] = None,
2561
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
2540
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2562
2541
  wait_for_active_shards: t.Optional[
2563
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
2542
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
2564
2543
  ] = None,
2565
2544
  ) -> ObjectApiResponse[t.Any]:
2566
2545
  """
2567
- Opens an index.
2546
+ Opens a closed index. For data streams, the API opens any closed backing indices.
2568
2547
 
2569
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-open-close.html>`_
2548
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-open-close.html>`_
2570
2549
 
2571
2550
  :param index: Comma-separated list of data streams, indices, and aliases used
2572
2551
  to limit the request. Supports wildcards (`*`). By default, you must explicitly
@@ -2641,7 +2620,7 @@ class IndicesClient(NamespacedClient):
2641
2620
  Promotes a data stream from a replicated data stream managed by CCR to a regular
2642
2621
  data stream
2643
2622
 
2644
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams.html>`_
2623
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams.html>`_
2645
2624
 
2646
2625
  :param name: The name of the data stream
2647
2626
  """
@@ -2688,19 +2667,17 @@ class IndicesClient(NamespacedClient):
2688
2667
  human: t.Optional[bool] = None,
2689
2668
  index_routing: t.Optional[str] = None,
2690
2669
  is_write_index: t.Optional[bool] = None,
2691
- master_timeout: t.Optional[
2692
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2693
- ] = None,
2670
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2694
2671
  pretty: t.Optional[bool] = None,
2695
2672
  routing: t.Optional[str] = None,
2696
2673
  search_routing: t.Optional[str] = None,
2697
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
2674
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2698
2675
  body: t.Optional[t.Dict[str, t.Any]] = None,
2699
2676
  ) -> ObjectApiResponse[t.Any]:
2700
2677
  """
2701
- Creates or updates an alias.
2678
+ Adds a data stream or index to an alias.
2702
2679
 
2703
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-aliases.html>`_
2680
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
2704
2681
 
2705
2682
  :param index: Comma-separated list of data streams or indices to add. Supports
2706
2683
  wildcards (`*`). Wildcard patterns that match both data streams and indices
@@ -2781,32 +2758,28 @@ class IndicesClient(NamespacedClient):
2781
2758
  self,
2782
2759
  *,
2783
2760
  name: t.Union[str, t.Sequence[str]],
2784
- data_retention: t.Optional[
2785
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2786
- ] = None,
2761
+ data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2787
2762
  downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
2788
2763
  error_trace: t.Optional[bool] = None,
2789
2764
  expand_wildcards: t.Optional[
2790
2765
  t.Union[
2791
2766
  t.Sequence[
2792
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
2767
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2793
2768
  ],
2794
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
2769
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2795
2770
  ]
2796
2771
  ] = None,
2797
2772
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2798
2773
  human: t.Optional[bool] = None,
2799
- master_timeout: t.Optional[
2800
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
2801
- ] = None,
2774
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2802
2775
  pretty: t.Optional[bool] = None,
2803
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
2776
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2804
2777
  body: t.Optional[t.Dict[str, t.Any]] = None,
2805
2778
  ) -> ObjectApiResponse[t.Any]:
2806
2779
  """
2807
- Updates the data stream lifecycle of the selected data streams.
2780
+ Update the data lifecycle of the specified data streams.
2808
2781
 
2809
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/data-streams-put-lifecycle.html>`_
2782
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/data-streams-put-lifecycle.html>`_
2810
2783
 
2811
2784
  :param name: Comma-separated list of data streams used to limit the request.
2812
2785
  Supports wildcards (`*`). To target all data streams use `*` or `_all`.
@@ -2868,8 +2841,11 @@ class IndicesClient(NamespacedClient):
2868
2841
 
2869
2842
  @_rewrite_parameters(
2870
2843
  body_fields=(
2844
+ "allow_auto_create",
2871
2845
  "composed_of",
2872
2846
  "data_stream",
2847
+ "deprecated",
2848
+ "ignore_missing_component_templates",
2873
2849
  "index_patterns",
2874
2850
  "meta",
2875
2851
  "priority",
@@ -2882,13 +2858,18 @@ class IndicesClient(NamespacedClient):
2882
2858
  self,
2883
2859
  *,
2884
2860
  name: str,
2861
+ allow_auto_create: t.Optional[bool] = None,
2862
+ cause: t.Optional[str] = None,
2885
2863
  composed_of: t.Optional[t.Sequence[str]] = None,
2886
2864
  create: t.Optional[bool] = None,
2887
2865
  data_stream: t.Optional[t.Mapping[str, t.Any]] = None,
2866
+ deprecated: t.Optional[bool] = None,
2888
2867
  error_trace: t.Optional[bool] = None,
2889
2868
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2890
2869
  human: t.Optional[bool] = None,
2870
+ ignore_missing_component_templates: t.Optional[t.Sequence[str]] = None,
2891
2871
  index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2872
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2892
2873
  meta: t.Optional[t.Mapping[str, t.Any]] = None,
2893
2874
  pretty: t.Optional[bool] = None,
2894
2875
  priority: t.Optional[int] = None,
@@ -2897,11 +2878,19 @@ class IndicesClient(NamespacedClient):
2897
2878
  body: t.Optional[t.Dict[str, t.Any]] = None,
2898
2879
  ) -> ObjectApiResponse[t.Any]:
2899
2880
  """
2900
- Creates or updates an index template.
2881
+ Create or update an index template. Index templates define settings, mappings,
2882
+ and aliases that can be applied automatically to new indices.
2901
2883
 
2902
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-put-template.html>`_
2884
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-put-template.html>`_
2903
2885
 
2904
2886
  :param name: Index or template name
2887
+ :param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
2888
+ cluster setting. If set to `true` in a template, then indices can be automatically
2889
+ created using that template even if auto-creation of indices is disabled
2890
+ via `actions.auto_create_index`. If set to `false`, then indices or data
2891
+ streams matching the template must always be explicitly created, and may
2892
+ never be automatically created.
2893
+ :param cause: User defined reason for creating/updating the index template
2905
2894
  :param composed_of: An ordered list of component template names. Component templates
2906
2895
  are merged in the order specified, meaning that the last component template
2907
2896
  specified has the highest precedence.
@@ -2910,7 +2899,16 @@ class IndicesClient(NamespacedClient):
2910
2899
  :param data_stream: If this object is included, the template is used to create
2911
2900
  data streams and their backing indices. Supports an empty object. Data streams
2912
2901
  require a matching index template with a `data_stream` object.
2902
+ :param deprecated: Marks this index template as deprecated. When creating or
2903
+ updating a non-deprecated index template that uses deprecated components,
2904
+ Elasticsearch will emit a deprecation warning.
2905
+ :param ignore_missing_component_templates: The configuration option ignore_missing_component_templates
2906
+ can be used when an index template references a component template that might
2907
+ not exist
2913
2908
  :param index_patterns: Name of the index template to create.
2909
+ :param master_timeout: Period to wait for a connection to the master node. If
2910
+ no response is received before the timeout expires, the request fails and
2911
+ returns an error.
2914
2912
  :param meta: Optional user metadata about the index template. May have any contents.
2915
2913
  This map is not automatically generated by Elasticsearch.
2916
2914
  :param priority: Priority to determine index template precedence when a new data
@@ -2929,6 +2927,8 @@ class IndicesClient(NamespacedClient):
2929
2927
  __path = f'/_index_template/{__path_parts["name"]}'
2930
2928
  __query: t.Dict[str, t.Any] = {}
2931
2929
  __body: t.Dict[str, t.Any] = body if body is not None else {}
2930
+ if cause is not None:
2931
+ __query["cause"] = cause
2932
2932
  if create is not None:
2933
2933
  __query["create"] = create
2934
2934
  if error_trace is not None:
@@ -2937,13 +2937,23 @@ class IndicesClient(NamespacedClient):
2937
2937
  __query["filter_path"] = filter_path
2938
2938
  if human is not None:
2939
2939
  __query["human"] = human
2940
+ if master_timeout is not None:
2941
+ __query["master_timeout"] = master_timeout
2940
2942
  if pretty is not None:
2941
2943
  __query["pretty"] = pretty
2942
2944
  if not __body:
2945
+ if allow_auto_create is not None:
2946
+ __body["allow_auto_create"] = allow_auto_create
2943
2947
  if composed_of is not None:
2944
2948
  __body["composed_of"] = composed_of
2945
2949
  if data_stream is not None:
2946
2950
  __body["data_stream"] = data_stream
2951
+ if deprecated is not None:
2952
+ __body["deprecated"] = deprecated
2953
+ if ignore_missing_component_templates is not None:
2954
+ __body["ignore_missing_component_templates"] = (
2955
+ ignore_missing_component_templates
2956
+ )
2947
2957
  if index_patterns is not None:
2948
2958
  __body["index_patterns"] = index_patterns
2949
2959
  if meta is not None:
@@ -2993,7 +3003,7 @@ class IndicesClient(NamespacedClient):
2993
3003
  allow_no_indices: t.Optional[bool] = None,
2994
3004
  date_detection: t.Optional[bool] = None,
2995
3005
  dynamic: t.Optional[
2996
- t.Union["t.Literal['false', 'runtime', 'strict', 'true']", str]
3006
+ t.Union[str, t.Literal["false", "runtime", "strict", "true"]]
2997
3007
  ] = None,
2998
3008
  dynamic_date_formats: t.Optional[t.Sequence[str]] = None,
2999
3009
  dynamic_templates: t.Optional[
@@ -3006,18 +3016,16 @@ class IndicesClient(NamespacedClient):
3006
3016
  expand_wildcards: t.Optional[
3007
3017
  t.Union[
3008
3018
  t.Sequence[
3009
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3019
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3010
3020
  ],
3011
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3021
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3012
3022
  ]
3013
3023
  ] = None,
3014
3024
  field_names: t.Optional[t.Mapping[str, t.Any]] = None,
3015
3025
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3016
3026
  human: t.Optional[bool] = None,
3017
3027
  ignore_unavailable: t.Optional[bool] = None,
3018
- master_timeout: t.Optional[
3019
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
3020
- ] = None,
3028
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3021
3029
  meta: t.Optional[t.Mapping[str, t.Any]] = None,
3022
3030
  numeric_detection: t.Optional[bool] = None,
3023
3031
  pretty: t.Optional[bool] = None,
@@ -3025,14 +3033,16 @@ class IndicesClient(NamespacedClient):
3025
3033
  routing: t.Optional[t.Mapping[str, t.Any]] = None,
3026
3034
  runtime: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
3027
3035
  source: t.Optional[t.Mapping[str, t.Any]] = None,
3028
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
3036
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3029
3037
  write_index_only: t.Optional[bool] = None,
3030
3038
  body: t.Optional[t.Dict[str, t.Any]] = None,
3031
3039
  ) -> ObjectApiResponse[t.Any]:
3032
3040
  """
3033
- Updates the index mappings.
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.
3034
3044
 
3035
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-put-mapping.html>`_
3045
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-put-mapping.html>`_
3036
3046
 
3037
3047
  :param index: A comma-separated list of index names the mapping should be added
3038
3048
  to (supports wildcards); use `_all` or omit to add the mapping on all indices.
@@ -3144,26 +3154,25 @@ class IndicesClient(NamespacedClient):
3144
3154
  expand_wildcards: t.Optional[
3145
3155
  t.Union[
3146
3156
  t.Sequence[
3147
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3157
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3148
3158
  ],
3149
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3159
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3150
3160
  ]
3151
3161
  ] = None,
3152
3162
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3153
3163
  flat_settings: t.Optional[bool] = None,
3154
3164
  human: t.Optional[bool] = None,
3155
3165
  ignore_unavailable: t.Optional[bool] = None,
3156
- master_timeout: t.Optional[
3157
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
3158
- ] = None,
3166
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3159
3167
  preserve_existing: t.Optional[bool] = None,
3160
3168
  pretty: t.Optional[bool] = None,
3161
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
3169
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3162
3170
  ) -> ObjectApiResponse[t.Any]:
3163
3171
  """
3164
- Updates the index settings.
3172
+ Changes a dynamic index setting in real time. For data streams, index setting
3173
+ changes are applied to all backing indices by default.
3165
3174
 
3166
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-update-settings.html>`_
3175
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-update-settings.html>`_
3167
3176
 
3168
3177
  :param settings:
3169
3178
  :param index: Comma-separated list of data streams, indices, and aliases used
@@ -3250,33 +3259,31 @@ class IndicesClient(NamespacedClient):
3250
3259
  *,
3251
3260
  name: str,
3252
3261
  aliases: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
3262
+ cause: t.Optional[str] = None,
3253
3263
  create: t.Optional[bool] = None,
3254
3264
  error_trace: t.Optional[bool] = None,
3255
3265
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3256
- flat_settings: t.Optional[bool] = None,
3257
3266
  human: t.Optional[bool] = None,
3258
3267
  index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3259
3268
  mappings: t.Optional[t.Mapping[str, t.Any]] = None,
3260
- master_timeout: t.Optional[
3261
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
3262
- ] = None,
3269
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3263
3270
  order: t.Optional[int] = None,
3264
3271
  pretty: t.Optional[bool] = None,
3265
3272
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
3266
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
3267
3273
  version: t.Optional[int] = None,
3268
3274
  body: t.Optional[t.Dict[str, t.Any]] = None,
3269
3275
  ) -> ObjectApiResponse[t.Any]:
3270
3276
  """
3271
- Creates or updates an index template.
3277
+ Create or update an index template. Index templates define settings, mappings,
3278
+ and aliases that can be applied automatically to new indices.
3272
3279
 
3273
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-templates-v1.html>`_
3280
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-templates-v1.html>`_
3274
3281
 
3275
3282
  :param name: The name of the template
3276
3283
  :param aliases: Aliases for the index.
3284
+ :param cause:
3277
3285
  :param create: If true, this request cannot replace or update existing index
3278
3286
  templates.
3279
- :param flat_settings: If `true`, returns settings in flat format.
3280
3287
  :param index_patterns: Array of wildcard expressions used to match the names
3281
3288
  of indices during creation.
3282
3289
  :param mappings: Mapping for fields in the index.
@@ -3288,8 +3295,6 @@ class IndicesClient(NamespacedClient):
3288
3295
  Templates with higher 'order' values are merged later, overriding templates
3289
3296
  with lower values.
3290
3297
  :param settings: Configuration options for the index.
3291
- :param timeout: Period to wait for a response. If no response is received before
3292
- the timeout expires, the request fails and returns an error.
3293
3298
  :param version: Version number used to manage index templates externally. This
3294
3299
  number is not automatically generated by Elasticsearch.
3295
3300
  """
@@ -3299,22 +3304,20 @@ class IndicesClient(NamespacedClient):
3299
3304
  __path = f'/_template/{__path_parts["name"]}'
3300
3305
  __query: t.Dict[str, t.Any] = {}
3301
3306
  __body: t.Dict[str, t.Any] = body if body is not None else {}
3307
+ if cause is not None:
3308
+ __query["cause"] = cause
3302
3309
  if create is not None:
3303
3310
  __query["create"] = create
3304
3311
  if error_trace is not None:
3305
3312
  __query["error_trace"] = error_trace
3306
3313
  if filter_path is not None:
3307
3314
  __query["filter_path"] = filter_path
3308
- if flat_settings is not None:
3309
- __query["flat_settings"] = flat_settings
3310
3315
  if human is not None:
3311
3316
  __query["human"] = human
3312
3317
  if master_timeout is not None:
3313
3318
  __query["master_timeout"] = master_timeout
3314
3319
  if pretty is not None:
3315
3320
  __query["pretty"] = pretty
3316
- if timeout is not None:
3317
- __query["timeout"] = timeout
3318
3321
  if not __body:
3319
3322
  if aliases is not None:
3320
3323
  __body["aliases"] = aliases
@@ -3352,9 +3355,11 @@ class IndicesClient(NamespacedClient):
3352
3355
  pretty: t.Optional[bool] = None,
3353
3356
  ) -> ObjectApiResponse[t.Any]:
3354
3357
  """
3355
- Returns information about ongoing index shard recoveries.
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.
3356
3361
 
3357
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-recovery.html>`_
3362
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-recovery.html>`_
3358
3363
 
3359
3364
  :param index: Comma-separated list of data streams, indices, and aliases used
3360
3365
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3403,9 +3408,9 @@ class IndicesClient(NamespacedClient):
3403
3408
  expand_wildcards: t.Optional[
3404
3409
  t.Union[
3405
3410
  t.Sequence[
3406
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3411
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3407
3412
  ],
3408
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3413
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3409
3414
  ]
3410
3415
  ] = None,
3411
3416
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3414,9 +3419,11 @@ class IndicesClient(NamespacedClient):
3414
3419
  pretty: t.Optional[bool] = None,
3415
3420
  ) -> ObjectApiResponse[t.Any]:
3416
3421
  """
3417
- Performs the refresh operation in one or more indices.
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.
3418
3425
 
3419
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-refresh.html>`_
3426
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-refresh.html>`_
3420
3427
 
3421
3428
  :param index: Comma-separated list of data streams, indices, and aliases used
3422
3429
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3473,9 +3480,9 @@ class IndicesClient(NamespacedClient):
3473
3480
  expand_wildcards: t.Optional[
3474
3481
  t.Union[
3475
3482
  t.Sequence[
3476
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3483
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3477
3484
  ],
3478
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3485
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3479
3486
  ]
3480
3487
  ] = None,
3481
3488
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3486,7 +3493,7 @@ class IndicesClient(NamespacedClient):
3486
3493
  """
3487
3494
  Reloads an index's search analyzers and their resources.
3488
3495
 
3489
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-reload-analyzers.html>`_
3496
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-reload-analyzers.html>`_
3490
3497
 
3491
3498
  :param index: A comma-separated list of index names to reload analyzers for
3492
3499
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
@@ -3536,9 +3543,9 @@ class IndicesClient(NamespacedClient):
3536
3543
  expand_wildcards: t.Optional[
3537
3544
  t.Union[
3538
3545
  t.Sequence[
3539
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3546
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3540
3547
  ],
3541
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3548
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3542
3549
  ]
3543
3550
  ] = None,
3544
3551
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3549,9 +3556,10 @@ class IndicesClient(NamespacedClient):
3549
3556
  ) -> ObjectApiResponse[t.Any]:
3550
3557
  """
3551
3558
  Resolves the specified index expressions to return information about each cluster,
3552
- including the local cluster, if included.
3559
+ including the local cluster, if included. Multiple patterns and remote clusters
3560
+ are supported.
3553
3561
 
3554
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-resolve-cluster-api.html>`_
3562
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-resolve-cluster-api.html>`_
3555
3563
 
3556
3564
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3557
3565
  and data streams to resolve. Resources on remote clusters can be specified
@@ -3610,9 +3618,9 @@ class IndicesClient(NamespacedClient):
3610
3618
  expand_wildcards: t.Optional[
3611
3619
  t.Union[
3612
3620
  t.Sequence[
3613
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3621
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3614
3622
  ],
3615
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3623
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3616
3624
  ]
3617
3625
  ] = None,
3618
3626
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3620,9 +3628,10 @@ class IndicesClient(NamespacedClient):
3620
3628
  pretty: t.Optional[bool] = None,
3621
3629
  ) -> ObjectApiResponse[t.Any]:
3622
3630
  """
3623
- Returns information about any matching indices, aliases, and data streams
3631
+ Resolves the specified name(s) and/or index patterns for indices, aliases, and
3632
+ data streams. Multiple patterns and remote clusters are supported.
3624
3633
 
3625
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-resolve-index-api.html>`_
3634
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-resolve-index-api.html>`_
3626
3635
 
3627
3636
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3628
3637
  and data streams to resolve. Resources on remote clusters can be specified
@@ -3672,22 +3681,19 @@ class IndicesClient(NamespacedClient):
3672
3681
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3673
3682
  human: t.Optional[bool] = None,
3674
3683
  mappings: t.Optional[t.Mapping[str, t.Any]] = None,
3675
- master_timeout: t.Optional[
3676
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
3677
- ] = None,
3684
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3678
3685
  pretty: t.Optional[bool] = None,
3679
3686
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
3680
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
3687
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3681
3688
  wait_for_active_shards: t.Optional[
3682
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
3689
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
3683
3690
  ] = None,
3684
3691
  body: t.Optional[t.Dict[str, t.Any]] = None,
3685
3692
  ) -> ObjectApiResponse[t.Any]:
3686
3693
  """
3687
- Updates an alias to point to a new index when the existing index is considered
3688
- to be too large or too old.
3694
+ Creates a new index for a data stream or index alias.
3689
3695
 
3690
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-rollover-index.html>`_
3696
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-rollover-index.html>`_
3691
3697
 
3692
3698
  :param alias: Name of the data stream or index alias to roll over.
3693
3699
  :param new_index: Name of the index to create. Supports date math. Data streams
@@ -3778,9 +3784,9 @@ class IndicesClient(NamespacedClient):
3778
3784
  expand_wildcards: t.Optional[
3779
3785
  t.Union[
3780
3786
  t.Sequence[
3781
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3787
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3782
3788
  ],
3783
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3789
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3784
3790
  ]
3785
3791
  ] = None,
3786
3792
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3790,9 +3796,10 @@ class IndicesClient(NamespacedClient):
3790
3796
  verbose: t.Optional[bool] = None,
3791
3797
  ) -> ObjectApiResponse[t.Any]:
3792
3798
  """
3793
- Provides low-level information about segments in a Lucene index.
3799
+ Returns low-level information about the Lucene segments in index shards. For
3800
+ data streams, the API returns information about the stream’s backing indices.
3794
3801
 
3795
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-segments.html>`_
3802
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-segments.html>`_
3796
3803
 
3797
3804
  :param index: Comma-separated list of data streams, indices, and aliases used
3798
3805
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3852,9 +3859,9 @@ class IndicesClient(NamespacedClient):
3852
3859
  expand_wildcards: t.Optional[
3853
3860
  t.Union[
3854
3861
  t.Sequence[
3855
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3862
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3856
3863
  ],
3857
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3864
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3858
3865
  ]
3859
3866
  ] = None,
3860
3867
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -3863,15 +3870,16 @@ class IndicesClient(NamespacedClient):
3863
3870
  pretty: t.Optional[bool] = None,
3864
3871
  status: t.Optional[
3865
3872
  t.Union[
3866
- t.Sequence[t.Union["t.Literal['all', 'green', 'red', 'yellow']", str]],
3867
- t.Union["t.Literal['all', 'green', 'red', 'yellow']", str],
3873
+ t.Sequence[t.Union[str, t.Literal["all", "green", "red", "yellow"]]],
3874
+ t.Union[str, t.Literal["all", "green", "red", "yellow"]],
3868
3875
  ]
3869
3876
  ] = None,
3870
3877
  ) -> ObjectApiResponse[t.Any]:
3871
3878
  """
3872
- Provides store information for shard copies of indices.
3879
+ Retrieves store information about replica shards in one or more indices. For
3880
+ data streams, the API retrieves store information for the stream’s backing indices.
3873
3881
 
3874
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-shards-stores.html>`_
3882
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-shards-stores.html>`_
3875
3883
 
3876
3884
  :param index: List of data streams, indices, and aliases used to limit the request.
3877
3885
  :param allow_no_indices: If false, the request returns an error if any wildcard
@@ -3930,21 +3938,19 @@ class IndicesClient(NamespacedClient):
3930
3938
  error_trace: t.Optional[bool] = None,
3931
3939
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3932
3940
  human: t.Optional[bool] = None,
3933
- master_timeout: t.Optional[
3934
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
3935
- ] = None,
3941
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3936
3942
  pretty: t.Optional[bool] = None,
3937
3943
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
3938
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
3944
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3939
3945
  wait_for_active_shards: t.Optional[
3940
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
3946
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
3941
3947
  ] = None,
3942
3948
  body: t.Optional[t.Dict[str, t.Any]] = None,
3943
3949
  ) -> ObjectApiResponse[t.Any]:
3944
3950
  """
3945
- Allow to shrink an existing index into a new index with fewer primary shards.
3951
+ Shrinks an existing index into a new index with fewer primary shards.
3946
3952
 
3947
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-shrink-index.html>`_
3953
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-shrink-index.html>`_
3948
3954
 
3949
3955
  :param index: Name of the source index to shrink.
3950
3956
  :param target: Name of the target index to create.
@@ -4004,11 +4010,65 @@ class IndicesClient(NamespacedClient):
4004
4010
  path_parts=__path_parts,
4005
4011
  )
4006
4012
 
4013
+ @_rewrite_parameters()
4014
+ async def simulate_index_template(
4015
+ self,
4016
+ *,
4017
+ name: str,
4018
+ error_trace: t.Optional[bool] = None,
4019
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4020
+ human: t.Optional[bool] = None,
4021
+ include_defaults: t.Optional[bool] = None,
4022
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4023
+ pretty: t.Optional[bool] = None,
4024
+ ) -> ObjectApiResponse[t.Any]:
4025
+ """
4026
+ Simulate an index. Returns the index configuration that would be applied to the
4027
+ specified index from an existing index template.
4028
+
4029
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-simulate-index.html>`_
4030
+
4031
+ :param name: Name of the index to simulate
4032
+ :param include_defaults: If true, returns all relevant default configurations
4033
+ for the index template.
4034
+ :param master_timeout: Period to wait for a connection to the master node. If
4035
+ no response is received before the timeout expires, the request fails and
4036
+ returns an error.
4037
+ """
4038
+ if name in SKIP_IN_PATH:
4039
+ raise ValueError("Empty value passed for parameter 'name'")
4040
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
4041
+ __path = f'/_index_template/_simulate_index/{__path_parts["name"]}'
4042
+ __query: t.Dict[str, t.Any] = {}
4043
+ if error_trace is not None:
4044
+ __query["error_trace"] = error_trace
4045
+ if filter_path is not None:
4046
+ __query["filter_path"] = filter_path
4047
+ if human is not None:
4048
+ __query["human"] = human
4049
+ if include_defaults is not None:
4050
+ __query["include_defaults"] = include_defaults
4051
+ if master_timeout is not None:
4052
+ __query["master_timeout"] = master_timeout
4053
+ if pretty is not None:
4054
+ __query["pretty"] = pretty
4055
+ __headers = {"accept": "application/json"}
4056
+ return await self.perform_request( # type: ignore[return-value]
4057
+ "POST",
4058
+ __path,
4059
+ params=__query,
4060
+ headers=__headers,
4061
+ endpoint_id="indices.simulate_index_template",
4062
+ path_parts=__path_parts,
4063
+ )
4064
+
4007
4065
  @_rewrite_parameters(
4008
4066
  body_fields=(
4009
4067
  "allow_auto_create",
4010
4068
  "composed_of",
4011
4069
  "data_stream",
4070
+ "deprecated",
4071
+ "ignore_missing_component_templates",
4012
4072
  "index_patterns",
4013
4073
  "meta",
4014
4074
  "priority",
@@ -4017,22 +4077,22 @@ class IndicesClient(NamespacedClient):
4017
4077
  ),
4018
4078
  parameter_aliases={"_meta": "meta"},
4019
4079
  )
4020
- async def simulate_index_template(
4080
+ async def simulate_template(
4021
4081
  self,
4022
4082
  *,
4023
- name: str,
4083
+ name: t.Optional[str] = None,
4024
4084
  allow_auto_create: t.Optional[bool] = None,
4025
4085
  composed_of: t.Optional[t.Sequence[str]] = None,
4026
4086
  create: t.Optional[bool] = None,
4027
4087
  data_stream: t.Optional[t.Mapping[str, t.Any]] = None,
4088
+ deprecated: t.Optional[bool] = None,
4028
4089
  error_trace: t.Optional[bool] = None,
4029
4090
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4030
4091
  human: t.Optional[bool] = None,
4092
+ ignore_missing_component_templates: t.Optional[t.Sequence[str]] = None,
4031
4093
  include_defaults: t.Optional[bool] = None,
4032
4094
  index_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4033
- master_timeout: t.Optional[
4034
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
4035
- ] = None,
4095
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4036
4096
  meta: t.Optional[t.Mapping[str, t.Any]] = None,
4037
4097
  pretty: t.Optional[bool] = None,
4038
4098
  priority: t.Optional[int] = None,
@@ -4041,11 +4101,14 @@ class IndicesClient(NamespacedClient):
4041
4101
  body: t.Optional[t.Dict[str, t.Any]] = None,
4042
4102
  ) -> ObjectApiResponse[t.Any]:
4043
4103
  """
4044
- Simulate matching the given index name against the index templates in the system
4104
+ Simulate an index template. Returns the index configuration that would be applied
4105
+ by a particular index template.
4045
4106
 
4046
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-simulate-index.html>`_
4107
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-simulate-template.html>`_
4047
4108
 
4048
- :param name: Index or template name to simulate
4109
+ :param name: Name of the index template to simulate. To test a template configuration
4110
+ before you add it to the cluster, omit this parameter and specify the template
4111
+ configuration in the request body.
4049
4112
  :param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
4050
4113
  cluster setting. If set to `true` in a template, then indices can be automatically
4051
4114
  created using that template even if auto-creation of indices is disabled
@@ -4055,13 +4118,19 @@ class IndicesClient(NamespacedClient):
4055
4118
  :param composed_of: An ordered list of component template names. Component templates
4056
4119
  are merged in the order specified, meaning that the last component template
4057
4120
  specified has the highest precedence.
4058
- :param create: If `true`, the template passed in the body is only used if no
4059
- existing templates match the same index patterns. If `false`, the simulation
4060
- uses the template with the highest priority. Note that the template is not
4061
- permanently added or updated in either case; it is only used for the simulation.
4121
+ :param create: If true, the template passed in the body is only used if no existing
4122
+ templates match the same index patterns. If false, the simulation uses the
4123
+ template with the highest priority. Note that the template is not permanently
4124
+ added or updated in either case; it is only used for the simulation.
4062
4125
  :param data_stream: If this object is included, the template is used to create
4063
4126
  data streams and their backing indices. Supports an empty object. Data streams
4064
4127
  require a matching index template with a `data_stream` object.
4128
+ :param deprecated: Marks this index template as deprecated. When creating or
4129
+ updating a non-deprecated index template that uses deprecated components,
4130
+ Elasticsearch will emit a deprecation warning.
4131
+ :param ignore_missing_component_templates: The configuration option ignore_missing_component_templates
4132
+ can be used when an index template references a component template that might
4133
+ not exist
4065
4134
  :param include_defaults: If true, returns all relevant default configurations
4066
4135
  for the index template.
4067
4136
  :param index_patterns: Array of wildcard (`*`) expressions used to match the
@@ -4081,10 +4150,13 @@ class IndicesClient(NamespacedClient):
4081
4150
  :param version: Version number used to manage index templates externally. This
4082
4151
  number is not automatically generated by Elasticsearch.
4083
4152
  """
4084
- if name in SKIP_IN_PATH:
4085
- raise ValueError("Empty value passed for parameter 'name'")
4086
- __path_parts: t.Dict[str, str] = {"name": _quote(name)}
4087
- __path = f'/_index_template/_simulate_index/{__path_parts["name"]}'
4153
+ __path_parts: t.Dict[str, str]
4154
+ if name not in SKIP_IN_PATH:
4155
+ __path_parts = {"name": _quote(name)}
4156
+ __path = f'/_index_template/_simulate/{__path_parts["name"]}'
4157
+ else:
4158
+ __path_parts = {}
4159
+ __path = "/_index_template/_simulate"
4088
4160
  __query: t.Dict[str, t.Any] = {}
4089
4161
  __body: t.Dict[str, t.Any] = body if body is not None else {}
4090
4162
  if create is not None:
@@ -4108,6 +4180,12 @@ class IndicesClient(NamespacedClient):
4108
4180
  __body["composed_of"] = composed_of
4109
4181
  if data_stream is not None:
4110
4182
  __body["data_stream"] = data_stream
4183
+ if deprecated is not None:
4184
+ __body["deprecated"] = deprecated
4185
+ if ignore_missing_component_templates is not None:
4186
+ __body["ignore_missing_component_templates"] = (
4187
+ ignore_missing_component_templates
4188
+ )
4111
4189
  if index_patterns is not None:
4112
4190
  __body["index_patterns"] = index_patterns
4113
4191
  if meta is not None:
@@ -4121,88 +4199,6 @@ class IndicesClient(NamespacedClient):
4121
4199
  if not __body:
4122
4200
  __body = None # type: ignore[assignment]
4123
4201
  __headers = {"accept": "application/json"}
4124
- if __body is not None:
4125
- __headers["content-type"] = "application/json"
4126
- return await self.perform_request( # type: ignore[return-value]
4127
- "POST",
4128
- __path,
4129
- params=__query,
4130
- headers=__headers,
4131
- body=__body,
4132
- endpoint_id="indices.simulate_index_template",
4133
- path_parts=__path_parts,
4134
- )
4135
-
4136
- @_rewrite_parameters(
4137
- body_name="template",
4138
- )
4139
- async def simulate_template(
4140
- self,
4141
- *,
4142
- name: t.Optional[str] = None,
4143
- create: t.Optional[bool] = None,
4144
- error_trace: t.Optional[bool] = None,
4145
- filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4146
- human: t.Optional[bool] = None,
4147
- include_defaults: t.Optional[bool] = None,
4148
- master_timeout: t.Optional[
4149
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
4150
- ] = None,
4151
- pretty: t.Optional[bool] = None,
4152
- template: t.Optional[t.Mapping[str, t.Any]] = None,
4153
- body: t.Optional[t.Mapping[str, t.Any]] = None,
4154
- ) -> ObjectApiResponse[t.Any]:
4155
- """
4156
- Simulate resolving the given template name or body
4157
-
4158
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-simulate-template.html>`_
4159
-
4160
- :param name: Name of the index template to simulate. To test a template configuration
4161
- before you add it to the cluster, omit this parameter and specify the template
4162
- configuration in the request body.
4163
- :param create: If true, the template passed in the body is only used if no existing
4164
- templates match the same index patterns. If false, the simulation uses the
4165
- template with the highest priority. Note that the template is not permanently
4166
- added or updated in either case; it is only used for the simulation.
4167
- :param include_defaults: If true, returns all relevant default configurations
4168
- for the index template.
4169
- :param master_timeout: Period to wait for a connection to the master node. If
4170
- no response is received before the timeout expires, the request fails and
4171
- returns an error.
4172
- :param template:
4173
- """
4174
- if template is None and body is None:
4175
- raise ValueError(
4176
- "Empty value passed for parameters 'template' and 'body', one of them should be set."
4177
- )
4178
- elif template is not None and body is not None:
4179
- raise ValueError("Cannot set both 'template' and 'body'")
4180
- __path_parts: t.Dict[str, str]
4181
- if name not in SKIP_IN_PATH:
4182
- __path_parts = {"name": _quote(name)}
4183
- __path = f'/_index_template/_simulate/{__path_parts["name"]}'
4184
- else:
4185
- __path_parts = {}
4186
- __path = "/_index_template/_simulate"
4187
- __query: t.Dict[str, t.Any] = {}
4188
- if create is not None:
4189
- __query["create"] = create
4190
- if error_trace is not None:
4191
- __query["error_trace"] = error_trace
4192
- if filter_path is not None:
4193
- __query["filter_path"] = filter_path
4194
- if human is not None:
4195
- __query["human"] = human
4196
- if include_defaults is not None:
4197
- __query["include_defaults"] = include_defaults
4198
- if master_timeout is not None:
4199
- __query["master_timeout"] = master_timeout
4200
- if pretty is not None:
4201
- __query["pretty"] = pretty
4202
- __body = template if template is not None else body
4203
- if not __body:
4204
- __body = None
4205
- __headers = {"accept": "application/json"}
4206
4202
  if __body is not None:
4207
4203
  __headers["content-type"] = "application/json"
4208
4204
  return await self.perform_request( # type: ignore[return-value]
@@ -4227,21 +4223,19 @@ class IndicesClient(NamespacedClient):
4227
4223
  error_trace: t.Optional[bool] = None,
4228
4224
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4229
4225
  human: t.Optional[bool] = None,
4230
- master_timeout: t.Optional[
4231
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
4232
- ] = None,
4226
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4233
4227
  pretty: t.Optional[bool] = None,
4234
4228
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
4235
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4229
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4236
4230
  wait_for_active_shards: t.Optional[
4237
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
4231
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
4238
4232
  ] = None,
4239
4233
  body: t.Optional[t.Dict[str, t.Any]] = None,
4240
4234
  ) -> ObjectApiResponse[t.Any]:
4241
4235
  """
4242
- Allows you to split an existing index into a new index with more primary shards.
4236
+ Splits an existing index into a new index with more primary shards.
4243
4237
 
4244
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-split-index.html>`_
4238
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-split-index.html>`_
4245
4239
 
4246
4240
  :param index: Name of the source index to split.
4247
4241
  :param target: Name of the target index to create.
@@ -4312,9 +4306,9 @@ class IndicesClient(NamespacedClient):
4312
4306
  expand_wildcards: t.Optional[
4313
4307
  t.Union[
4314
4308
  t.Sequence[
4315
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
4309
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4316
4310
  ],
4317
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
4311
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4318
4312
  ]
4319
4313
  ] = None,
4320
4314
  fielddata_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -4326,14 +4320,15 @@ class IndicesClient(NamespacedClient):
4326
4320
  include_segment_file_sizes: t.Optional[bool] = None,
4327
4321
  include_unloaded_segments: t.Optional[bool] = None,
4328
4322
  level: t.Optional[
4329
- t.Union["t.Literal['cluster', 'indices', 'shards']", str]
4323
+ t.Union[str, t.Literal["cluster", "indices", "shards"]]
4330
4324
  ] = None,
4331
4325
  pretty: t.Optional[bool] = None,
4332
4326
  ) -> ObjectApiResponse[t.Any]:
4333
4327
  """
4334
- Provides statistics on operations happening in an index.
4328
+ Returns statistics for one or more indices. For data streams, the API retrieves
4329
+ statistics for the stream’s backing indices.
4335
4330
 
4336
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-stats.html>`_
4331
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-stats.html>`_
4337
4332
 
4338
4333
  :param index: A comma-separated list of index names; use `_all` or empty string
4339
4334
  to perform the operation on all indices
@@ -4420,26 +4415,23 @@ class IndicesClient(NamespacedClient):
4420
4415
  expand_wildcards: t.Optional[
4421
4416
  t.Union[
4422
4417
  t.Sequence[
4423
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
4418
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4424
4419
  ],
4425
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
4420
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4426
4421
  ]
4427
4422
  ] = None,
4428
4423
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4429
4424
  human: t.Optional[bool] = None,
4430
4425
  ignore_unavailable: t.Optional[bool] = None,
4431
- master_timeout: t.Optional[
4432
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
4433
- ] = None,
4426
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4434
4427
  pretty: t.Optional[bool] = None,
4435
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4428
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4436
4429
  wait_for_active_shards: t.Optional[str] = None,
4437
4430
  ) -> ObjectApiResponse[t.Any]:
4438
4431
  """
4439
- Unfreezes an index. When a frozen index is unfrozen, the index goes through the
4440
- normal recovery process and becomes writeable again.
4432
+ Unfreezes an index.
4441
4433
 
4442
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/unfreeze-index-api.html>`_
4434
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/unfreeze-index-api.html>`_
4443
4435
 
4444
4436
  :param index: Identifier for the index.
4445
4437
  :param allow_no_indices: If `false`, the request returns an error if any wildcard
@@ -4505,17 +4497,15 @@ class IndicesClient(NamespacedClient):
4505
4497
  error_trace: t.Optional[bool] = None,
4506
4498
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4507
4499
  human: t.Optional[bool] = None,
4508
- master_timeout: t.Optional[
4509
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
4510
- ] = None,
4500
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4511
4501
  pretty: t.Optional[bool] = None,
4512
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4502
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4513
4503
  body: t.Optional[t.Dict[str, t.Any]] = None,
4514
4504
  ) -> ObjectApiResponse[t.Any]:
4515
4505
  """
4516
- Updates index aliases.
4506
+ Adds a data stream or index to an alias.
4517
4507
 
4518
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-aliases.html>`_
4508
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/indices-aliases.html>`_
4519
4509
 
4520
4510
  :param actions: Actions to perform.
4521
4511
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -4565,15 +4555,15 @@ class IndicesClient(NamespacedClient):
4565
4555
  allow_no_indices: t.Optional[bool] = None,
4566
4556
  analyze_wildcard: t.Optional[bool] = None,
4567
4557
  analyzer: t.Optional[str] = None,
4568
- default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None,
4558
+ default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
4569
4559
  df: t.Optional[str] = None,
4570
4560
  error_trace: t.Optional[bool] = None,
4571
4561
  expand_wildcards: t.Optional[
4572
4562
  t.Union[
4573
4563
  t.Sequence[
4574
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
4564
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4575
4565
  ],
4576
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
4566
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4577
4567
  ]
4578
4568
  ] = None,
4579
4569
  explain: t.Optional[bool] = None,
@@ -4588,9 +4578,9 @@ class IndicesClient(NamespacedClient):
4588
4578
  body: t.Optional[t.Dict[str, t.Any]] = None,
4589
4579
  ) -> ObjectApiResponse[t.Any]:
4590
4580
  """
4591
- Allows a user to validate a potentially expensive query without executing it.
4581
+ Validates a potentially expensive query without executing it.
4592
4582
 
4593
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/search-validate.html>`_
4583
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-validate.html>`_
4594
4584
 
4595
4585
  :param index: Comma-separated list of data streams, indices, and aliases to search.
4596
4586
  Supports wildcards (`*`). To search all data streams or indices, omit this