elasticsearch 9.0.4__py3-none-any.whl → 9.1.1__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 (95) hide show
  1. elasticsearch/__init__.py +3 -3
  2. elasticsearch/_async/client/__init__.py +42 -42
  3. elasticsearch/_async/client/async_search.py +4 -4
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -26
  6. elasticsearch/_async/client/ccr.py +13 -13
  7. elasticsearch/_async/client/cluster.py +25 -20
  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 +4 -4
  12. elasticsearch/_async/client/esql.py +112 -5
  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 +504 -69
  18. elasticsearch/_async/client/inference.py +419 -46
  19. elasticsearch/_async/client/ingest.py +9 -9
  20. elasticsearch/_async/client/license.py +7 -7
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +72 -73
  24. elasticsearch/_async/client/nodes.py +7 -7
  25. elasticsearch/_async/client/query_rules.py +8 -8
  26. elasticsearch/_async/client/rollup.py +8 -8
  27. elasticsearch/_async/client/search_application.py +10 -10
  28. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  29. elasticsearch/_async/client/security.py +68 -64
  30. elasticsearch/_async/client/shutdown.py +3 -3
  31. elasticsearch/_async/client/simulate.py +1 -1
  32. elasticsearch/_async/client/slm.py +9 -9
  33. elasticsearch/_async/client/snapshot.py +58 -21
  34. elasticsearch/_async/client/sql.py +6 -6
  35. elasticsearch/_async/client/ssl.py +1 -1
  36. elasticsearch/_async/client/synonyms.py +25 -7
  37. elasticsearch/_async/client/tasks.py +4 -4
  38. elasticsearch/_async/client/text_structure.py +4 -4
  39. elasticsearch/_async/client/transform.py +11 -11
  40. elasticsearch/_async/client/watcher.py +13 -13
  41. elasticsearch/_async/client/xpack.py +2 -2
  42. elasticsearch/_otel.py +8 -8
  43. elasticsearch/_sync/client/__init__.py +42 -42
  44. elasticsearch/_sync/client/async_search.py +4 -4
  45. elasticsearch/_sync/client/autoscaling.py +4 -4
  46. elasticsearch/_sync/client/cat.py +26 -26
  47. elasticsearch/_sync/client/ccr.py +13 -13
  48. elasticsearch/_sync/client/cluster.py +25 -20
  49. elasticsearch/_sync/client/connector.py +30 -30
  50. elasticsearch/_sync/client/dangling_indices.py +3 -3
  51. elasticsearch/_sync/client/enrich.py +5 -5
  52. elasticsearch/_sync/client/eql.py +4 -4
  53. elasticsearch/_sync/client/esql.py +112 -5
  54. elasticsearch/_sync/client/features.py +2 -2
  55. elasticsearch/_sync/client/fleet.py +3 -3
  56. elasticsearch/_sync/client/graph.py +1 -1
  57. elasticsearch/_sync/client/ilm.py +11 -11
  58. elasticsearch/_sync/client/indices.py +504 -69
  59. elasticsearch/_sync/client/inference.py +419 -46
  60. elasticsearch/_sync/client/ingest.py +9 -9
  61. elasticsearch/_sync/client/license.py +7 -7
  62. elasticsearch/_sync/client/logstash.py +3 -3
  63. elasticsearch/_sync/client/migration.py +3 -3
  64. elasticsearch/_sync/client/ml.py +72 -73
  65. elasticsearch/_sync/client/nodes.py +7 -7
  66. elasticsearch/_sync/client/query_rules.py +8 -8
  67. elasticsearch/_sync/client/rollup.py +8 -8
  68. elasticsearch/_sync/client/search_application.py +10 -10
  69. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  70. elasticsearch/_sync/client/security.py +68 -64
  71. elasticsearch/_sync/client/shutdown.py +3 -3
  72. elasticsearch/_sync/client/simulate.py +1 -1
  73. elasticsearch/_sync/client/slm.py +9 -9
  74. elasticsearch/_sync/client/snapshot.py +58 -21
  75. elasticsearch/_sync/client/sql.py +6 -6
  76. elasticsearch/_sync/client/ssl.py +1 -1
  77. elasticsearch/_sync/client/synonyms.py +25 -7
  78. elasticsearch/_sync/client/tasks.py +4 -4
  79. elasticsearch/_sync/client/text_structure.py +4 -4
  80. elasticsearch/_sync/client/transform.py +11 -11
  81. elasticsearch/_sync/client/watcher.py +13 -13
  82. elasticsearch/_sync/client/xpack.py +2 -2
  83. elasticsearch/_version.py +1 -1
  84. elasticsearch/dsl/aggs.py +20 -0
  85. elasticsearch/dsl/document_base.py +2 -3
  86. elasticsearch/dsl/field.py +18 -0
  87. elasticsearch/dsl/query.py +1 -1
  88. elasticsearch/dsl/response/__init__.py +1 -1
  89. elasticsearch/dsl/types.py +163 -5
  90. {elasticsearch-9.0.4.dist-info → elasticsearch-9.1.1.dist-info}/METADATA +3 -4
  91. elasticsearch-9.1.1.dist-info/RECORD +163 -0
  92. elasticsearch-9.0.4.dist-info/RECORD +0 -163
  93. {elasticsearch-9.0.4.dist-info → elasticsearch-9.1.1.dist-info}/WHEEL +0 -0
  94. {elasticsearch-9.0.4.dist-info → elasticsearch-9.1.1.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch-9.0.4.dist-info → elasticsearch-9.1.1.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
@@ -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.
@@ -654,7 +654,7 @@ 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
659
  :param index: Name of the index you wish to create. Index names must meet the
660
660
  following criteria: * Lowercase only * Cannot include `\\`, `/`, `*`, `?`,
@@ -739,7 +739,7 @@ class IndicesClient(NamespacedClient):
739
739
  <p>You must have a matching index template with data stream enabled.</p>
740
740
 
741
741
 
742
- `<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>`_
743
743
 
744
744
  :param name: Name of the data stream, which must meet the following criteria:
745
745
  Lowercase only; Cannot include `\\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`,
@@ -802,7 +802,7 @@ class IndicesClient(NamespacedClient):
802
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>
803
803
 
804
804
 
805
- `<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>`_
806
806
 
807
807
  :param source: The source index or data stream name
808
808
  :param dest: The destination index or data stream name
@@ -869,7 +869,7 @@ class IndicesClient(NamespacedClient):
869
869
  <p>Get statistics for one or more data streams.</p>
870
870
 
871
871
 
872
- `<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>`_
873
873
 
874
874
  :param name: Comma-separated list of data streams used to limit the request.
875
875
  Wildcard expressions (`*`) are supported. To target all data streams in a
@@ -938,7 +938,7 @@ class IndicesClient(NamespacedClient):
938
938
  You can then use the delete index API to delete the previous write index.</p>
939
939
 
940
940
 
941
- `<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>`_
942
942
 
943
943
  :param index: Comma-separated list of indices to delete. You cannot specify index
944
944
  aliases. By default, this parameter does not support wildcards (`*`) or `_all`.
@@ -1012,7 +1012,7 @@ class IndicesClient(NamespacedClient):
1012
1012
  Removes a data stream or index from an alias.</p>
1013
1013
 
1014
1014
 
1015
- `<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>`_
1016
1016
 
1017
1017
  :param index: Comma-separated list of data streams or indices used to limit the
1018
1018
  request. Supports wildcards (`*`).
@@ -1080,7 +1080,7 @@ class IndicesClient(NamespacedClient):
1080
1080
  Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
1081
1081
 
1082
1082
 
1083
- `<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>`_
1084
1084
 
1085
1085
  :param name: A comma-separated list of data streams of which the data stream
1086
1086
  lifecycle will be deleted; use `*` to get all data streams
@@ -1144,7 +1144,7 @@ class IndicesClient(NamespacedClient):
1144
1144
  Deletes one or more data streams and their backing indices.</p>
1145
1145
 
1146
1146
 
1147
- `<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>`_
1148
1148
 
1149
1149
  :param name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions
1150
1150
  are supported.
@@ -1181,6 +1181,71 @@ class IndicesClient(NamespacedClient):
1181
1181
  path_parts=__path_parts,
1182
1182
  )
