elasticsearch 8.17.1__py3-none-any.whl → 8.18.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 (139) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +2146 -859
  3. elasticsearch/_async/client/_base.py +0 -1
  4. elasticsearch/_async/client/async_search.py +44 -29
  5. elasticsearch/_async/client/autoscaling.py +32 -26
  6. elasticsearch/_async/client/cat.py +244 -169
  7. elasticsearch/_async/client/ccr.py +268 -128
  8. elasticsearch/_async/client/cluster.py +191 -164
  9. elasticsearch/_async/client/connector.py +212 -116
  10. elasticsearch/_async/client/dangling_indices.py +22 -16
  11. elasticsearch/_async/client/enrich.py +51 -11
  12. elasticsearch/_async/client/eql.py +54 -13
  13. elasticsearch/_async/client/esql.py +352 -4
  14. elasticsearch/_async/client/features.py +37 -27
  15. elasticsearch/_async/client/fleet.py +22 -10
  16. elasticsearch/_async/client/graph.py +10 -9
  17. elasticsearch/_async/client/ilm.py +108 -77
  18. elasticsearch/_async/client/indices.py +1112 -677
  19. elasticsearch/_async/client/inference.py +1875 -133
  20. elasticsearch/_async/client/ingest.py +83 -50
  21. elasticsearch/_async/client/license.py +90 -38
  22. elasticsearch/_async/client/logstash.py +20 -9
  23. elasticsearch/_async/client/migration.py +26 -17
  24. elasticsearch/_async/client/ml.py +642 -365
  25. elasticsearch/_async/client/monitoring.py +6 -3
  26. elasticsearch/_async/client/nodes.py +51 -53
  27. elasticsearch/_async/client/query_rules.py +59 -33
  28. elasticsearch/_async/client/rollup.py +124 -86
  29. elasticsearch/_async/client/search_application.py +60 -32
  30. elasticsearch/_async/client/searchable_snapshots.py +25 -12
  31. elasticsearch/_async/client/security.py +896 -558
  32. elasticsearch/_async/client/shutdown.py +34 -36
  33. elasticsearch/_async/client/simulate.py +22 -28
  34. elasticsearch/_async/client/slm.py +65 -40
  35. elasticsearch/_async/client/snapshot.py +190 -213
  36. elasticsearch/_async/client/sql.py +43 -22
  37. elasticsearch/_async/client/ssl.py +17 -18
  38. elasticsearch/_async/client/synonyms.py +58 -37
  39. elasticsearch/_async/client/tasks.py +77 -48
  40. elasticsearch/_async/client/text_structure.py +65 -56
  41. elasticsearch/_async/client/transform.py +124 -93
  42. elasticsearch/_async/client/watcher.py +116 -72
  43. elasticsearch/_async/client/xpack.py +18 -9
  44. elasticsearch/_async/helpers.py +1 -2
  45. elasticsearch/_sync/client/__init__.py +2146 -859
  46. elasticsearch/_sync/client/_base.py +0 -1
  47. elasticsearch/_sync/client/async_search.py +44 -29
  48. elasticsearch/_sync/client/autoscaling.py +32 -26
  49. elasticsearch/_sync/client/cat.py +244 -169
  50. elasticsearch/_sync/client/ccr.py +268 -128
  51. elasticsearch/_sync/client/cluster.py +191 -164
  52. elasticsearch/_sync/client/connector.py +212 -116
  53. elasticsearch/_sync/client/dangling_indices.py +22 -16
  54. elasticsearch/_sync/client/enrich.py +51 -11
  55. elasticsearch/_sync/client/eql.py +54 -13
  56. elasticsearch/_sync/client/esql.py +352 -4
  57. elasticsearch/_sync/client/features.py +37 -27
  58. elasticsearch/_sync/client/fleet.py +22 -10
  59. elasticsearch/_sync/client/graph.py +10 -9
  60. elasticsearch/_sync/client/ilm.py +108 -77
  61. elasticsearch/_sync/client/indices.py +1112 -677
  62. elasticsearch/_sync/client/inference.py +1875 -133
  63. elasticsearch/_sync/client/ingest.py +83 -50
  64. elasticsearch/_sync/client/license.py +90 -38
  65. elasticsearch/_sync/client/logstash.py +20 -9
  66. elasticsearch/_sync/client/migration.py +26 -17
  67. elasticsearch/_sync/client/ml.py +642 -365
  68. elasticsearch/_sync/client/monitoring.py +6 -3
  69. elasticsearch/_sync/client/nodes.py +51 -53
  70. elasticsearch/_sync/client/query_rules.py +59 -33
  71. elasticsearch/_sync/client/rollup.py +124 -86
  72. elasticsearch/_sync/client/search_application.py +60 -32
  73. elasticsearch/_sync/client/searchable_snapshots.py +25 -12
  74. elasticsearch/_sync/client/security.py +896 -558
  75. elasticsearch/_sync/client/shutdown.py +34 -36
  76. elasticsearch/_sync/client/simulate.py +22 -28
  77. elasticsearch/_sync/client/slm.py +65 -40
  78. elasticsearch/_sync/client/snapshot.py +190 -213
  79. elasticsearch/_sync/client/sql.py +43 -22
  80. elasticsearch/_sync/client/ssl.py +17 -18
  81. elasticsearch/_sync/client/synonyms.py +58 -37
  82. elasticsearch/_sync/client/tasks.py +77 -48
  83. elasticsearch/_sync/client/text_structure.py +65 -56
  84. elasticsearch/_sync/client/transform.py +124 -93
  85. elasticsearch/_sync/client/utils.py +1 -4
  86. elasticsearch/_sync/client/watcher.py +116 -72
  87. elasticsearch/_sync/client/xpack.py +18 -9
  88. elasticsearch/_version.py +1 -1
  89. elasticsearch/client.py +2 -0
  90. elasticsearch/dsl/__init__.py +203 -0
  91. elasticsearch/dsl/_async/__init__.py +16 -0
  92. elasticsearch/dsl/_async/document.py +522 -0
  93. elasticsearch/dsl/_async/faceted_search.py +50 -0
  94. elasticsearch/dsl/_async/index.py +639 -0
  95. elasticsearch/dsl/_async/mapping.py +49 -0
  96. elasticsearch/dsl/_async/search.py +233 -0
  97. elasticsearch/dsl/_async/update_by_query.py +47 -0
  98. elasticsearch/dsl/_sync/__init__.py +16 -0
  99. elasticsearch/dsl/_sync/document.py +514 -0
  100. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  101. elasticsearch/dsl/_sync/index.py +597 -0
  102. elasticsearch/dsl/_sync/mapping.py +49 -0
  103. elasticsearch/dsl/_sync/search.py +226 -0
  104. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  105. elasticsearch/dsl/aggs.py +3730 -0
  106. elasticsearch/dsl/analysis.py +341 -0
  107. elasticsearch/dsl/async_connections.py +37 -0
  108. elasticsearch/dsl/connections.py +142 -0
  109. elasticsearch/dsl/document.py +20 -0
  110. elasticsearch/dsl/document_base.py +444 -0
  111. elasticsearch/dsl/exceptions.py +32 -0
  112. elasticsearch/dsl/faceted_search.py +28 -0
  113. elasticsearch/dsl/faceted_search_base.py +489 -0
  114. elasticsearch/dsl/field.py +4254 -0
  115. elasticsearch/dsl/function.py +180 -0
  116. elasticsearch/dsl/index.py +23 -0
  117. elasticsearch/dsl/index_base.py +178 -0
  118. elasticsearch/dsl/mapping.py +19 -0
  119. elasticsearch/dsl/mapping_base.py +219 -0
  120. elasticsearch/dsl/query.py +2816 -0
  121. elasticsearch/dsl/response/__init__.py +388 -0
  122. elasticsearch/dsl/response/aggs.py +100 -0
  123. elasticsearch/dsl/response/hit.py +53 -0
  124. elasticsearch/dsl/search.py +20 -0
  125. elasticsearch/dsl/search_base.py +1040 -0
  126. elasticsearch/dsl/serializer.py +34 -0
  127. elasticsearch/dsl/types.py +6471 -0
  128. elasticsearch/dsl/update_by_query.py +19 -0
  129. elasticsearch/dsl/update_by_query_base.py +149 -0
  130. elasticsearch/dsl/utils.py +687 -0
  131. elasticsearch/dsl/wrappers.py +119 -0
  132. elasticsearch/helpers/actions.py +1 -1
  133. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  134. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/METADATA +12 -2
  135. elasticsearch-8.18.0.dist-info/RECORD +161 -0
  136. elasticsearch-8.17.1.dist-info/RECORD +0 -119
  137. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/WHEEL +0 -0
  138. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/licenses/LICENSE +0 -0
  139. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/licenses/NOTICE +0 -0
