elasticsearch 9.0.1__py3-none-any.whl → 9.1.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 (108) hide show
  1. elasticsearch/__init__.py +3 -3
  2. elasticsearch/_async/client/__init__.py +93 -249
  3. elasticsearch/_async/client/async_search.py +4 -4
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +620 -58
  6. elasticsearch/_async/client/ccr.py +13 -13
  7. elasticsearch/_async/client/cluster.py +32 -22
  8. elasticsearch/_async/client/connector.py +30 -30
  9. elasticsearch/_async/client/dangling_indices.py +3 -3
  10. elasticsearch/_async/client/enrich.py +5 -5
  11. elasticsearch/_async/client/eql.py +14 -6
  12. elasticsearch/_async/client/esql.py +125 -9
  13. elasticsearch/_async/client/features.py +2 -2
  14. elasticsearch/_async/client/fleet.py +3 -3
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +11 -11
  17. elasticsearch/_async/client/indices.py +605 -117
  18. elasticsearch/_async/client/inference.py +523 -116
  19. elasticsearch/_async/client/ingest.py +9 -16
  20. elasticsearch/_async/client/license.py +11 -11
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +75 -87
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +7 -7
  26. elasticsearch/_async/client/query_rules.py +8 -8
  27. elasticsearch/_async/client/rollup.py +9 -30
  28. elasticsearch/_async/client/search_application.py +10 -10
  29. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  30. elasticsearch/_async/client/security.py +79 -81
  31. elasticsearch/_async/client/shutdown.py +3 -3
  32. elasticsearch/_async/client/simulate.py +1 -1
  33. elasticsearch/_async/client/slm.py +9 -9
  34. elasticsearch/_async/client/snapshot.py +64 -21
  35. elasticsearch/_async/client/sql.py +6 -6
  36. elasticsearch/_async/client/ssl.py +1 -1
  37. elasticsearch/_async/client/synonyms.py +26 -7
  38. elasticsearch/_async/client/tasks.py +4 -4
  39. elasticsearch/_async/client/text_structure.py +4 -4
  40. elasticsearch/_async/client/transform.py +11 -11
  41. elasticsearch/_async/client/watcher.py +17 -15
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_otel.py +8 -8
  44. elasticsearch/_sync/client/__init__.py +93 -249
  45. elasticsearch/_sync/client/async_search.py +4 -4
  46. elasticsearch/_sync/client/autoscaling.py +4 -4
  47. elasticsearch/_sync/client/cat.py +620 -58
  48. elasticsearch/_sync/client/ccr.py +13 -13
  49. elasticsearch/_sync/client/cluster.py +32 -22
  50. elasticsearch/_sync/client/connector.py +30 -30
  51. elasticsearch/_sync/client/dangling_indices.py +3 -3
  52. elasticsearch/_sync/client/enrich.py +5 -5
  53. elasticsearch/_sync/client/eql.py +14 -6
  54. elasticsearch/_sync/client/esql.py +125 -9
  55. elasticsearch/_sync/client/features.py +2 -2
  56. elasticsearch/_sync/client/fleet.py +3 -3
  57. elasticsearch/_sync/client/graph.py +1 -1
  58. elasticsearch/_sync/client/ilm.py +11 -11
  59. elasticsearch/_sync/client/indices.py +605 -117
  60. elasticsearch/_sync/client/inference.py +523 -116
  61. elasticsearch/_sync/client/ingest.py +9 -16
  62. elasticsearch/_sync/client/license.py +11 -11
  63. elasticsearch/_sync/client/logstash.py +3 -3
  64. elasticsearch/_sync/client/migration.py +3 -3
  65. elasticsearch/_sync/client/ml.py +75 -87
  66. elasticsearch/_sync/client/monitoring.py +1 -1
  67. elasticsearch/_sync/client/nodes.py +7 -7
  68. elasticsearch/_sync/client/query_rules.py +8 -8
  69. elasticsearch/_sync/client/rollup.py +9 -30
  70. elasticsearch/_sync/client/search_application.py +10 -10
  71. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  72. elasticsearch/_sync/client/security.py +79 -81
  73. elasticsearch/_sync/client/shutdown.py +3 -3
  74. elasticsearch/_sync/client/simulate.py +1 -1
  75. elasticsearch/_sync/client/slm.py +9 -9
  76. elasticsearch/_sync/client/snapshot.py +64 -21
  77. elasticsearch/_sync/client/sql.py +6 -6
  78. elasticsearch/_sync/client/ssl.py +1 -1
  79. elasticsearch/_sync/client/synonyms.py +26 -7
  80. elasticsearch/_sync/client/tasks.py +4 -4
  81. elasticsearch/_sync/client/text_structure.py +4 -4
  82. elasticsearch/_sync/client/transform.py +11 -11
  83. elasticsearch/_sync/client/watcher.py +17 -15
  84. elasticsearch/_sync/client/xpack.py +2 -2
  85. elasticsearch/_version.py +1 -1
  86. elasticsearch/compat.py +5 -0
  87. elasticsearch/dsl/__init__.py +2 -1
  88. elasticsearch/dsl/_async/document.py +1 -1
  89. elasticsearch/dsl/_sync/document.py +1 -1
  90. elasticsearch/dsl/aggs.py +20 -0
  91. elasticsearch/dsl/document_base.py +177 -17
  92. elasticsearch/dsl/field.py +241 -38
  93. elasticsearch/dsl/query.py +50 -5
  94. elasticsearch/dsl/response/__init__.py +1 -1
  95. elasticsearch/dsl/types.py +245 -21
  96. elasticsearch/dsl/utils.py +1 -1
  97. elasticsearch/esql/__init__.py +18 -0
  98. elasticsearch/esql/esql.py +1105 -0
  99. elasticsearch/esql/esql1.py1 +307 -0
  100. elasticsearch/esql/functions.py +1738 -0
  101. {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/METADATA +3 -6
  102. elasticsearch-9.1.0.dist-info/RECORD +164 -0
  103. elasticsearch-9.0.1.dist-info/RECORD +0 -162
  104. elasticsearch-9.0.1.dist-info/licenses/LICENSE.txt +0 -175
  105. elasticsearch-9.0.1.dist-info/licenses/NOTICE.txt +0 -559
  106. {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/WHEEL +0 -0
  107. {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/licenses/LICENSE +0 -0
  108. {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/licenses/NOTICE +0 -0
@@ -62,7 +62,7 @@ class IndicesClient(NamespacedClient):
62
62
  Index blocks limit the operations allowed on an index by blocking specific operation types.</p>
63
63
 
64
64
 
65
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-add-block>`_
65
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-add-block>`_
66
66
 
67
67
  :param index: A comma-separated list or wildcard expression of index names used
68
68
  to limit the request. By default, you must explicitly name the indices you
@@ -173,7 +173,7 @@ class IndicesClient(NamespacedClient):
173
173
  The <code>_analyze</code> endpoint without a specified index will always use <code>10000</code> as its limit.</p>
174
174
 
175
175
 
176
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-analyze>`_
176
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-analyze>`_
177
177
 
178
178
  :param index: Index used to derive the analyzer. If specified, the `analyzer`
179
179
  or field parameter overrides this value. If no index is specified or the
@@ -265,7 +265,7 @@ class IndicesClient(NamespacedClient):
265
265
  <p>Cancel a migration reindex attempt for a data stream or index.</p>
266
266
 
267
267
 
268
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-cancel-migrate-reindex>`_
268
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex>`_
269
269
 
270
270
  :param index: The index or data stream name
271
271
  """
@@ -327,7 +327,7 @@ class IndicesClient(NamespacedClient):
327
327
  To clear the cache only of specific fields, use the <code>fields</code> parameter.</p>
328
328
 
329
329
 
330
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-clear-cache>`_
330
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clear-cache>`_
331
331
 
332
332
  :param index: Comma-separated list of data streams, indices, and aliases used
333
333
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -338,7 +338,7 @@ class IndicesClient(NamespacedClient):
338
338
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
339
339
  request can target data streams, this argument determines whether wildcard
340
340
  expressions match hidden data streams. Supports comma-separated values, such
341
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
341
+ as `open,hidden`.
342
342
  :param fielddata: If `true`, clears the fields cache. Use the `fields` parameter
343
343
  to clear the cache of specific fields only.
344
344
  :param fields: Comma-separated list of field names used to limit the `fielddata`
@@ -449,7 +449,7 @@ class IndicesClient(NamespacedClient):
449
449
  <p>Because the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.</p>
450
450
 
451
451
 
452
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-clone>`_
452
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-clone>`_
453
453
 
454
454
  :param index: Name of the source index to clone.
455
455
  :param target: Name of the target index to create.
@@ -553,7 +553,7 @@ class IndicesClient(NamespacedClient):
553
553
  Closing indices can be turned off with the cluster settings API by setting <code>cluster.indices.close.enable</code> to <code>false</code>.</p>
554
554
 
555
555
 
556
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-close>`_
556
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-close>`_
557
557
 
558
558
  :param index: Comma-separated list or wildcard expression of index names used
559
559
  to limit the request.
@@ -563,7 +563,7 @@ class IndicesClient(NamespacedClient):
563
563
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
564
564
  request can target data streams, this argument determines whether wildcard
565
565
  expressions match hidden data streams. Supports comma-separated values, such
566
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
566
+ as `open,hidden`.
567
567
  :param ignore_unavailable: If `false`, the request returns an error if it targets
568
568
  a missing or closed index.
569
569
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -654,9 +654,17 @@ class IndicesClient(NamespacedClient):
654
654
  Note that changing this setting will also affect the <code>wait_for_active_shards</code> value on all subsequent write operations.</p>
655
655
 
656
656
 
657
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-create>`_
657
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create>`_
658
658
 
659
- :param index: Name of the index you wish to create.
659
+ :param index: Name of the index you wish to create. Index names must meet the
660
+ following criteria: * Lowercase only * Cannot include `\\`, `/`, `*`, `?`,
661
+ `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#` * Indices prior to
662
+ 7.0 could contain a colon (`:`), but that has been deprecated and will not
663
+ be supported in later versions * Cannot start with `-`, `_`, or `+` * Cannot
664
+ be `.` or `..` * Cannot be longer than 255 bytes (note thtat it is bytes,
665
+ so multi-byte characters will reach the limit faster) * Names starting with
666
+ `.` are deprecated, except for hidden indices and internal indices managed
667
+ by plugins
660
668
  :param aliases: Aliases for the index.
661
669
  :param mappings: Mapping for fields in the index. If specified, this mapping
662
670
  can include: - Field names - Field data types - Mapping parameters
@@ -731,7 +739,7 @@ class IndicesClient(NamespacedClient):
731
739
  <p>You must have a matching index template with data stream enabled.</p>
732
740
 
733
741
 
734
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-create-data-stream>`_
742
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream>`_
735
743
 
736
744
  :param name: Name of the data stream, which must meet the following criteria:
737
745
  Lowercase only; Cannot include `\\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`,
@@ -794,7 +802,7 @@ class IndicesClient(NamespacedClient):
794
802
  <p>Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.</p>
795
803
 
796
804
 
797
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-create-from>`_
805
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from>`_
798
806
 
799
807
  :param source: The source index or data stream name
800
808
  :param dest: The destination index or data stream name
@@ -861,7 +869,7 @@ class IndicesClient(NamespacedClient):
861
869
  <p>Get statistics for one or more data streams.</p>
862
870
 
863
871
 
864
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-data-streams-stats-1>`_
872
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-data-streams-stats-1>`_
865
873
 
866
874
  :param name: Comma-separated list of data streams used to limit the request.
867
875
  Wildcard expressions (`*`) are supported. To target all data streams in a
@@ -930,7 +938,7 @@ class IndicesClient(NamespacedClient):
930
938
  You can then use the delete index API to delete the previous write index.</p>
931
939
 
932
940
 
933
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete>`_
941
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete>`_
934
942
 
935
943
  :param index: Comma-separated list of indices to delete. You cannot specify index
936
944
  aliases. By default, this parameter does not support wildcards (`*`) or `_all`.
@@ -942,7 +950,7 @@ class IndicesClient(NamespacedClient):
942
950
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
943
951
  request can target data streams, this argument determines whether wildcard
944
952
  expressions match hidden data streams. Supports comma-separated values, such
945
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
953
+ as `open,hidden`.
946
954
  :param ignore_unavailable: If `false`, the request returns an error if it targets
947
955
  a missing or closed index.
948
956
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -1004,7 +1012,7 @@ class IndicesClient(NamespacedClient):
1004
1012
  Removes a data stream or index from an alias.</p>
1005
1013
 
1006
1014
 
1007
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-alias>`_
1015
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias>`_
1008
1016
 
1009
1017
  :param index: Comma-separated list of data streams or indices used to limit the
1010
1018
  request. Supports wildcards (`*`).
@@ -1072,7 +1080,7 @@ class IndicesClient(NamespacedClient):
1072
1080
  Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
1073
1081
 
1074
1082
 
1075
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-data-lifecycle>`_
1083
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle>`_
1076
1084
 
1077
1085
  :param name: A comma-separated list of data streams of which the data stream
1078
1086
  lifecycle will be deleted; use `*` to get all data streams
@@ -1136,7 +1144,7 @@ class IndicesClient(NamespacedClient):
1136
1144
  Deletes one or more data streams and their backing indices.</p>
1137
1145
 
1138
1146
 
1139
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-data-stream>`_
1147
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream>`_
1140
1148
 
1141
1149
  :param name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions
1142
1150
  are supported.
@@ -1173,6 +1181,71 @@ class IndicesClient(NamespacedClient):
1173
1181
  path_parts=__path_parts,
1174
1182
  )
1175
1183
 
1184
+ @_rewrite_parameters()
1185
+ async def delete_data_stream_options(
1186
+ self,
1187
+ *,
1188
+ name: t.Union[str, t.Sequence[str]],
1189
+ error_trace: t.Optional[bool] = None,
1190
+ expand_wildcards: t.Optional[
1191
+ t.Union[
1192
+ t.Sequence[
1193
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1194
+ ],
1195
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
1196
+ ]
1197
+ ] = None,
1198
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1199
+ human: t.Optional[bool] = None,
1200
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1201
+ pretty: t.Optional[bool] = None,
1202
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1203
+ ) -> ObjectApiResponse[t.Any]:
1204
+ """
1205
+ .. raw:: html
1206
+
1207
+ <p>Delete data stream options.
1208
+ Removes the data stream options from a data stream.</p>
1209
+
1210
+
1211
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html>`_
1212
+
1213
+ :param name: A comma-separated list of data streams of which the data stream
1214
+ options will be deleted; use `*` to get all data streams
1215
+ :param expand_wildcards: Whether wildcard expressions should get expanded to
1216
+ open or closed indices (default: open)
1217
+ :param master_timeout: Specify timeout for connection to master
1218
+ :param timeout: Explicit timestamp for the document
1219
+ """
1220
+ if name in SKIP_IN_PATH:
1221
+ raise ValueError("Empty value passed for parameter 'name'")
1222
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
1223
+ __path = f'/_data_stream/{__path_parts["name"]}/_options'
1224
+ __query: t.Dict[str, t.Any] = {}
1225
+ if error_trace is not None:
1226
+ __query["error_trace"] = error_trace
1227
+ if expand_wildcards is not None:
1228
+ __query["expand_wildcards"] = expand_wildcards
1229
+ if filter_path is not None:
1230
+ __query["filter_path"] = filter_path
1231
+ if human is not None:
1232
+ __query["human"] = human
1233
+ if master_timeout is not None:
1234
+ __query["master_timeout"] = master_timeout
1235
+ if pretty is not None:
1236
+ __query["pretty"] = pretty
1237
+ if timeout is not None:
1238
+ __query["timeout"] = timeout
1239
+ __headers = {"accept": "application/json"}
1240
+ return await self.perform_request( # type: ignore[return-value]
1241
+ "DELETE",
1242
+ __path,
1243
+ params=__query,
1244
+ headers=__headers,
1245
+ endpoint_id="indices.delete_data_stream_options",
1246
+ path_parts=__path_parts,
1247
+ )
1248
+
1176
1249
  @_rewrite_parameters()
1177
1250
  async def delete_index_template(
1178
1251
  self,
@@ -1194,7 +1267,7 @@ class IndicesClient(NamespacedClient):
1194
1267
  existing templates.</p>
1195
1268
 
1196
1269
 
1197
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-index-template>`_
1270
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template>`_
1198
1271
 
1199
1272
  :param name: Comma-separated list of index template names used to limit the request.
1200
1273
  Wildcard (*) expressions are supported.
@@ -1246,10 +1319,11 @@ class IndicesClient(NamespacedClient):
1246
1319
  """
1247
1320
  .. raw:: html
1248
1321
 
1249
- <p>Delete a legacy index template.</p>
1322
+ <p>Delete a legacy index template.
1323
+ IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
1250
1324
 
1251
1325
 
1252
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-delete-template>`_
1326
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template>`_
1253
1327
 
1254
1328
  :param name: The name of the legacy index template to delete. Wildcard (`*`)
1255
1329
  expressions are supported.
@@ -1321,7 +1395,7 @@ class IndicesClient(NamespacedClient):
1321
1395
  The stored size of the <code>_id</code> field is likely underestimated while the <code>_source</code> field is overestimated.</p>
1322
1396
 
1323
1397
 
1324
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-disk-usage>`_
1398
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage>`_
1325
1399
 
1326
1400
  :param index: Comma-separated list of data streams, indices, and aliases used
1327
1401
  to limit the request. It’s recommended to execute this API with a single
@@ -1404,7 +1478,7 @@ class IndicesClient(NamespacedClient):
1404
1478
  The source index must be read only (<code>index.blocks.write: true</code>).</p>
1405
1479
 
1406
1480
 
1407
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-downsample>`_
1481
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample>`_
1408
1482
 
1409
1483
  :param index: Name of the time series index to downsample.
1410
1484
  :param target_index: Name of the index to create.
@@ -1476,7 +1550,7 @@ class IndicesClient(NamespacedClient):
1476
1550
  Check if one or more indices, index aliases, or data streams exist.</p>
1477
1551
 
1478
1552
 
1479
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists>`_
1553
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists>`_
1480
1554
 
1481
1555
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1482
1556
  wildcards (`*`).
@@ -1486,7 +1560,7 @@ class IndicesClient(NamespacedClient):
1486
1560
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
1487
1561
  request can target data streams, this argument determines whether wildcard
1488
1562
  expressions match hidden data streams. Supports comma-separated values, such
1489
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
1563
+ as `open,hidden`.
1490
1564
  :param flat_settings: If `true`, returns settings in flat format.
1491
1565
  :param ignore_unavailable: If `false`, the request returns an error if it targets
1492
1566
  a missing or closed index.
@@ -1558,7 +1632,7 @@ class IndicesClient(NamespacedClient):
1558
1632
  <p>Check if one or more data stream or index aliases exist.</p>
1559
1633
 
1560
1634
 
1561
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists-alias>`_
1635
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-alias>`_
1562
1636
 
1563
1637
  :param name: Comma-separated list of aliases to check. Supports wildcards (`*`).
1564
1638
  :param index: Comma-separated list of data streams or indices used to limit the
@@ -1570,7 +1644,7 @@ class IndicesClient(NamespacedClient):
1570
1644
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
1571
1645
  request can target data streams, this argument determines whether wildcard
1572
1646
  expressions match hidden data streams. Supports comma-separated values, such
1573
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
1647
+ as `open,hidden`.
1574
1648
  :param ignore_unavailable: If `false`, requests that include a missing data stream
1575
1649
  or index in the target indices or data streams return an error.
1576
1650
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -1635,7 +1709,7 @@ class IndicesClient(NamespacedClient):
1635
1709
  <p>Check whether index templates exist.</p>
1636
1710
 
1637
1711
 
1638
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists-index-template>`_
1712
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template>`_
1639
1713
 
1640
1714
  :param name: Comma-separated list of index template names used to limit the request.
1641
1715
  Wildcard (*) expressions are supported.
@@ -1698,7 +1772,7 @@ class IndicesClient(NamespacedClient):
1698
1772
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
1699
1773
 
1700
1774
 
1701
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-exists-template>`_
1775
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-template>`_
1702
1776
 
1703
1777
  :param name: A comma-separated list of index template names used to limit the
1704
1778
  request. Wildcard (`*`) expressions are supported.
@@ -1756,7 +1830,7 @@ class IndicesClient(NamespacedClient):
1756
1830
  Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.</p>
1757
1831
 
1758
1832
 
1759
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-explain-data-lifecycle>`_
1833
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle>`_
1760
1834
 
1761
1835
  :param index: The name of the index to explain
1762
1836
  :param include_defaults: indicates if the API should return the default values
@@ -1823,7 +1897,7 @@ class IndicesClient(NamespacedClient):
1823
1897
  A given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.</p>
1824
1898
 
1825
1899
 
1826
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-field-usage-stats>`_
1900
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats>`_
1827
1901
 
1828
1902
  :param index: Comma-separated list or wildcard expression of index names used
1829
1903
  to limit the request.
@@ -1908,7 +1982,7 @@ class IndicesClient(NamespacedClient):
1908
1982
  If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.</p>
1909
1983
 
1910
1984
 
1911
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-flush>`_
1985
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush>`_
1912
1986
 
1913
1987
  :param index: Comma-separated list of data streams, indices, and aliases to flush.
1914
1988
  Supports wildcards (`*`). To flush all data streams and indices, omit this
@@ -1919,7 +1993,7 @@ class IndicesClient(NamespacedClient):
1919
1993
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
1920
1994
  request can target data streams, this argument determines whether wildcard
1921
1995
  expressions match hidden data streams. Supports comma-separated values, such
1922
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
1996
+ as `open,hidden`.
1923
1997
  :param force: If `true`, the request forces a flush even if there are no changes
1924
1998
  to commit to the index.
1925
1999
  :param ignore_unavailable: If `false`, the request returns an error if it targets
@@ -2033,7 +2107,7 @@ class IndicesClient(NamespacedClient):
2033
2107
  </code></pre>
2034
2108
 
2035
2109
 
2036
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-forcemerge>`_
2110
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge>`_
2037
2111
 
2038
2112
  :param index: A comma-separated list of index names; use `_all` or empty string
2039
2113
  to perform the operation on all indices
@@ -2131,7 +2205,7 @@ class IndicesClient(NamespacedClient):
2131
2205
  stream’s backing indices.</p>
2132
2206
 
2133
2207
 
2134
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get>`_
2208
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get>`_
2135
2209
 
2136
2210
  :param index: Comma-separated list of data streams, indices, and index aliases
2137
2211
  used to limit the request. Wildcard expressions (*) are supported.
@@ -2224,7 +2298,7 @@ class IndicesClient(NamespacedClient):
2224
2298
  Retrieves information for one or more data stream or index aliases.</p>
2225
2299
 
2226
2300
 
2227
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-alias>`_
2301
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias>`_
2228
2302
 
2229
2303
  :param index: Comma-separated list of data streams or indices used to limit the
2230
2304
  request. Supports wildcards (`*`). To target all data streams and indices,
@@ -2237,7 +2311,7 @@ class IndicesClient(NamespacedClient):
2237
2311
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
2238
2312
  request can target data streams, this argument determines whether wildcard
2239
2313
  expressions match hidden data streams. Supports comma-separated values, such
2240
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
2314
+ as `open,hidden`.
2241
2315
  :param ignore_unavailable: If `false`, the request returns an error if it targets
2242
2316
  a missing or closed index.
2243
2317
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -2311,14 +2385,13 @@ class IndicesClient(NamespacedClient):
2311
2385
  <p>Get the data stream lifecycle configuration of one or more data streams.</p>
2312
2386
 
2313
2387
 
2314
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-data-lifecycle>`_
2388
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle>`_
2315
2389
 
2316
2390
  :param name: Comma-separated list of data streams to limit the request. Supports
2317
2391
  wildcards (`*`). To target all data streams, omit this parameter or use `*`
2318
2392
  or `_all`.
2319
2393
  :param expand_wildcards: Type of data stream that wildcard patterns can match.
2320
- Supports comma-separated values, such as `open,hidden`. Valid values are:
2321
- `all`, `open`, `closed`, `hidden`, `none`.
2394
+ Supports comma-separated values, such as `open,hidden`.
2322
2395
  :param include_defaults: If `true`, return all default settings in the response.
2323
2396
  :param master_timeout: Period to wait for a connection to the master node. If
2324
2397
  no response is received before the timeout expires, the request fails and
@@ -2369,7 +2442,7 @@ class IndicesClient(NamespacedClient):
2369
2442
  Get statistics about the data streams that are managed by a data stream lifecycle.</p>
2370
2443
 
2371
2444
 
2372
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-data-lifecycle-stats>`_
2445
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats>`_
2373
2446
  """
2374
2447
  __path_parts: t.Dict[str, str] = {}
2375
2448
  __path = "/_lifecycle/stats"
@@ -2420,7 +2493,7 @@ class IndicesClient(NamespacedClient):
2420
2493
  <p>Get information about one or more data streams.</p>
2421
2494
 
2422
2495
 
2423
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-data-stream>`_
2496
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream>`_
2424
2497
 
2425
2498
  :param name: Comma-separated list of data stream names used to limit the request.
2426
2499
  Wildcard (`*`) expressions are supported. If omitted, all data streams are
@@ -2469,6 +2542,121 @@ class IndicesClient(NamespacedClient):
2469
2542
  path_parts=__path_parts,
2470
2543
  )
2471
2544
 
2545
+ @_rewrite_parameters()
2546
+ async def get_data_stream_options(
2547
+ self,
2548
+ *,
2549
+ name: t.Union[str, t.Sequence[str]],
2550
+ error_trace: t.Optional[bool] = None,
2551
+ expand_wildcards: t.Optional[
2552
+ t.Union[
2553
+ t.Sequence[
2554
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2555
+ ],
2556
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2557
+ ]
2558
+ ] = None,
2559
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2560
+ human: t.Optional[bool] = None,
2561
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2562
+ pretty: t.Optional[bool] = None,
2563
+ ) -> ObjectApiResponse[t.Any]:
2564
+ """
2565
+ .. raw:: html
2566
+
2567
+ <p>Get data stream options.</p>
2568
+ <p>Get the data stream options configuration of one or more data streams.</p>
2569
+
2570
+
2571
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html>`_
2572
+
2573
+ :param name: Comma-separated list of data streams to limit the request. Supports
2574
+ wildcards (`*`). To target all data streams, omit this parameter or use `*`
2575
+ or `_all`.
2576
+ :param expand_wildcards: Type of data stream that wildcard patterns can match.
2577
+ Supports comma-separated values, such as `open,hidden`.
2578
+ :param master_timeout: Period to wait for a connection to the master node. If
2579
+ no response is received before the timeout expires, the request fails and
2580
+ returns an error.
2581
+ """
2582
+ if name in SKIP_IN_PATH:
2583
+ raise ValueError("Empty value passed for parameter 'name'")
2584
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
2585
+ __path = f'/_data_stream/{__path_parts["name"]}/_options'
2586
+ __query: t.Dict[str, t.Any] = {}
2587
+ if error_trace is not None:
2588
+ __query["error_trace"] = error_trace
2589
+ if expand_wildcards is not None:
2590
+ __query["expand_wildcards"] = expand_wildcards
2591
+ if filter_path is not None:
2592
+ __query["filter_path"] = filter_path
2593
+ if human is not None:
2594
+ __query["human"] = human
2595
+ if master_timeout is not None:
2596
+ __query["master_timeout"] = master_timeout
2597
+ if pretty is not None:
2598
+ __query["pretty"] = pretty
2599
+ __headers = {"accept": "application/json"}
2600
+ return await self.perform_request( # type: ignore[return-value]
2601
+ "GET",
2602
+ __path,
2603
+ params=__query,
2604
+ headers=__headers,
2605
+ endpoint_id="indices.get_data_stream_options",
2606
+ path_parts=__path_parts,
2607
+ )
2608
+
2609
+ @_rewrite_parameters()
2610
+ async def get_data_stream_settings(
2611
+ self,
2612
+ *,
2613
+ name: t.Union[str, t.Sequence[str]],
2614
+ error_trace: t.Optional[bool] = None,
2615
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2616
+ human: t.Optional[bool] = None,
2617
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2618
+ pretty: t.Optional[bool] = None,
2619
+ ) -> ObjectApiResponse[t.Any]:
2620
+ """
2621
+ .. raw:: html
2622
+
2623
+ <p>Get data stream settings.</p>
2624
+ <p>Get setting information for one or more data streams.</p>
2625
+
2626
+
2627
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings>`_
2628
+
2629
+ :param name: A comma-separated list of data streams or data stream patterns.
2630
+ Supports wildcards (`*`).
2631
+ :param master_timeout: The period to wait for a connection to the master node.
2632
+ If no response is received before the timeout expires, the request fails
2633
+ and returns an error.
2634
+ """
2635
+ if name in SKIP_IN_PATH:
2636
+ raise ValueError("Empty value passed for parameter 'name'")
2637
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
2638
+ __path = f'/_data_stream/{__path_parts["name"]}/_settings'
2639
+ __query: t.Dict[str, t.Any] = {}
2640
+ if error_trace is not None:
2641
+ __query["error_trace"] = error_trace
2642
+ if filter_path is not None:
2643
+ __query["filter_path"] = filter_path
2644
+ if human is not None:
2645
+ __query["human"] = human
2646
+ if master_timeout is not None:
2647
+ __query["master_timeout"] = master_timeout
2648
+ if pretty is not None:
2649
+ __query["pretty"] = pretty
2650
+ __headers = {"accept": "application/json"}
2651
+ return await self.perform_request( # type: ignore[return-value]
2652
+ "GET",
2653
+ __path,
2654
+ params=__query,
2655
+ headers=__headers,
2656
+ endpoint_id="indices.get_data_stream_settings",
2657
+ path_parts=__path_parts,
2658
+ )
2659
+
2472
2660
  @_rewrite_parameters()
2473
2661
  async def get_field_mapping(
2474
2662
  self,
@@ -2489,7 +2677,6 @@ class IndicesClient(NamespacedClient):
2489
2677
  human: t.Optional[bool] = None,
2490
2678
  ignore_unavailable: t.Optional[bool] = None,
2491
2679
  include_defaults: t.Optional[bool] = None,
2492
- local: t.Optional[bool] = None,
2493
2680
  pretty: t.Optional[bool] = None,
2494
2681
  ) -> ObjectApiResponse[t.Any]:
2495
2682
  """
@@ -2501,7 +2688,7 @@ class IndicesClient(NamespacedClient):
2501
2688
  <p>This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.</p>
2502
2689
 
2503
2690
 
2504
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-mapping>`_
2691
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping>`_
2505
2692
 
2506
2693
  :param fields: Comma-separated list or wildcard expression of fields used to
2507
2694
  limit returned information. Supports wildcards (`*`).
@@ -2514,12 +2701,10 @@ class IndicesClient(NamespacedClient):
2514
2701
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
2515
2702
  request can target data streams, this argument determines whether wildcard
2516
2703
  expressions match hidden data streams. Supports comma-separated values, such
2517
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
2704
+ as `open,hidden`.
2518
2705
  :param ignore_unavailable: If `false`, the request returns an error if it targets
2519
2706
  a missing or closed index.
2520
2707
  :param include_defaults: If `true`, return all default settings in the response.
2521
- :param local: If `true`, the request retrieves information from the local node
2522
- only.
2523
2708
  """
2524
2709
  if fields in SKIP_IN_PATH:
2525
2710
  raise ValueError("Empty value passed for parameter 'fields'")
@@ -2547,8 +2732,6 @@ class IndicesClient(NamespacedClient):
2547
2732
  __query["ignore_unavailable"] = ignore_unavailable
2548
2733
  if include_defaults is not None:
2549
2734
  __query["include_defaults"] = include_defaults
2550
- if local is not None:
2551
- __query["local"] = local
2552
2735
  if pretty is not None:
2553
2736
  __query["pretty"] = pretty
2554
2737
  __headers = {"accept": "application/json"}
@@ -2582,7 +2765,7 @@ class IndicesClient(NamespacedClient):
2582
2765
  Get information about one or more index templates.</p>
2583
2766
 
2584
2767
 
2585
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-index-template>`_
2768
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template>`_
2586
2769
 
2587
2770
  :param name: Comma-separated list of index template names used to limit the request.
2588
2771
  Wildcard (*) expressions are supported.
@@ -2659,7 +2842,7 @@ class IndicesClient(NamespacedClient):
2659
2842
  For data streams, the API retrieves mappings for the stream’s backing indices.</p>
2660
2843
 
2661
2844
 
2662
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-mapping>`_
2845
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping>`_
2663
2846
 
2664
2847
  :param index: Comma-separated list of data streams, indices, and aliases used
2665
2848
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2670,7 +2853,7 @@ class IndicesClient(NamespacedClient):
2670
2853
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
2671
2854
  request can target data streams, this argument determines whether wildcard
2672
2855
  expressions match hidden data streams. Supports comma-separated values, such
2673
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
2856
+ as `open,hidden`.
2674
2857
  :param ignore_unavailable: If `false`, the request returns an error if it targets
2675
2858
  a missing or closed index.
2676
2859
  :param local: If `true`, the request retrieves information from the local node
@@ -2733,7 +2916,7 @@ class IndicesClient(NamespacedClient):
2733
2916
  <p>Get the status of a migration reindex attempt for a data stream or index.</p>
2734
2917
 
2735
2918
 
2736
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-migration>`_
2919
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration>`_
2737
2920
 
2738
2921
  :param index: The index or data stream name.
2739
2922
  """
@@ -2793,7 +2976,7 @@ class IndicesClient(NamespacedClient):
2793
2976
  For data streams, it returns setting information for the stream's backing indices.</p>
2794
2977
 
2795
2978
 
2796
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-settings>`_
2979
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings>`_
2797
2980
 
2798
2981
  :param index: Comma-separated list of data streams, indices, and aliases used
2799
2982
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2880,12 +3063,12 @@ class IndicesClient(NamespacedClient):
2880
3063
  """
2881
3064
  .. raw:: html
2882
3065
 
2883
- <p>Get index templates.
3066
+ <p>Get legacy index templates.
2884
3067
  Get information about one or more index templates.</p>
2885
3068
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
2886
3069
 
2887
3070
 
2888
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-get-template>`_
3071
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template>`_
2889
3072
 
2890
3073
  :param name: Comma-separated list of index template names used to limit the request.
2891
3074
  Wildcard (`*`) expressions are supported. To return all index templates,
@@ -2952,7 +3135,7 @@ class IndicesClient(NamespacedClient):
2952
3135
  The persistent task ID is returned immediately and the reindexing work is completed in that task.</p>
2953
3136
 
2954
3137
 
2955
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-migrate-reindex>`_
3138
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex>`_
2956
3139
 
2957
3140
  :param reindex:
2958
3141
  """
@@ -3013,7 +3196,7 @@ class IndicesClient(NamespacedClient):
3013
3196
  The write index for the alias becomes the write index for the stream.</p>
3014
3197
 
3015
3198
 
3016
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-migrate-to-data-stream>`_
3199
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-to-data-stream>`_
3017
3200
 
3018
3201
  :param name: Name of the index alias to convert to a data stream.
3019
3202
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -3069,7 +3252,7 @@ class IndicesClient(NamespacedClient):
3069
3252
  Performs one or more data stream modification actions in a single atomic operation.</p>
3070
3253
 
3071
3254
 
3072
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-modify-data-stream>`_
3255
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream>`_
3073
3256
 
3074
3257
  :param actions: Actions to perform.
3075
3258
  """
@@ -3148,7 +3331,7 @@ class IndicesClient(NamespacedClient):
3148
3331
  <p>Because opening or closing an index allocates its shards, the <code>wait_for_active_shards</code> setting on index creation applies to the <code>_open</code> and <code>_close</code> index actions as well.</p>
3149
3332
 
3150
3333
 
3151
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-open>`_
3334
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open>`_
3152
3335
 
3153
3336
  :param index: Comma-separated list of data streams, indices, and aliases used
3154
3337
  to limit the request. Supports wildcards (`*`). By default, you must explicitly
@@ -3162,7 +3345,7 @@ class IndicesClient(NamespacedClient):
3162
3345
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
3163
3346
  request can target data streams, this argument determines whether wildcard
3164
3347
  expressions match hidden data streams. Supports comma-separated values, such
3165
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
3348
+ as `open,hidden`.
3166
3349
  :param ignore_unavailable: If `false`, the request returns an error if it targets
3167
3350
  a missing or closed index.
3168
3351
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -3234,7 +3417,7 @@ class IndicesClient(NamespacedClient):
3234
3417
  This will affect the lifecycle management of the data stream and interfere with the data stream size and retention.</p>
3235
3418
 
3236
3419
 
3237
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-promote-data-stream>`_
3420
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream>`_
3238
3421
 
3239
3422
  :param name: The name of the data stream
3240
3423
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -3300,7 +3483,7 @@ class IndicesClient(NamespacedClient):
3300
3483
  Adds a data stream or index to an alias.</p>
3301
3484
 
3302
3485
 
3303
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-alias>`_
3486
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias>`_
3304
3487
 
3305
3488
  :param index: Comma-separated list of data streams or indices to add. Supports
3306
3489
  wildcards (`*`). Wildcard patterns that match both data streams and indices
@@ -3407,7 +3590,7 @@ class IndicesClient(NamespacedClient):
3407
3590
  Update the data stream lifecycle of the specified data streams.</p>
3408
3591
 
3409
3592
 
3410
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-data-lifecycle>`_
3593
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle>`_
3411
3594
 
3412
3595
  :param name: Comma-separated list of data streams used to limit the request.
3413
3596
  Supports wildcards (`*`). To target all data streams use `*` or `_all`.
@@ -3421,8 +3604,7 @@ class IndicesClient(NamespacedClient):
3421
3604
  for this data stream. A data stream lifecycle that's disabled (enabled: `false`)
3422
3605
  will have no effect on the data stream.
3423
3606
  :param expand_wildcards: Type of data stream that wildcard patterns can match.
3424
- Supports comma-separated values, such as `open,hidden`. Valid values are:
3425
- `all`, `hidden`, `open`, `closed`, `none`.
3607
+ Supports comma-separated values, such as `open,hidden`.
3426
3608
  :param master_timeout: Period to wait for a connection to the master node. If
3427
3609
  no response is received before the timeout expires, the request fails and
3428
3610
  returns an error.
@@ -3471,6 +3653,167 @@ class IndicesClient(NamespacedClient):
3471
3653
  path_parts=__path_parts,
3472
3654
  )
3473
3655
 
3656
+ @_rewrite_parameters(
3657
+ body_fields=("failure_store",),
3658
+ )
3659
+ async def put_data_stream_options(
3660
+ self,
3661
+ *,
3662
+ name: t.Union[str, t.Sequence[str]],
3663
+ error_trace: t.Optional[bool] = None,
3664
+ expand_wildcards: t.Optional[
3665
+ t.Union[
3666
+ t.Sequence[
3667
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3668
+ ],
3669
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3670
+ ]
3671
+ ] = None,
3672
+ failure_store: t.Optional[t.Mapping[str, t.Any]] = None,
3673
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3674
+ human: t.Optional[bool] = None,
3675
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3676
+ pretty: t.Optional[bool] = None,
3677
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3678
+ body: t.Optional[t.Dict[str, t.Any]] = None,
3679
+ ) -> ObjectApiResponse[t.Any]:
3680
+ """
3681
+ .. raw:: html
3682
+
3683
+ <p>Update data stream options.
3684
+ Update the data stream options of the specified data streams.</p>
3685
+
3686
+
3687
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html>`_
3688
+
3689
+ :param name: Comma-separated list of data streams used to limit the request.
3690
+ Supports wildcards (`*`). To target all data streams use `*` or `_all`.
3691
+ :param expand_wildcards: Type of data stream that wildcard patterns can match.
3692
+ Supports comma-separated values, such as `open,hidden`.
3693
+ :param failure_store: If defined, it will update the failure store configuration
3694
+ of every data stream resolved by the name expression.
3695
+ :param master_timeout: Period to wait for a connection to the master node. If
3696
+ no response is received before the timeout expires, the request fails and
3697
+ returns an error.
3698
+ :param timeout: Period to wait for a response. If no response is received before
3699
+ the timeout expires, the request fails and returns an error.
3700
+ """
3701
+ if name in SKIP_IN_PATH:
3702
+ raise ValueError("Empty value passed for parameter 'name'")
3703
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
3704
+ __path = f'/_data_stream/{__path_parts["name"]}/_options'
3705
+ __query: t.Dict[str, t.Any] = {}
3706
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
3707
+ if error_trace is not None:
3708
+ __query["error_trace"] = error_trace
3709
+ if expand_wildcards is not None:
3710
+ __query["expand_wildcards"] = expand_wildcards
3711
+ if filter_path is not None:
3712
+ __query["filter_path"] = filter_path
3713
+ if human is not None:
3714
+ __query["human"] = human
3715
+ if master_timeout is not None:
3716
+ __query["master_timeout"] = master_timeout
3717
+ if pretty is not None:
3718
+ __query["pretty"] = pretty
3719
+ if timeout is not None:
3720
+ __query["timeout"] = timeout
3721
+ if not __body:
3722
+ if failure_store is not None:
3723
+ __body["failure_store"] = failure_store
3724
+ if not __body:
3725
+ __body = None # type: ignore[assignment]
3726
+ __headers = {"accept": "application/json"}
3727
+ if __body is not None:
3728
+ __headers["content-type"] = "application/json"
3729
+ return await self.perform_request( # type: ignore[return-value]
3730
+ "PUT",
3731
+ __path,
3732
+ params=__query,
3733
+ headers=__headers,
3734
+ body=__body,
3735
+ endpoint_id="indices.put_data_stream_options",
3736
+ path_parts=__path_parts,
3737
+ )
3738
+
3739
+ @_rewrite_parameters(
3740
+ body_name="settings",
3741
+ )
3742
+ async def put_data_stream_settings(
3743
+ self,
3744
+ *,
3745
+ name: t.Union[str, t.Sequence[str]],
3746
+ settings: t.Optional[t.Mapping[str, t.Any]] = None,
3747
+ body: t.Optional[t.Mapping[str, t.Any]] = None,
3748
+ dry_run: t.Optional[bool] = None,
3749
+ error_trace: t.Optional[bool] = None,
3750
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3751
+ human: t.Optional[bool] = None,
3752
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3753
+ pretty: t.Optional[bool] = None,
3754
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3755
+ ) -> ObjectApiResponse[t.Any]:
3756
+ """
3757
+ .. raw:: html
3758
+
3759
+ <p>Update data stream settings.</p>
3760
+ <p>This API can be used to override settings on specific data streams. These overrides will take precedence over what
3761
+ is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,
3762
+ only certain settings are allowed. If possible, the setting change is applied to all
3763
+ backing indices. Otherwise, it will be applied when the data stream is next rolled over.</p>
3764
+
3765
+
3766
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings>`_
3767
+
3768
+ :param name: A comma-separated list of data streams or data stream patterns.
3769
+ :param settings:
3770
+ :param dry_run: If `true`, the request does not actually change the settings
3771
+ on any data streams or indices. Instead, it simulates changing the settings
3772
+ and reports back to the user what would have happened had these settings
3773
+ actually been applied.
3774
+ :param master_timeout: The period to wait for a connection to the master node.
3775
+ If no response is received before the timeout expires, the request fails
3776
+ and returns an error.
3777
+ :param timeout: The period to wait for a response. If no response is received
3778
+ before the timeout expires, the request fails and returns an error.
3779
+ """
3780
+ if name in SKIP_IN_PATH:
3781
+ raise ValueError("Empty value passed for parameter 'name'")
3782
+ if settings is None and body is None:
3783
+ raise ValueError(
3784
+ "Empty value passed for parameters 'settings' and 'body', one of them should be set."
3785
+ )
3786
+ elif settings is not None and body is not None:
3787
+ raise ValueError("Cannot set both 'settings' and 'body'")
3788
+ __path_parts: t.Dict[str, str] = {"name": _quote(name)}
3789
+ __path = f'/_data_stream/{__path_parts["name"]}/_settings'
3790
+ __query: t.Dict[str, t.Any] = {}
3791
+ if dry_run is not None:
3792
+ __query["dry_run"] = dry_run
3793
+ if error_trace is not None:
3794
+ __query["error_trace"] = error_trace
3795
+ if filter_path is not None:
3796
+ __query["filter_path"] = filter_path
3797
+ if human is not None:
3798
+ __query["human"] = human
3799
+ if master_timeout is not None:
3800
+ __query["master_timeout"] = master_timeout
3801
+ if pretty is not None:
3802
+ __query["pretty"] = pretty
3803
+ if timeout is not None:
3804
+ __query["timeout"] = timeout
3805
+ __body = settings if settings is not None else body
3806
+ __headers = {"accept": "application/json", "content-type": "application/json"}
3807
+ return await self.perform_request( # type: ignore[return-value]
3808
+ "PUT",
3809
+ __path,
3810
+ params=__query,
3811
+ headers=__headers,
3812
+ body=__body,
3813
+ endpoint_id="indices.put_data_stream_settings",
3814
+ path_parts=__path_parts,
3815
+ )
3816
+
3474
3817
  @_rewrite_parameters(
3475
3818
  body_fields=(
3476
3819
  "allow_auto_create",
@@ -3535,7 +3878,7 @@ class IndicesClient(NamespacedClient):
3535
3878
  If an entry already exists with the same key, then it is overwritten by the new definition.</p>
3536
3879
 
3537
3880
 
3538
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-index-template>`_
3881
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template>`_
3539
3882
 
3540
3883
  :param name: Index or template name
3541
3884
  :param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
@@ -3698,27 +4041,20 @@ class IndicesClient(NamespacedClient):
3698
4041
 
3699
4042
  <p>Update field mappings.
3700
4043
  Add new fields to an existing data stream or index.
3701
- You can also use this API to change the search settings of existing fields and add new properties to existing object fields.
3702
- For data streams, these changes are applied to all backing indices by default.</p>
3703
- <p><strong>Add multi-fields to an existing field</strong></p>
3704
- <p>Multi-fields let you index the same field in different ways.
3705
- You can use this API to update the fields mapping parameter and enable multi-fields for an existing field.
3706
- WARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field.
3707
- You can populate the new multi-field with the update by query API.</p>
3708
- <p><strong>Change supported mapping parameters for an existing field</strong></p>
3709
- <p>The documentation for each mapping parameter indicates whether you can update it for an existing field using this API.
3710
- For example, you can use the update mapping API to update the <code>ignore_above</code> parameter.</p>
3711
- <p><strong>Change the mapping of an existing field</strong></p>
3712
- <p>Except for supported mapping parameters, you can't change the mapping or field type of an existing field.
3713
- Changing an existing field could invalidate data that's already indexed.</p>
3714
- <p>If you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams.
3715
- If you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index.</p>
3716
- <p><strong>Rename a field</strong></p>
3717
- <p>Renaming a field would invalidate data already indexed under the old field name.
3718
- Instead, add an alias field to create an alternate field name.</p>
3719
-
3720
-
3721
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-mapping>`_
4044
+ You can use the update mapping API to:</p>
4045
+ <ul>
4046
+ <li>Add a new field to an existing index</li>
4047
+ <li>Update mappings for multiple indices in a single request</li>
4048
+ <li>Add new properties to an object field</li>
4049
+ <li>Enable multi-fields for an existing field</li>
4050
+ <li>Update supported mapping parameters</li>
4051
+ <li>Change a field's mapping using reindexing</li>
4052
+ <li>Rename a field using a field alias</li>
4053
+ </ul>
4054
+ <p>Learn how to use the update mapping API with practical examples in the <a href="https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples">Update mapping API examples</a> guide.</p>
4055
+
4056
+
4057
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping>`_
3722
4058
 
3723
4059
  :param index: A comma-separated list of index names the mapping should be added
3724
4060
  to (supports wildcards); use `_all` or omit to add the mapping on all indices.
@@ -3734,7 +4070,7 @@ class IndicesClient(NamespacedClient):
3734
4070
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
3735
4071
  request can target data streams, this argument determines whether wildcard
3736
4072
  expressions match hidden data streams. Supports comma-separated values, such
3737
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
4073
+ as `open,hidden`.
3738
4074
  :param field_names: Control whether field names are enabled for the index.
3739
4075
  :param ignore_unavailable: If `false`, the request returns an error if it targets
3740
4076
  a missing or closed index.
@@ -3852,8 +4188,36 @@ class IndicesClient(NamespacedClient):
3852
4188
  Changes dynamic index settings in real time.
3853
4189
  For data streams, index setting changes are applied to all backing indices by default.</p>
3854
4190
  <p>To revert a setting to the default value, use a null value.
3855
- The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation.
4191
+ The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation.
3856
4192
  To preserve existing settings from being updated, set the <code>preserve_existing</code> parameter to <code>true</code>.</p>
4193
+ <p>For performance optimization during bulk indexing, you can disable the refresh interval.
4194
+ Refer to <a href="https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval">disable refresh interval</a> for an example.
4195
+ There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example:</p>
4196
+ <pre><code>{
4197
+ &quot;number_of_replicas&quot;: 1
4198
+ }
4199
+ </code></pre>
4200
+ <p>Or you can use an <code>index</code> setting object:</p>
4201
+ <pre><code>{
4202
+ &quot;index&quot;: {
4203
+ &quot;number_of_replicas&quot;: 1
4204
+ }
4205
+ }
4206
+ </code></pre>
4207
+ <p>Or you can use dot annotation:</p>
4208
+ <pre><code>{
4209
+ &quot;index.number_of_replicas&quot;: 1
4210
+ }
4211
+ </code></pre>
4212
+ <p>Or you can embed any of the aforementioned options in a <code>settings</code> object. For example:</p>
4213
+ <pre><code>{
4214
+ &quot;settings&quot;: {
4215
+ &quot;index&quot;: {
4216
+ &quot;number_of_replicas&quot;: 1
4217
+ }
4218
+ }
4219
+ }
4220
+ </code></pre>
3857
4221
  <p>NOTE: You can only define new analyzers on closed indices.
3858
4222
  To add an analyzer, you must close the index, define the analyzer, and reopen the index.
3859
4223
  You cannot close the write index of a data stream.
@@ -3861,10 +4225,11 @@ class IndicesClient(NamespacedClient):
3861
4225
  Then roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.
3862
4226
  This affects searches and any new data added to the stream after the rollover.
3863
4227
  However, it does not affect the data stream's backing indices or their existing data.
3864
- To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.</p>
4228
+ To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.
4229
+ Refer to <a href="https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices">updating analyzers on existing indices</a> for step-by-step examples.</p>
3865
4230
 
3866
4231
 
3867
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-settings>`_
4232
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings>`_
3868
4233
 
3869
4234
  :param settings:
3870
4235
  :param index: Comma-separated list of data streams, indices, and aliases used
@@ -3973,7 +4338,7 @@ class IndicesClient(NamespacedClient):
3973
4338
  """
3974
4339
  .. raw:: html
3975
4340
 
3976
- <p>Create or update an index template.
4341
+ <p>Create or update a legacy index template.
3977
4342
  Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
3978
4343
  Elasticsearch applies templates to new indices based on an index pattern that matches the index name.</p>
3979
4344
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
@@ -3990,7 +4355,7 @@ class IndicesClient(NamespacedClient):
3990
4355
  NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.</p>
3991
4356
 
3992
4357
 
3993
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-template>`_
4358
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-template>`_
3994
4359
 
3995
4360
  :param name: The name of the template
3996
4361
  :param aliases: Aliases for the index.
@@ -4062,10 +4427,20 @@ class IndicesClient(NamespacedClient):
4062
4427
  *,
4063
4428
  index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4064
4429
  active_only: t.Optional[bool] = None,
4430
+ allow_no_indices: t.Optional[bool] = None,
4065
4431
  detailed: t.Optional[bool] = None,
4066
4432
  error_trace: t.Optional[bool] = None,
4433
+ expand_wildcards: t.Optional[
4434
+ t.Union[
4435
+ t.Sequence[
4436
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4437
+ ],
4438
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4439
+ ]
4440
+ ] = None,
4067
4441
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4068
4442
  human: t.Optional[bool] = None,
4443
+ ignore_unavailable: t.Optional[bool] = None,
4069
4444
  pretty: t.Optional[bool] = None,
4070
4445
  ) -> ObjectApiResponse[t.Any]:
4071
4446
  """
@@ -4092,14 +4467,23 @@ class IndicesClient(NamespacedClient):
4092
4467
  This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.</p>
4093
4468
 
4094
4469
 
4095
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-recovery>`_
4470
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery>`_
4096
4471
 
4097
4472
  :param index: Comma-separated list of data streams, indices, and aliases used
4098
4473
  to limit the request. Supports wildcards (`*`). To target all data streams
4099
4474
  and indices, omit this parameter or use `*` or `_all`.
4100
4475
  :param active_only: If `true`, the response only includes ongoing shard recoveries.
4476
+ :param allow_no_indices: If `false`, the request returns an error if any wildcard
4477
+ expression, index alias, or `_all` value targets only missing or closed indices.
4478
+ This behavior applies even if the request targets other open indices.
4101
4479
  :param detailed: If `true`, the response includes detailed information about
4102
4480
  shard recoveries.
4481
+ :param expand_wildcards: Type of index that wildcard patterns can match. If the
4482
+ request can target data streams, this argument determines whether wildcard
4483
+ expressions match hidden data streams. Supports comma-separated values, such
4484
+ as `open,hidden`.
4485
+ :param ignore_unavailable: If `false`, the request returns an error if it targets
4486
+ a missing or closed index.
4103
4487
  """
4104
4488
  __path_parts: t.Dict[str, str]
4105
4489
  if index not in SKIP_IN_PATH:
@@ -4111,14 +4495,20 @@ class IndicesClient(NamespacedClient):
4111
4495
  __query: t.Dict[str, t.Any] = {}
4112
4496
  if active_only is not None:
4113
4497
  __query["active_only"] = active_only
4498
+ if allow_no_indices is not None:
4499
+ __query["allow_no_indices"] = allow_no_indices
4114
4500
  if detailed is not None:
4115
4501
  __query["detailed"] = detailed
4116
4502
  if error_trace is not None:
4117
4503
  __query["error_trace"] = error_trace
4504
+ if expand_wildcards is not None:
4505
+ __query["expand_wildcards"] = expand_wildcards
4118
4506
  if filter_path is not None:
4119
4507
  __query["filter_path"] = filter_path
4120
4508
  if human is not None:
4121
4509
  __query["human"] = human
4510
+ if ignore_unavailable is not None:
4511
+ __query["ignore_unavailable"] = ignore_unavailable
4122
4512
  if pretty is not None:
4123
4513
  __query["pretty"] = pretty
4124
4514
  __headers = {"accept": "application/json"}
@@ -4166,7 +4556,7 @@ class IndicesClient(NamespacedClient):
4166
4556
  This option ensures the indexing operation waits for a periodic refresh before running the search.</p>
4167
4557
 
4168
4558
 
4169
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-refresh>`_
4559
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh>`_
4170
4560
 
4171
4561
  :param index: Comma-separated list of data streams, indices, and aliases used
4172
4562
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -4177,7 +4567,7 @@ class IndicesClient(NamespacedClient):
4177
4567
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
4178
4568
  request can target data streams, this argument determines whether wildcard
4179
4569
  expressions match hidden data streams. Supports comma-separated values, such
4180
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
4570
+ as `open,hidden`.
4181
4571
  :param ignore_unavailable: If `false`, the request returns an error if it targets
4182
4572
  a missing or closed index.
4183
4573
  """
@@ -4250,7 +4640,7 @@ class IndicesClient(NamespacedClient):
4250
4640
  This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.</p>
4251
4641
 
4252
4642
 
4253
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-reload-search-analyzers>`_
4643
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers>`_
4254
4644
 
4255
4645
  :param index: A comma-separated list of index names to reload analyzers for
4256
4646
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
@@ -4293,6 +4683,105 @@ class IndicesClient(NamespacedClient):
4293
4683
  path_parts=__path_parts,
4294
4684
  )
4295
4685
 
4686
+ @_rewrite_parameters()
4687
+ async def remove_block(
4688
+ self,
4689
+ *,
4690
+ index: str,
4691
+ block: t.Union[str, t.Literal["metadata", "read", "read_only", "write"]],
4692
+ allow_no_indices: t.Optional[bool] = None,
4693
+ error_trace: t.Optional[bool] = None,
4694
+ expand_wildcards: t.Optional[
4695
+ t.Union[
4696
+ t.Sequence[
4697
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4698
+ ],
4699
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4700
+ ]
4701
+ ] = None,
4702
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4703
+ human: t.Optional[bool] = None,
4704
+ ignore_unavailable: t.Optional[bool] = None,
4705
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4706
+ pretty: t.Optional[bool] = None,
4707
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4708
+ ) -> ObjectApiResponse[t.Any]:
4709
+ """
4710
+ .. raw:: html
4711
+
4712
+ <p>Remove an index block.</p>
4713
+ <p>Remove an index block from an index.
4714
+ Index blocks limit the operations allowed on an index by blocking specific operation types.</p>
4715
+
4716
+
4717
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-remove-block>`_
4718
+
4719
+ :param index: A comma-separated list or wildcard expression of index names used
4720
+ to limit the request. By default, you must explicitly name the indices you
4721
+ are removing blocks from. To allow the removal of blocks from indices with
4722
+ `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name`
4723
+ setting to `false`. You can update this setting in the `elasticsearch.yml`
4724
+ file or by using the cluster update settings API.
4725
+ :param block: The block type to remove from the index.
4726
+ :param allow_no_indices: If `false`, the request returns an error if any wildcard
4727
+ expression, index alias, or `_all` value targets only missing or closed indices.
4728
+ This behavior applies even if the request targets other open indices. For
4729
+ example, a request targeting `foo*,bar*` returns an error if an index starts
4730
+ with `foo` but no index starts with `bar`.
4731
+ :param expand_wildcards: The type of index that wildcard patterns can match.
4732
+ If the request can target data streams, this argument determines whether
4733
+ wildcard expressions match hidden data streams. It supports comma-separated
4734
+ values, such as `open,hidden`.
4735
+ :param ignore_unavailable: If `false`, the request returns an error if it targets
4736
+ a missing or closed index.
4737
+ :param master_timeout: The period to wait for the master node. If the master
4738
+ node is not available before the timeout expires, the request fails and returns
4739
+ an error. It can also be set to `-1` to indicate that the request should
4740
+ never timeout.
4741
+ :param timeout: The period to wait for a response from all relevant nodes in
4742
+ the cluster after updating the cluster metadata. If no response is received
4743
+ before the timeout expires, the cluster metadata update still applies but
4744
+ the response will indicate that it was not completely acknowledged. It can
4745
+ also be set to `-1` to indicate that the request should never timeout.
4746
+ """
4747
+ if index in SKIP_IN_PATH:
4748
+ raise ValueError("Empty value passed for parameter 'index'")
4749
+ if block in SKIP_IN_PATH:
4750
+ raise ValueError("Empty value passed for parameter 'block'")
4751
+ __path_parts: t.Dict[str, str] = {
4752
+ "index": _quote(index),
4753
+ "block": _quote(block),
4754
+ }
4755
+ __path = f'/{__path_parts["index"]}/_block/{__path_parts["block"]}'
4756
+ __query: t.Dict[str, t.Any] = {}
4757
+ if allow_no_indices is not None:
4758
+ __query["allow_no_indices"] = allow_no_indices
4759
+ if error_trace is not None:
4760
+ __query["error_trace"] = error_trace
4761
+ if expand_wildcards is not None:
4762
+ __query["expand_wildcards"] = expand_wildcards
4763
+ if filter_path is not None:
4764
+ __query["filter_path"] = filter_path
4765
+ if human is not None:
4766
+ __query["human"] = human
4767
+ if ignore_unavailable is not None:
4768
+ __query["ignore_unavailable"] = ignore_unavailable
4769
+ if master_timeout is not None:
4770
+ __query["master_timeout"] = master_timeout
4771
+ if pretty is not None:
4772
+ __query["pretty"] = pretty
4773
+ if timeout is not None:
4774
+ __query["timeout"] = timeout
4775
+ __headers = {"accept": "application/json"}
4776
+ return await self.perform_request( # type: ignore[return-value]
4777
+ "DELETE",
4778
+ __path,
4779
+ params=__query,
4780
+ headers=__headers,
4781
+ endpoint_id="indices.remove_block",
4782
+ path_parts=__path_parts,
4783
+ )
4784
+
4296
4785
  @_rewrite_parameters()
4297
4786
  async def resolve_cluster(
4298
4787
  self,
@@ -4357,7 +4846,7 @@ class IndicesClient(NamespacedClient):
4357
4846
  If a connection was (re-)established, this will also cause the <code>remote/info</code> endpoint to now indicate a connected status.</p>
4358
4847
 
4359
4848
 
4360
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-resolve-cluster>`_
4849
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster>`_
4361
4850
 
4362
4851
  :param name: A comma-separated list of names or index patterns for the indices,
4363
4852
  aliases, and data streams to resolve. Resources on remote clusters can be
@@ -4376,10 +4865,9 @@ class IndicesClient(NamespacedClient):
4376
4865
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
4377
4866
  request can target data streams, this argument determines whether wildcard
4378
4867
  expressions match hidden data streams. Supports comma-separated values, such
4379
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
4380
- NOTE: This option is only supported when specifying an index expression.
4381
- You will get an error if you specify index options to the `_resolve/cluster`
4382
- API endpoint that takes no index expression.
4868
+ as `open,hidden`. NOTE: This option is only supported when specifying an
4869
+ index expression. You will get an error if you specify index options to the
4870
+ `_resolve/cluster` API endpoint that takes no index expression.
4383
4871
  :param ignore_throttled: If true, concrete, expanded, or aliased indices are
4384
4872
  ignored when frozen. NOTE: This option is only supported when specifying
4385
4873
  an index expression. You will get an error if you specify index options to
@@ -4459,7 +4947,7 @@ class IndicesClient(NamespacedClient):
4459
4947
  Multiple patterns and remote clusters are supported.</p>
4460
4948
 
4461
4949
 
4462
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-resolve-index>`_
4950
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-index>`_
4463
4951
 
4464
4952
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
4465
4953
  and data streams to resolve. Resources on remote clusters can be specified
@@ -4472,7 +4960,7 @@ class IndicesClient(NamespacedClient):
4472
4960
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
4473
4961
  request can target data streams, this argument determines whether wildcard
4474
4962
  expressions match hidden data streams. Supports comma-separated values, such
4475
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
4963
+ as `open,hidden`.
4476
4964
  :param ignore_unavailable: If `false`, the request returns an error if it targets
4477
4965
  a missing or closed index.
4478
4966
  """
@@ -4561,7 +5049,7 @@ class IndicesClient(NamespacedClient):
4561
5049
  If you roll over the alias on May 7, 2099, the new index's name is <code>my-index-2099.05.07-000002</code>.</p>
4562
5050
 
4563
5051
 
4564
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-rollover>`_
5052
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-rollover>`_
4565
5053
 
4566
5054
  :param alias: Name of the data stream or index alias to roll over.
4567
5055
  :param new_index: Name of the index to create. Supports date math. Data streams
@@ -4675,7 +5163,7 @@ class IndicesClient(NamespacedClient):
4675
5163
  For data streams, the API returns information about the stream's backing indices.</p>
4676
5164
 
4677
5165
 
4678
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-segments>`_
5166
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-segments>`_
4679
5167
 
4680
5168
  :param index: Comma-separated list of data streams, indices, and aliases used
4681
5169
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -4686,7 +5174,7 @@ class IndicesClient(NamespacedClient):
4686
5174
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
4687
5175
  request can target data streams, this argument determines whether wildcard
4688
5176
  expressions match hidden data streams. Supports comma-separated values, such
4689
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
5177
+ as `open,hidden`.
4690
5178
  :param ignore_unavailable: If `false`, the request returns an error if it targets
4691
5179
  a missing or closed index.
4692
5180
  """
@@ -4764,7 +5252,7 @@ class IndicesClient(NamespacedClient):
4764
5252
  <p>By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.</p>
4765
5253
 
4766
5254
 
4767
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-shard-stores>`_
5255
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shard-stores>`_
4768
5256
 
4769
5257
  :param index: List of data streams, indices, and aliases used to limit the request.
4770
5258
  :param allow_no_indices: If false, the request returns an error if any wildcard
@@ -4866,7 +5354,7 @@ class IndicesClient(NamespacedClient):
4866
5354
  </ul>
4867
5355
 
4868
5356
 
4869
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-shrink>`_
5357
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shrink>`_
4870
5358
 
4871
5359
  :param index: Name of the source index to shrink.
4872
5360
  :param target: Name of the target index to create.
@@ -4947,7 +5435,7 @@ class IndicesClient(NamespacedClient):
4947
5435
  Get the index configuration that would be applied to the specified index from an existing index template.</p>
4948
5436
 
4949
5437
 
4950
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-simulate-index-template>`_
5438
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template>`_
4951
5439
 
4952
5440
  :param name: Name of the index to simulate
4953
5441
  :param cause: User defined reason for dry-run creating the new template for simulation
@@ -5037,7 +5525,7 @@ class IndicesClient(NamespacedClient):
5037
5525
  Get the index configuration that would be applied by a particular index template.</p>
5038
5526
 
5039
5527
 
5040
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-simulate-template>`_
5528
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template>`_
5041
5529
 
5042
5530
  :param name: Name of the index template to simulate. To test a template configuration
5043
5531
  before you add it to the cluster, omit this parameter and specify the template
@@ -5209,7 +5697,7 @@ class IndicesClient(NamespacedClient):
5209
5697
  </ul>
5210
5698
 
5211
5699
 
5212
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-split>`_
5700
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-split>`_
5213
5701
 
5214
5702
  :param index: Name of the source index to split.
5215
5703
  :param target: Name of the target index to create.
@@ -5311,7 +5799,7 @@ class IndicesClient(NamespacedClient):
5311
5799
  Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.</p>
5312
5800
 
5313
5801
 
5314
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-stats>`_
5802
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-stats>`_
5315
5803
 
5316
5804
  :param index: A comma-separated list of index names; use `_all` or empty string
5317
5805
  to perform the operation on all indices
@@ -5410,7 +5898,7 @@ class IndicesClient(NamespacedClient):
5410
5898
  Adds a data stream or index to an alias.</p>
5411
5899
 
5412
5900
 
5413
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-update-aliases>`_
5901
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases>`_
5414
5902
 
5415
5903
  :param actions: Actions to perform.
5416
5904
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -5489,7 +5977,7 @@ class IndicesClient(NamespacedClient):
5489
5977
  Validates a query without running it.</p>
5490
5978
 
5491
5979
 
5492
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-validate-query>`_
5980
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query>`_
5493
5981
 
5494
5982
  :param index: Comma-separated list of data streams, indices, and aliases to search.
5495
5983
  Supports wildcards (`*`). To search all data streams or indices, omit this
@@ -5510,7 +5998,7 @@ class IndicesClient(NamespacedClient):
5510
5998
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
5511
5999
  request can target data streams, this argument determines whether wildcard
5512
6000
  expressions match hidden data streams. Supports comma-separated values, such
5513
- as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
6001
+ as `open,hidden`.
5514
6002
  :param explain: If `true`, the response returns detailed information if an error
5515
6003
  has occurred.
5516
6004
  :param ignore_unavailable: If `false`, the request returns an error if it targets