1183
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/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options>`_
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
+
1184
1249
  @_rewrite_parameters()
1185
1250
  async def delete_index_template(
1186
1251
  self,
@@ -1202,7 +1267,7 @@ class IndicesClient(NamespacedClient):
1202
1267
  existing templates.</p>
1203
1268
 
1204
1269
 
1205
- `<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>`_
1206
1271
 
1207
1272
  :param name: Comma-separated list of index template names used to limit the request.
1208
1273
  Wildcard (*) expressions are supported.
@@ -1258,7 +1323,7 @@ class IndicesClient(NamespacedClient):
1258
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>
1259
1324
 
1260
1325
 
1261
- `<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>`_
1262
1327
 
1263
1328
  :param name: The name of the legacy index template to delete. Wildcard (`*`)
1264
1329
  expressions are supported.
@@ -1330,7 +1395,7 @@ class IndicesClient(NamespacedClient):
1330
1395
  The stored size of the <code>_id</code> field is likely underestimated while the <code>_source</code> field is overestimated.</p>
1331
1396
 
1332
1397
 
1333
- `<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>`_
1334
1399
 
1335
1400
  :param index: Comma-separated list of data streams, indices, and aliases used
1336
1401
  to limit the request. It’s recommended to execute this API with a single
@@ -1413,7 +1478,7 @@ class IndicesClient(NamespacedClient):
1413
1478
  The source index must be read only (<code>index.blocks.write: true</code>).</p>
1414
1479
 
1415
1480
 
1416
- `<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>`_
1417
1482
 
1418
1483
  :param index: Name of the time series index to downsample.
1419
1484
  :param target_index: Name of the index to create.
@@ -1485,7 +1550,7 @@ class IndicesClient(NamespacedClient):
1485
1550
  Check if one or more indices, index aliases, or data streams exist.</p>
1486
1551
 
1487
1552
 
1488
- `<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>`_
1489
1554
 
1490
1555
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1491
1556
  wildcards (`*`).
@@ -1567,7 +1632,7 @@ class IndicesClient(NamespacedClient):
1567
1632
  <p>Check if one or more data stream or index aliases exist.</p>
1568
1633
 
1569
1634
 
1570
- `<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>`_
1571
1636
 
1572
1637
  :param name: Comma-separated list of aliases to check. Supports wildcards (`*`).
1573
1638
  :param index: Comma-separated list of data streams or indices used to limit the
@@ -1644,7 +1709,7 @@ class IndicesClient(NamespacedClient):
1644
1709
  <p>Check whether index templates exist.</p>
1645
1710
 
1646
1711
 
1647
- `<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>`_
1648
1713
 
1649
1714
  :param name: Comma-separated list of index template names used to limit the request.
1650
1715
  Wildcard (*) expressions are supported.
@@ -1707,7 +1772,7 @@ class IndicesClient(NamespacedClient):
1707
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>
1708
1773
 
1709
1774
 
1710
- `<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>`_
1711
1776
 
1712
1777
  :param name: A comma-separated list of index template names used to limit the
1713
1778
  request. Wildcard (`*`) expressions are supported.
@@ -1765,7 +1830,7 @@ class IndicesClient(NamespacedClient):
1765
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>
1766
1831
 
1767
1832
 
1768
- `<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>`_
1769
1834
 
1770
1835
  :param index: The name of the index to explain
1771
1836
  :param include_defaults: indicates if the API should return the default values
@@ -1832,7 +1897,7 @@ class IndicesClient(NamespacedClient):
1832
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>
1833
1898
 
1834
1899
 
1835
- `<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>`_
1836
1901
 
1837
1902
  :param index: Comma-separated list or wildcard expression of index names used
1838
1903
  to limit the request.
@@ -1917,7 +1982,7 @@ class IndicesClient(NamespacedClient):
1917
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>
1918
1983
 
1919
1984
 
1920
- `<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>`_
1921
1986
 
1922
1987
  :param index: Comma-separated list of data streams, indices, and aliases to flush.
1923
1988
  Supports wildcards (`*`). To flush all data streams and indices, omit this
@@ -2042,7 +2107,7 @@ class IndicesClient(NamespacedClient):
2042
2107
  </code></pre>
2043
2108
 
2044
2109
 
2045
- `<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>`_
2046
2111
 
2047
2112
  :param index: A comma-separated list of index names; use `_all` or empty string
2048
2113
  to perform the operation on all indices
@@ -2140,7 +2205,7 @@ class IndicesClient(NamespacedClient):
2140
2205
  stream’s backing indices.</p>
2141
2206
 
2142
2207
 
2143
- `<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>`_
2144
2209
 
2145
2210
  :param index: Comma-separated list of data streams, indices, and index aliases
2146
2211
  used to limit the request. Wildcard expressions (*) are supported.
@@ -2233,7 +2298,7 @@ class IndicesClient(NamespacedClient):
2233
2298
  Retrieves information for one or more data stream or index aliases.</p>
2234
2299
 
2235
2300
 
2236
- `<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>`_
2237
2302
 
2238
2303
  :param index: Comma-separated list of data streams or indices used to limit the
2239
2304
  request. Supports wildcards (`*`). To target all data streams and indices,
@@ -2320,7 +2385,7 @@ class IndicesClient(NamespacedClient):
2320
2385
  <p>Get the data stream lifecycle configuration of one or more data streams.</p>
2321
2386
 
2322
2387
 
2323
- `<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>`_
2324
2389
 
2325
2390
  :param name: Comma-separated list of data streams to limit the request. Supports
2326
2391
  wildcards (`*`). To target all data streams, omit this parameter or use `*`
@@ -2377,7 +2442,7 @@ class IndicesClient(NamespacedClient):
2377
2442
  Get statistics about the data streams that are managed by a data stream lifecycle.</p>
2378
2443
 
2379
2444
 
2380
- `<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>`_
2381
2446
  """
2382
2447
  __path_parts: t.Dict[str, str] = {}
2383
2448
  __path = "/_lifecycle/stats"
@@ -2428,7 +2493,7 @@ class IndicesClient(NamespacedClient):
2428
2493
  <p>Get information about one or more data streams.</p>
2429
2494
 
2430
2495
 
2431
- `<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>`_
2432
2497
 
2433
2498
  :param name: Comma-separated list of data stream names used to limit the request.
2434
2499
  Wildcard (`*`) expressions are supported. If omitted, all data streams are
@@ -2477,6 +2542,121 @@ class IndicesClient(NamespacedClient):
2477
2542
  path_parts=__path_parts,
2478
2543
  )
2479
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/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options>`_
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
+
2480
2660
  @_rewrite_parameters()