@@ -38,21 +38,23 @@ class ClusterClient(NamespacedClient):
38
38
  include_disk_info: t.Optional[bool] = None,
39
39
  include_yes_decisions: t.Optional[bool] = None,
40
40
  index: t.Optional[str] = None,
41
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
41
42
  pretty: t.Optional[bool] = None,
42
43
  primary: t.Optional[bool] = None,
43
44
  shard: t.Optional[int] = None,
44
45
  body: t.Optional[t.Dict[str, t.Any]] = None,
45
46
  ) -> ObjectApiResponse[t.Any]:
46
47
  """
47
- Explain the shard allocations. Get explanations for shard allocations in the
48
- cluster. For unassigned shards, it provides an explanation for why the shard
49
- is unassigned. For assigned shards, it provides an explanation for why the shard
50
- is remaining on its current node and has not moved or rebalanced to another node.
51
- This API can be very useful when attempting to diagnose why a shard is unassigned
52
- or why a shard continues to remain on its current node when you might expect
53
- otherwise.
48
+ .. raw:: html
49
+
50
+ <p>Explain the shard allocations.
51
+ Get explanations for shard allocations in the cluster.
52
+ For unassigned shards, it provides an explanation for why the shard is unassigned.
53
+ For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.
54
+ This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.</p>
55
+
54
56
 
55
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-allocation-explain.html>`_
57
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html>`_
56
58
 
57
59
  :param current_node: Specifies the node ID or the name of the node to only explain
58
60
  a shard that is currently located on the specified node.
@@ -61,6 +63,7 @@ class ClusterClient(NamespacedClient):
61
63
  :param include_yes_decisions: If true, returns YES decisions in explanation.
62
64
  :param index: Specifies the name of the index that you would like an explanation
63
65
  for.
66
+ :param master_timeout: Period to wait for a connection to the master node.
64
67
  :param primary: If true, returns explanation for the primary shard for the given
65
68
  shard ID.
66
69
  :param shard: Specifies the ID of the shard that you would like an explanation
@@ -80,6 +83,8 @@ class ClusterClient(NamespacedClient):
80
83
  __query["include_disk_info"] = include_disk_info
81
84
  if include_yes_decisions is not None:
82
85
  __query["include_yes_decisions"] = include_yes_decisions
86
+ if master_timeout is not None:
87
+ __query["master_timeout"] = master_timeout
83
88
  if pretty is not None:
84
89
  __query["pretty"] = pretty
85
90
  if not __body:
@@ -119,10 +124,13 @@ class ClusterClient(NamespacedClient):
119
124
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
120
125
  ) -> ObjectApiResponse[t.Any]:
121
126
  """