2481
2661
  async def get_field_mapping(
2482
2662
  self,
@@ -2497,7 +2677,6 @@ class IndicesClient(NamespacedClient):
2497
2677
  human: t.Optional[bool] = None,
2498
2678
  ignore_unavailable: t.Optional[bool] = None,
2499
2679
  include_defaults: t.Optional[bool] = None,
2500
- local: t.Optional[bool] = None,
2501
2680
  pretty: t.Optional[bool] = None,
2502
2681
  ) -> ObjectApiResponse[t.Any]:
2503
2682
  """
@@ -2509,7 +2688,7 @@ class IndicesClient(NamespacedClient):
2509
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>
2510
2689
 
2511
2690
 
2512
- `<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>`_
2513
2692
 
2514
2693
  :param fields: Comma-separated list or wildcard expression of fields used to
2515
2694
  limit returned information. Supports wildcards (`*`).
@@ -2526,8 +2705,6 @@ class IndicesClient(NamespacedClient):
2526
2705
  :param ignore_unavailable: If `false`, the request returns an error if it targets
2527
2706
  a missing or closed index.
2528
2707
  :param include_defaults: If `true`, return all default settings in the response.
2529
- :param local: If `true`, the request retrieves information from the local node
2530
- only.
2531
2708
  """
2532
2709
  if fields in SKIP_IN_PATH:
2533
2710
  raise ValueError("Empty value passed for parameter 'fields'")
@@ -2555,8 +2732,6 @@ class IndicesClient(NamespacedClient):
2555
2732
  __query["ignore_unavailable"] = ignore_unavailable
2556
2733
  if include_defaults is not None:
2557
2734
  __query["include_defaults"] = include_defaults
2558
- if local is not None:
2559
- __query["local"] = local
2560
2735
  if pretty is not None:
2561
2736
  __query["pretty"] = pretty
2562
2737
  __headers = {"accept": "application/json"}
@@ -2590,7 +2765,7 @@ class IndicesClient(NamespacedClient):
2590
2765
  Get information about one or more index templates.</p>
2591
2766
 
2592
2767
 
2593
- `<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>`_
2594
2769
 
2595
2770
  :param name: Comma-separated list of index template names used to limit the request.
2596
2771
  Wildcard (*) expressions are supported.
@@ -2667,7 +2842,7 @@ class IndicesClient(NamespacedClient):
2667
2842
  For data streams, the API retrieves mappings for the stream’s backing indices.</p>
2668
2843
 
2669
2844
 
2670
- `<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>`_
2671
2846
 
2672
2847
  :param index: Comma-separated list of data streams, indices, and aliases used
2673
2848
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2741,7 +2916,7 @@ class IndicesClient(NamespacedClient):
2741
2916
  <p>Get the status of a migration reindex attempt for a data stream or index.</p>