122
- Delete component templates. Component templates are building blocks for constructing
123
- index templates that specify index mappings, settings, and aliases.
127
+ .. raw:: html
128
+
129
+ <p>Delete component templates.
130
+ Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.</p>
124
131
 
125
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
132
+
133
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html>`_
126
134
 
127
135
  :param name: Comma-separated list or wildcard expression of component template
128
136
  names used to limit the request.
@@ -166,15 +174,20 @@ class ClusterClient(NamespacedClient):
166
174
  error_trace: t.Optional[bool] = None,
167
175
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
168
176
  human: t.Optional[bool] = None,
177
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
169
178
  pretty: t.Optional[bool] = None,
170
179
  wait_for_removal: t.Optional[bool] = None,
171
180
  ) -> ObjectApiResponse[t.Any]:
172
181
  """
173
- Clear cluster voting config exclusions. Remove master-eligible nodes from the
174
- voting configuration exclusion list.
182
+ .. raw:: html
183
+
184
+ <p>Clear cluster voting config exclusions.
185
+ Remove master-eligible nodes from the voting configuration exclusion list.</p>
175
186
 
176
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/voting-config-exclusions.html>`_
177
187
 
188
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/voting-config-exclusions.html>`_
189
+
190
+ :param master_timeout: Period to wait for a connection to the master node.
178
191
  :param wait_for_removal: Specifies whether to wait for all excluded nodes to
179
192
  be removed from the cluster before clearing the voting configuration exclusions
180
193
  list. Defaults to true, meaning that all excluded nodes must be removed from
@@ -191,6 +204,8 @@ class ClusterClient(NamespacedClient):
191
204
  __query["filter_path"] = filter_path
192
205
  if human is not None:
193
206
  __query["human"] = human
207
+ if master_timeout is not None:
208
+ __query["master_timeout"] = master_timeout
194
209
  if pretty is not None:
195
210
  __query["pretty"] = pretty
196
211
  if wait_for_removal is not None:
@@ -218,10 +233,13 @@ class ClusterClient(NamespacedClient):
218
233
  pretty: t.Optional[bool] = None,
219
234
  ) -> HeadApiResponse:
220
235
  """
221
- Check component templates. Returns information about whether a particular component
222
- template exists.
236
+ .. raw:: html
223
237
 
224
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
238
+ <p>Check component templates.
239
+ Returns information about whether a particular component template exists.</p>
240
+
241
+
242
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html>`_
225
243
 