2742
2917
 
2743
2918
 
2744
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-migration>`_
2919
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration>`_
2745
2920
 
2746
2921
  :param index: The index or data stream name.
2747
2922
  """
@@ -2801,7 +2976,7 @@ class IndicesClient(NamespacedClient):
2801
2976
  For data streams, it returns setting information for the stream's backing indices.</p>
2802
2977
 
2803
2978
 
2804
- `<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>`_
2805
2980
 
2806
2981
  :param index: Comma-separated list of data streams, indices, and aliases used
2807
2982
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2893,7 +3068,7 @@ class IndicesClient(NamespacedClient):
2893
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>
2894
3069
 
2895
3070
 
2896
- `<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>`_
2897
3072
 
2898
3073
  :param name: Comma-separated list of index template names used to limit the request.
2899
3074
  Wildcard (`*`) expressions are supported. To return all index templates,
@@ -2960,7 +3135,7 @@ class IndicesClient(NamespacedClient):
2960
3135
  The persistent task ID is returned immediately and the reindexing work is completed in that task.</p>
2961
3136
 
2962
3137
 
2963
- `<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>`_
2964
3139
 
2965
3140
  :param reindex:
2966
3141
  """
@@ -3021,7 +3196,7 @@ class IndicesClient(NamespacedClient):
3021
3196
  The write index for the alias becomes the write index for the stream.</p>
3022
3197
 
3023
3198
 
3024
- `<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>`_
3025
3200
 
3026
3201
  :param name: Name of the index alias to convert to a data stream.
3027
3202
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -3077,7 +3252,7 @@ class IndicesClient(NamespacedClient):
3077
3252
  Performs one or more data stream modification actions in a single atomic operation.</p>
3078
3253
 
3079
3254
 
3080
- `<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>`_
3081
3256
 
3082
3257
  :param actions: Actions to perform.