226
244
  :param name: Comma-separated list of component template names used to limit the
227
245
  request. Wildcard (*) expressions are supported.
@@ -274,9 +292,13 @@ class ClusterClient(NamespacedClient):
274
292
  pretty: t.Optional[bool] = None,
275
293
  ) -> ObjectApiResponse[t.Any]:
276
294
  """
277
- Get component templates. Get information about component templates.
295
+ .. raw:: html
296
+
297
+ <p>Get component templates.
298
+ Get information about component templates.</p>
278
299
 
279
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
300
+
301
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html>`_
280
302
 
281
303
  :param name: Comma-separated list of component template names used to limit the
282
304
  request. Wildcard (`*`) expressions are supported.
@@ -337,10 +359,13 @@ class ClusterClient(NamespacedClient):
337
359
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
338
360
  ) -> ObjectApiResponse[t.Any]:
339
361
  """
340
- Get cluster-wide settings. By default, it returns only settings that have been
341
- explicitly defined.
362
+ .. raw:: html
363
+
364
+ <p>Get cluster-wide settings.
365
+ By default, it returns only settings that have been explicitly defined.</p>
366
+
342
367
 
343
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-get-settings.html>`_
368
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-get-settings.html>`_
344
369
 
345
370
  :param flat_settings: If `true`, returns settings in flat format.
346
371
  :param include_defaults: If `true`, returns default cluster settings from the
@@ -420,18 +445,19 @@ class ClusterClient(NamespacedClient):
420
445
  ] = None,
421
446
  ) -> ObjectApiResponse[t.Any]:
422
447
  """
423
- Get the cluster health status. You can also use the API to get the health status
424
- of only specified data streams and indices. For data streams, the API retrieves
425
- the health status of the stream’s backing indices. The cluster health status
426
- is: green, yellow or red. On the shard level, a red status indicates that the
427
- specific shard is not allocated in the cluster. Yellow means that the primary
428
- shard is allocated but replicas are not. Green means that all shards are allocated.
429
- The index level status is controlled by the worst shard status. One of the main
430
- benefits of the API is the ability to wait until the cluster reaches a certain
431
- high watermark health level. The cluster status is controlled by the worst index
432
- status.
433
-
434
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-health.html>`_
448
+ .. raw:: html
449
+
450
+ <p>Get the cluster health status.
451
+ You can also use the API to get the health status of only specified data streams and indices.
452
+ For data streams, the API retrieves the health status of the stream’s backing indices.</p>
453
+ <p>The cluster health status is: green, yellow or red.
454
+ On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated.
455
+ The index level status is controlled by the worst shard status.</p>
456
+ <p>One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level.
457
+ The cluster status is controlled by the worst index status.</p>
458
+
459
+
460
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-health.html>`_
435
461
 
436
462
  :param index: Comma-separated list of data streams, indices, and index aliases
437
463
  used to limit the request. Wildcard expressions (`*`) are supported. To target
@@ -533,9 +559,13 @@ class ClusterClient(NamespacedClient):
533
559
  pretty: t.Optional[bool] = None,
534
560
  ) -> ObjectApiResponse[t.Any]:
535
561
  """
536
- Get cluster info. Returns basic information about the cluster.
562
+ .. raw:: html
537
563
 
538
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-info.html>`_
564
+ <p>Get cluster info.
565
+ Returns basic information about the cluster.</p>
566
+
567
+
568
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-info.html>`_
539
569
 
540
570
  :param target: Limits the information returned to the specific target. Supports
541
571
  a comma-separated list, such as http,ingest.
@@ -575,16 +605,16 @@ class ClusterClient(NamespacedClient):
575
605
  pretty: t.Optional[bool] = None,
576
606
  ) -> ObjectApiResponse[t.Any]:
577
607
  """
578
- Get the pending cluster tasks. Get information about cluster-level changes (such
579
- as create index, update mapping, allocate or fail shard) that have not yet taken
580
- effect. NOTE: This API returns a list of any pending updates to the cluster state.
581
- These are distinct from the tasks reported by the task management API which include
582
- periodic tasks and tasks initiated by the user, such as node stats, search queries,
583
- or create index requests. However, if a user-initiated task such as a create
584
- index command causes a cluster state update, the activity of this task might
585
- be reported by both task api and pending cluster tasks API.
608
+ .. raw:: html
609
+
610
+ <p>Get the pending cluster tasks.
611
+ Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect.</p>
612
+ <p>NOTE: This API returns a list of any pending updates to the cluster state.
613
+ These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests.
614
+ However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.</p>
586
615
 
587
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-pending.html>`_
616
+
617
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-pending.html>`_
588
618
 
589
619
  :param local: If `true`, the request retrieves information from the local node
590
620
  only. If `false`, information is retrieved from the master node.
@@ -624,42 +654,35 @@ class ClusterClient(NamespacedClient):
624
654
  error_trace: t.Optional[bool] = None,
625
655
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
626
656
  human: t.Optional[bool] = None,
657
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
627
658
  node_ids: t.Optional[t.Union[str, t.Sequence[str]]] = None,
628
659
  node_names: t.Optional[t.Union[str, t.Sequence[str]]] = None,
629
660
  pretty: t.Optional[bool] = None,
630
661
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
631
662
  ) -> ObjectApiResponse[t.Any]:
632
663
  """
633
- Update voting configuration exclusions. Update the cluster voting config exclusions
634
- by node IDs or node names. By default, if there are more than three master-eligible
635
- nodes in the cluster and you remove fewer than half of the master-eligible nodes
636
- in the cluster at once, the voting configuration automatically shrinks. If you
637
- want to shrink the voting configuration to contain fewer than three nodes or
638
- to remove half or more of the master-eligible nodes in the cluster at once, use
639
- this API to remove departing nodes from the voting configuration manually. The
640
- API adds an entry for each specified node to the cluster’s voting configuration
641
- exclusions list. It then waits until the cluster has reconfigured its voting
642
- configuration to exclude the specified nodes. Clusters should have no voting
643
- configuration exclusions in normal operation. Once the excluded nodes have stopped,
644
- clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`.
645
- This API waits for the nodes to be fully removed from the cluster before it returns.
646
- If your cluster has voting configuration exclusions for nodes that you no longer
647
- intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false`
648
- to clear the voting configuration exclusions without waiting for the nodes to
649
- leave the cluster. A response to `POST /_cluster/voting_config_exclusions` with
650
- an HTTP status code of 200 OK guarantees that the node has been removed from
651
- the voting configuration and will not be reinstated until the voting configuration
652
- exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`.
653
- If the call to `POST /_cluster/voting_config_exclusions` fails or returns a response
654
- with an HTTP status code other than 200 OK then the node may not have been removed
655
- from the voting configuration. In that case, you may safely retry the call. NOTE:
656
- Voting exclusions are required only when you remove at least half of the master-eligible
657
- nodes from a cluster in a short time period. They are not required when removing
658
- master-ineligible nodes or when removing fewer than half of the master-eligible
659
- nodes.
660
-
661
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/voting-config-exclusions.html>`_
664
+ .. raw:: html
665
+
666
+ <p>Update voting configuration exclusions.
667
+ Update the cluster voting config exclusions by node IDs or node names.
668
+ By default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks.
669
+ If you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually.
670
+ The API adds an entry for each specified node to the cluster’s voting configuration exclusions list.
671
+ It then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes.</p>
672
+ <p>Clusters should have no voting configuration exclusions in normal operation.
673
+ Once the excluded nodes have stopped, clear the voting configuration exclusions with <code>DELETE /_cluster/voting_config_exclusions</code>.
674
+ This API waits for the nodes to be fully removed from the cluster before it returns.
675
+ If your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use <code>DELETE /_cluster/voting_config_exclusions?wait_for_removal=false</code> to clear the voting configuration exclusions without waiting for the nodes to leave the cluster.</p>
676
+ <p>A response to <code>POST /_cluster/voting_config_exclusions</code> with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling <code>DELETE /_cluster/voting_config_exclusions</code>.
677
+ If the call to <code>POST /_cluster/voting_config_exclusions</code> fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration.
678
+ In that case, you may safely retry the call.</p>
679
+ <p>NOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period.
680
+ They are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes.</p>
662
681
 