3083
3258
  """
@@ -3156,7 +3331,7 @@ class IndicesClient(NamespacedClient):
3156
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>
3157
3332
 
3158
3333
 
3159
- `<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>`_
3160
3335
 
3161
3336
  :param index: Comma-separated list of data streams, indices, and aliases used
3162
3337
  to limit the request. Supports wildcards (`*`). By default, you must explicitly
@@ -3242,7 +3417,7 @@ class IndicesClient(NamespacedClient):
3242
3417
  This will affect the lifecycle management of the data stream and interfere with the data stream size and retention.</p>
3243
3418
 
3244
3419
 
3245
- `<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>`_
3246
3421
 
3247
3422
  :param name: The name of the data stream
3248
3423
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -3308,7 +3483,7 @@ class IndicesClient(NamespacedClient):
3308
3483
  Adds a data stream or index to an alias.</p>
3309
3484
 
3310
3485
 
3311
- `<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>`_
3312
3487
 
3313
3488
  :param index: Comma-separated list of data streams or indices to add. Supports
3314
3489
  wildcards (`*`). Wildcard patterns that match both data streams and indices
@@ -3415,7 +3590,7 @@ class IndicesClient(NamespacedClient):
3415
3590
  Update the data stream lifecycle of the specified data streams.</p>
3416
3591
 
3417
3592
 
3418
- `<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>`_
3419
3594
 
3420
3595
  :param name: Comma-separated list of data streams used to limit the request.
3421
3596
  Supports wildcards (`*`). To target all data streams use `*` or `_all`.
@@ -3478,6 +3653,167 @@ class IndicesClient(NamespacedClient):
3478
3653
  path_parts=__path_parts,
3479
3654
  )
3480
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/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options>`_
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
+
3481
3817
  @_rewrite_parameters(
3482
3818
  body_fields=(
3483
3819
  "allow_auto_create",
@@ -3542,7 +3878,7 @@ class IndicesClient(NamespacedClient):
3542
3878
  If an entry already exists with the same key, then it is overwritten by the new definition.</p>
3543
3879
 
3544
3880
 
3545
- `<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>`_
3546
3882
 
3547
3883
  :param name: Index or template name
3548
3884
  :param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
@@ -3718,7 +4054,7 @@ class IndicesClient(NamespacedClient):
3718
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>
3719
4055
 
3720
4056
 
3721
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-mapping>`_
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.
@@ -3893,7 +4229,7 @@ class IndicesClient(NamespacedClient):
3893
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>
3894
4230
 
3895
4231
 
3896
- `<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>`_
3897
4233
 
3898
4234
  :param settings:
3899
4235
  :param index: Comma-separated list of data streams, indices, and aliases used
@@ -4019,7 +4355,7 @@ class IndicesClient(NamespacedClient):
4019
4355
  NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.</p>
4020
4356
 
4021
4357
 
4022
- `<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>`_
4023
4359
 
4024
4360
  :param name: The name of the template
4025
4361
  :param aliases: Aliases for the index.
@@ -4131,7 +4467,7 @@ class IndicesClient(NamespacedClient):
4131
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>
4132
4468
 
4133
4469
 
4134
- `<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>`_
4135
4471
 
4136
4472
  :param index: Comma-separated list of data streams, indices, and aliases used
4137
4473
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -4220,7 +4556,7 @@ class IndicesClient(NamespacedClient):
4220
4556
  This option ensures the indexing operation waits for a periodic refresh before running the search.</p>
4221
4557
 
4222
4558
 
4223
- `<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>`_
4224
4560
 
4225
4561
  :param index: Comma-separated list of data streams, indices, and aliases used
4226
4562
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -4304,7 +4640,7 @@ class IndicesClient(NamespacedClient):
4304
4640
  This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.</p>
4305
4641
 
4306
4642
 
4307
- `<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>`_
4308
4644
 
4309
4645
  :param index: A comma-separated list of index names to reload analyzers for
4310
4646
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
@@ -4347,6 +4683,105 @@ class IndicesClient(NamespacedClient):
4347
4683
  path_parts=__path_parts,
4348
4684
  )
4349
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
+
4350
4785
  @_rewrite_parameters()
4351
4786
  async def resolve_cluster(
4352
4787
  self,
@@ -4411,7 +4846,7 @@ class IndicesClient(NamespacedClient):
4411
4846
  If a connection was (re-)established, this will also cause the <code>remote/info</code> endpoint to now indicate a connected status.</p>
4412
4847
 
4413
4848
 
4414
- `<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>`_
4415
4850
 
4416
4851
  :param name: A comma-separated list of names or index patterns for the indices,
4417
4852
  aliases, and data streams to resolve. Resources on remote clusters can be
@@ -4512,7 +4947,7 @@ class IndicesClient(NamespacedClient):
4512
4947
  Multiple patterns and remote clusters are supported.</p>
4513
4948
 
4514
4949
 
4515
- `<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>`_
4516
4951
 
4517
4952
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
4518
4953
  and data streams to resolve. Resources on remote clusters can be specified
@@ -4587,7 +5022,7 @@ class IndicesClient(NamespacedClient):
4587
5022
  .. raw:: html
4588
5023
 
4589
5024
  <p>Roll over to a new index.
4590
- TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.</p>
5025
+ TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.</p>
4591
5026
  <p>The rollover API creates a new index for a data stream or index alias.
4592
5027
  The API behavior depends on the rollover target.</p>
4593
5028
  <p><strong>Roll over a data stream</strong></p>
@@ -4614,7 +5049,7 @@ class IndicesClient(NamespacedClient):
4614
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>
4615
5050
 
4616
5051
 
4617
- `<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>`_
4618
5053
 
4619
5054
  :param alias: Name of the data stream or index alias to roll over.
4620
5055
  :param new_index: Name of the index to create. Supports date math. Data streams
@@ -4728,7 +5163,7 @@ class IndicesClient(NamespacedClient):
4728
5163
  For data streams, the API returns information about the stream's backing indices.</p>
4729
5164
 
4730
5165
 
4731
- `<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>`_
4732
5167
 
4733
5168
  :param index: Comma-separated list of data streams, indices, and aliases used
4734
5169
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -4817,7 +5252,7 @@ class IndicesClient(NamespacedClient):
4817
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>
4818
5253
 
4819
5254
 
4820
- `<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>`_
4821
5256
 
4822
5257
  :param index: List of data streams, indices, and aliases used to limit the request.
4823
5258
  :param allow_no_indices: If false, the request returns an error if any wildcard
@@ -4919,7 +5354,7 @@ class IndicesClient(NamespacedClient):
4919
5354
  </ul>
4920
5355
 
4921
5356
 
4922
- `<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>`_
4923
5358
 
4924
5359
  :param index: Name of the source index to shrink.
4925
5360
  :param target: Name of the target index to create.
@@ -5000,7 +5435,7 @@ class IndicesClient(NamespacedClient):
5000
5435
  Get the index configuration that would be applied to the specified index from an existing index template.</p>
5001
5436
 
5002
5437
 
5003
- `<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>`_
5004
5439
 
5005
5440
  :param name: Name of the index to simulate
5006
5441
  :param cause: User defined reason for dry-run creating the new template for simulation
@@ -5090,7 +5525,7 @@ class IndicesClient(NamespacedClient):
5090
5525
  Get the index configuration that would be applied by a particular index template.</p>
5091
5526
 
5092
5527
 
5093
- `<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>`_
5094
5529
 
5095
5530
  :param name: Name of the index template to simulate. To test a template configuration
5096
5531
  before you add it to the cluster, omit this parameter and specify the template
@@ -5262,7 +5697,7 @@ class IndicesClient(NamespacedClient):
5262
5697
  </ul>
5263
5698
 
5264
5699
 
5265
- `<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>`_
5266
5701
 
5267
5702
  :param index: Name of the source index to split.
5268
5703
  :param target: Name of the target index to create.
@@ -5364,7 +5799,7 @@ class IndicesClient(NamespacedClient):
5364
5799
  Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.</p>
5365
5800
 
5366
5801
 
5367
- `<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>`_
5368
5803
 
5369
5804
  :param index: A comma-separated list of index names; use `_all` or empty string
5370
5805
  to perform the operation on all indices
@@ -5463,7 +5898,7 @@ class IndicesClient(NamespacedClient):
5463
5898
  Adds a data stream or index to an alias.</p>
5464
5899
 
5465
5900
 
5466
- `<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>`_
5467
5902
 
5468
5903
  :param actions: Actions to perform.
5469
5904
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -5542,7 +5977,7 @@ class IndicesClient(NamespacedClient):
5542
5977
  Validates a query without running it.</p>
5543
5978
 
5544
5979
 
5545
- `<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>`_
5546
5981
 
5547
5982
  :param index: Comma-separated list of data streams, indices, and aliases to search.
5548
5983
  Supports wildcards (`*`). To search all data streams or indices, omit this