682
+
683
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/voting-config-exclusions.html>`_
684
+
685
+ :param master_timeout: Period to wait for a connection to the master node.
663
686
  :param node_ids: A comma-separated list of the persistent ids of the nodes to
664
687
  exclude from the voting configuration. If specified, you may not also specify
665
688
  node_names.
@@ -679,6 +702,8 @@ class ClusterClient(NamespacedClient):
679
702
  __query["filter_path"] = filter_path
680
703
  if human is not None:
681
704
  __query["human"] = human
705
+ if master_timeout is not None:
706
+ __query["master_timeout"] = master_timeout
682
707
  if node_ids is not None:
683
708
  __query["node_ids"] = node_ids
684
709
  if node_names is not None:
@@ -718,23 +743,25 @@ class ClusterClient(NamespacedClient):
718
743
  body: t.Optional[t.Dict[str, t.Any]] = None,
719
744
  ) -> ObjectApiResponse[t.Any]:
720
745
  """
721
- Create or update a component template. Component templates are building blocks
722
- for constructing index templates that specify index mappings, settings, and aliases.
723
- An index template can be composed of multiple component templates. To use a component
724
- template, specify it in an index template’s `composed_of` list. Component templates
725
- are only applied to new data streams and indices as part of a matching index
726
- template. Settings and mappings specified directly in the index template or the
727
- create index request override any settings or mappings specified in a component
728
- template. Component templates are only used during index creation. For data streams,
729
- this includes data stream creation and the creation of a stream’s backing indices.
730
- Changes to component templates do not affect existing indices, including a stream’s
731
- backing indices. You can use C-style `/* *\\/` block comments in component templates.
732
- You can include comments anywhere in the request body except before the opening
733
- curly bracket. **Applying component templates** You cannot directly apply a component
734
- template to a data stream or index. To be applied, a component template must
735
- be included in an index template's `composed_of` list.
736
-
737
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
746
+ .. raw:: html
747
+
748
+ <p>Create or update a component template.
749
+ Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.</p>
750
+ <p>An index template can be composed of multiple component templates.
751
+ To use a component template, specify it in an index template’s <code>composed_of</code> list.
752
+ Component templates are only applied to new data streams and indices as part of a matching index template.</p>
753
+ <p>Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.</p>
754
+ <p>Component templates are only used during index creation.
755
+ For data streams, this includes data stream creation and the creation of a stream’s backing indices.
756
+ Changes to component templates do not affect existing indices, including a stream’s backing indices.</p>
757
+ <p>You can use C-style <code>/* *\\/</code> block comments in component templates.
758
+ You can include comments anywhere in the request body except before the opening curly bracket.</p>
759
+ <p><strong>Applying component templates</strong></p>
760
+ <p>You cannot directly apply a component template to a data stream or index.
761
+ To be applied, a component template must be included in an index template's <code>composed_of</code> list.</p>
762
+
763
+
764
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html>`_
738
765
 
739
766
  :param name: Name of the component template to create. Elasticsearch includes
740
767
  the following built-in component templates: `logs-mappings`; `logs-settings`;
@@ -821,28 +848,25 @@ class ClusterClient(NamespacedClient):
821
848
  body: t.Optional[t.Dict[str, t.Any]] = None,
822
849
  ) -> ObjectApiResponse[t.Any]:
823
850
  """
824
- Update the cluster settings. Configure and update dynamic settings on a running
825
- cluster. You can also configure dynamic settings locally on an unstarted or shut
826
- down node in `elasticsearch.yml`. Updates made with this API can be persistent,
827
- which apply across cluster restarts, or transient, which reset after a cluster
828
- restart. You can also reset transient or persistent settings by assigning them
829
- a null value. If you configure the same setting using multiple methods, Elasticsearch
830
- applies the settings in following order of precedence: 1) Transient setting;
831
- 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting value.
832
- For example, you can apply a transient setting to override a persistent setting
833
- or `elasticsearch.yml` setting. However, a change to an `elasticsearch.yml` setting
834
- will not override a defined transient or persistent setting. TIP: In Elastic
835
- Cloud, use the user settings feature to configure all cluster settings. This
836
- method automatically rejects unsafe settings that could break your cluster. If
837
- you run Elasticsearch on your own hardware, use this API to configure dynamic
838
- cluster settings. Only use `elasticsearch.yml` for static cluster settings and
839
- node settings. The API doesn’t require a restart and ensures a setting’s value
840
- is the same on all nodes. WARNING: Transient cluster settings are no longer recommended.
841
- Use persistent cluster settings instead. If a cluster becomes unstable, transient
842
- settings can clear unexpectedly, resulting in a potentially undesired cluster
843
- configuration.
844
-
845
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-update-settings.html>`_
851
+ .. raw:: html
852
+
853
+ <p>Update the cluster settings.
854
+ Configure and update dynamic settings on a running cluster.
855
+ You can also configure dynamic settings locally on an unstarted or shut down node in <code>elasticsearch.yml</code>.</p>
856
+ <p>Updates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart.
857
+ You can also reset transient or persistent settings by assigning them a null value.</p>
858
+ <p>If you configure the same setting using multiple methods, Elasticsearch applies the settings in following order of precedence: 1) Transient setting; 2) Persistent setting; 3) <code>elasticsearch.yml</code> setting; 4) Default setting value.
859
+ For example, you can apply a transient setting to override a persistent setting or <code>elasticsearch.yml</code> setting.
860
+ However, a change to an <code>elasticsearch.yml</code> setting will not override a defined transient or persistent setting.</p>
861
+ <p>TIP: In Elastic Cloud, use the user settings feature to configure all cluster settings. This method automatically rejects unsafe settings that could break your cluster.
862
+ If you run Elasticsearch on your own hardware, use this API to configure dynamic cluster settings.
863
+ Only use <code>elasticsearch.yml</code> for static cluster settings and node settings.
864
+ The API doesn’t require a restart and ensures a setting’s value is the same on all nodes.</p>
865
+ <p>WARNING: Transient cluster settings are no longer recommended. Use persistent cluster settings instead.
866
+ If a cluster becomes unstable, transient settings can clear unexpectedly, resulting in a potentially undesired cluster configuration.</p>
867
+
868
+
869
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-update-settings.html>`_
846
870
 
847
871
  :param flat_settings: Return settings in flat format (default: false)
848
872
  :param master_timeout: Explicit operation timeout for connection to master node
@@ -894,11 +918,21 @@ class ClusterClient(NamespacedClient):
894
918
  pretty: t.Optional[bool] = None,
895
919
  ) -> ObjectApiResponse[t.Any]:
896
920
  """
897
- Get remote cluster information. Get all of the configured remote cluster information.
898
- This API returns connection and endpoint information keyed by the configured
899
- remote cluster alias.
921
+ .. raw:: html
922
+
923
+ <p>Get remote cluster information.</p>
924
+ <p>Get information about configured remote clusters.
925
+ The API returns connection and endpoint information keyed by the configured remote cluster alias.</p>
926
+ <blockquote>
927
+ <p>info
928
+ This API returns information that reflects current state on the local cluster.
929
+ The <code>connected</code> field does not necessarily reflect whether a remote cluster is down or unavailable, only whether there is currently an open connection to it.
930
+ Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster.
931
+ To trigger a reconnection, attempt a cross-cluster search, ES|QL cross-cluster search, or try the <a href="https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster">resolve cluster endpoint</a>.</p>
932
+ </blockquote>
933
+
900
934
 
901
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-remote-info.html>`_
935
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-remote-info.html>`_
902
936
  """
903
937
  __path_parts: t.Dict[str, str] = {}
904
938
  __path = "/_remote/info"
@@ -941,27 +975,21 @@ class ClusterClient(NamespacedClient):
941
975
  body: t.Optional[t.Dict[str, t.Any]] = None,
942
976
  ) -> ObjectApiResponse[t.Any]:
943
977
  """
944
- Reroute the cluster. Manually change the allocation of individual shards in the
945
- cluster. For example, a shard can be moved from one node to another explicitly,
946
- an allocation can be canceled, and an unassigned shard can be explicitly allocated
947
- to a specific node. It is important to note that after processing any reroute
948
- commands Elasticsearch will perform rebalancing as normal (respecting the values
949
- of settings such as `cluster.routing.rebalance.enable`) in order to remain in
950
- a balanced state. For example, if the requested allocation includes moving a
951
- shard from node1 to node2 then this may cause a shard to be moved from node2
952
- back to node1 to even things out. The cluster can be set to disable allocations
953
- using the `cluster.routing.allocation.enable` setting. If allocations are disabled
954
- then the only allocations that will be performed are explicit ones given using
955
- the reroute command, and consequent allocations due to rebalancing. The cluster
956
- will attempt to allocate a shard a maximum of `index.allocation.max_retries`
957
- times in a row (defaults to `5`), before giving up and leaving the shard unallocated.
958
- This scenario can be caused by structural problems such as having an analyzer
959
- which refers to a stopwords file which doesn’t exist on all nodes. Once the problem
960
- has been corrected, allocation can be manually retried by calling the reroute
961
- API with the `?retry_failed` URI query parameter, which will attempt a single
962
- retry round for these shards.
963
-
964
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-reroute.html>`_
978
+ .. raw:: html
979
+
980
+ <p>Reroute the cluster.
981
+ Manually change the allocation of individual shards in the cluster.
982
+ For example, a shard can be moved from one node to another explicitly, an allocation can be canceled, and an unassigned shard can be explicitly allocated to a specific node.</p>
983
+ <p>It is important to note that after processing any reroute commands Elasticsearch will perform rebalancing as normal (respecting the values of settings such as <code>cluster.routing.rebalance.enable</code>) in order to remain in a balanced state.
984
+ For example, if the requested allocation includes moving a shard from node1 to node2 then this may cause a shard to be moved from node2 back to node1 to even things out.</p>
985
+ <p>The cluster can be set to disable allocations using the <code>cluster.routing.allocation.enable</code> setting.
986
+ If allocations are disabled then the only allocations that will be performed are explicit ones given using the reroute command, and consequent allocations due to rebalancing.</p>
987
+ <p>The cluster will attempt to allocate a shard a maximum of <code>index.allocation.max_retries</code> times in a row (defaults to <code>5</code>), before giving up and leaving the shard unallocated.
988
+ This scenario can be caused by structural problems such as having an analyzer which refers to a stopwords file which doesn’t exist on all nodes.</p>
989
+ <p>Once the problem has been corrected, allocation can be manually retried by calling the reroute API with the <code>?retry_failed</code> URI query parameter, which will attempt a single retry round for these shards.</p>
990
+
991
+
992
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-reroute.html>`_
965
993
 
966
994
  :param commands: Defines the commands to perform.
967
995
  :param dry_run: If true, then the request simulates the operation. It will calculate
@@ -1048,28 +1076,25 @@ class ClusterClient(NamespacedClient):
1048
1076
  wait_for_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1049
1077
  ) -> ObjectApiResponse[t.Any]:
1050
1078
  """
1051
- Get the cluster state. Get comprehensive information about the state of the cluster.
1052
- The cluster state is an internal data structure which keeps track of a variety
1053
- of information needed by every node, including the identity and attributes of
1054
- the other nodes in the cluster; cluster-wide settings; index metadata, including
1055
- the mapping and settings for each index; the location and status of every shard
1056
- copy in the cluster. The elected master node ensures that every node in the cluster
1057
- has a copy of the same cluster state. This API lets you retrieve a representation
1058
- of this internal state for debugging or diagnostic purposes. You may need to
1059
- consult the Elasticsearch source code to determine the precise meaning of the
1060
- response. By default the API will route requests to the elected master node since
1061
- this node is the authoritative source of cluster states. You can also retrieve
1062
- the cluster state held on the node handling the API request by adding the `?local=true`
1063
- query parameter. Elasticsearch may need to expend significant effort to compute
1064
- a response to this API in larger clusters, and the response may comprise a very
1065
- large quantity of data. If you use this API repeatedly, your cluster may become
1066
- unstable. WARNING: The response is a representation of an internal data structure.
1067
- Its format is not subject to the same compatibility guarantees as other more
1068
- stable APIs and may change from version to version. Do not query this API using
1069
- external monitoring tools. Instead, obtain the information you require using
1070
- other more stable cluster APIs.
1071
-
1072
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-state.html>`_
1079
+ .. raw:: html
1080
+
1081
+ <p>Get the cluster state.
1082
+ Get comprehensive information about the state of the cluster.</p>
1083
+ <p>The cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster.</p>
1084
+ <p>The elected master node ensures that every node in the cluster has a copy of the same cluster state.
1085
+ This API lets you retrieve a representation of this internal state for debugging or diagnostic purposes.
1086
+ You may need to consult the Elasticsearch source code to determine the precise meaning of the response.</p>
1087
+ <p>By default the API will route requests to the elected master node since this node is the authoritative source of cluster states.
1088
+ You can also retrieve the cluster state held on the node handling the API request by adding the <code>?local=true</code> query parameter.</p>
1089
+ <p>Elasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data.
1090
+ If you use this API repeatedly, your cluster may become unstable.</p>
1091
+ <p>WARNING: The response is a representation of an internal data structure.
1092
+ Its format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version.
1093
+ Do not query this API using external monitoring tools.
1094
+ Instead, obtain the information you require using other more stable cluster APIs.</p>
1095
+
1096
+
1097
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-state.html>`_
1073
1098
 
1074
1099
  :param metric: Limit the information returned to the specified metrics
1075
1100
  :param index: A comma-separated list of index names; use `_all` or empty string
@@ -1151,11 +1176,13 @@ class ClusterClient(NamespacedClient):
1151
1176
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1152
1177
  ) -> ObjectApiResponse[t.Any]:
1153
1178
  """
1154
- Get cluster statistics. Get basic index metrics (shard numbers, store size, memory
1155
- usage) and information about the current nodes that form the cluster (number,
1156
- roles, os, jvm versions, memory usage, cpu and installed plugins).
1179
+ .. raw:: html
1180
+
1181
+ <p>Get cluster statistics.
1182
+ Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).</p>
1183
+
1157
1184
 
1158
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-stats.html>`_
1185
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-stats.html>`_
1159
1186
 
1160
1187
  :param node_id: Comma-separated list of node filters used to limit returned information.
1161
1188
  Defaults to all nodes in the cluster.