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
@@ -44,10 +44,13 @@ class SnapshotClient(NamespacedClient):
44
44
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
45
45
  ) -> ObjectApiResponse[t.Any]:
46
46
  """
47
- Clean up the snapshot repository. Trigger the review of the contents of a snapshot
48
- repository and delete any stale data not referenced by existing snapshots.
47
+ .. raw:: html
49
48
 
50
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clean-up-snapshot-repo-api.html>`_
49
+ <p>Clean up the snapshot repository.
50
+ Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.</p>
51
+
52
+
53
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clean-up-snapshot-repo-api.html>`_
51
54
 
52
55
  :param name: Snapshot repository to clean up.
53
56
  :param master_timeout: Period to wait for a connection to the master node.
@@ -95,21 +98,22 @@ class SnapshotClient(NamespacedClient):
95
98
  human: t.Optional[bool] = None,
96
99
  master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
97
100
  pretty: t.Optional[bool] = None,
98
- timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
99
101
  body: t.Optional[t.Dict[str, t.Any]] = None,
100
102
  ) -> ObjectApiResponse[t.Any]:
101
103
  """
102
- Clone a snapshot. Clone part of all of a snapshot into another snapshot in the
103
- same repository.
104
+ .. raw:: html
105
+
106
+ <p>Clone a snapshot.
107
+ Clone part of all of a snapshot into another snapshot in the same repository.</p>
108
+
104
109
 
105
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clone-snapshot-api.html>`_
110
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clone-snapshot-api.html>`_
106
111
 
107
112
  :param repository: A repository name
108
113
  :param snapshot: The name of the snapshot to clone from
109
114
  :param target_snapshot: The name of the cloned snapshot to create
110
115
  :param indices:
111
116
  :param master_timeout: Explicit operation timeout for connection to master node
112
- :param timeout:
113
117
  """
114
118
  if repository in SKIP_IN_PATH:
115
119
  raise ValueError("Empty value passed for parameter 'repository'")
@@ -137,8 +141,6 @@ class SnapshotClient(NamespacedClient):
137
141
  __query["master_timeout"] = master_timeout
138
142
  if pretty is not None:
139
143
  __query["pretty"] = pretty
140
- if timeout is not None:
141
- __query["timeout"] = timeout
142
144
  if not __body:
143
145
  if indices is not None:
144
146
  __body["indices"] = indices
@@ -183,9 +185,13 @@ class SnapshotClient(NamespacedClient):
183
185
  body: t.Optional[t.Dict[str, t.Any]] = None,
184
186
  ) -> ObjectApiResponse[t.Any]:
185
187
  """
186
- Create a snapshot. Take a snapshot of a cluster or of data streams and indices.
188
+ .. raw:: html
189
+
190
+ <p>Create a snapshot.
191
+ Take a snapshot of a cluster or of data streams and indices.</p>
192
+
187
193
 
188
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-snapshot-api.html>`_
194
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-snapshot-api.html>`_
189
195
 
190
196
  :param repository: Repository for the snapshot.
191
197
  :param snapshot: Name of the snapshot. Must be unique in the repository.
@@ -287,13 +293,15 @@ class SnapshotClient(NamespacedClient):
287
293
  verify: t.Optional[bool] = None,
288
294
  ) -> ObjectApiResponse[t.Any]:
289
295
  """
290
- Create or update a snapshot repository. IMPORTANT: If you are migrating searchable
291
- snapshots, the repository name must be identical in the source and destination
292
- clusters. To register a snapshot repository, the cluster's global metadata must
293
- be writeable. Ensure there are no cluster blocks (for example, `cluster.blocks.read_only`
294
- and `clsuter.blocks.read_only_allow_delete` settings) that prevent write access.
296
+ .. raw:: html
295
297
 
296
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
298
+ <p>Create or update a snapshot repository.
299
+ IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
300
+ To register a snapshot repository, the cluster's global metadata must be writeable.
301
+ Ensure there are no cluster blocks (for example, <code>cluster.blocks.read_only</code> and <code>clsuter.blocks.read_only_allow_delete</code> settings) that prevent write access.</p>
302
+
303
+
304
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modules-snapshots.html>`_
297
305
 
298
306
  :param name: A repository name
299
307
  :param repository:
@@ -351,9 +359,12 @@ class SnapshotClient(NamespacedClient):
351
359
  pretty: t.Optional[bool] = None,
352
360
  ) -> ObjectApiResponse[t.Any]:
353
361
  """
354
- Delete snapshots.
362
+ .. raw:: html
363
+
364
+ <p>Delete snapshots.</p>
365
+
355
366
 
356
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-api.html>`_
367
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-api.html>`_
357
368
 
358
369
  :param repository: A repository name
359
370
  :param snapshot: A comma-separated list of snapshot names
@@ -402,11 +413,14 @@ class SnapshotClient(NamespacedClient):
402
413
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
403
414
  ) -> ObjectApiResponse[t.Any]:
404
415
  """
405
- Delete snapshot repositories. When a repository is unregistered, Elasticsearch
406
- removes only the reference to the location where the repository is storing the
407
- snapshots. The snapshots themselves are left untouched and in place.
416
+ .. raw:: html
408
417
 
409
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-repo-api.html>`_
418
+ <p>Delete snapshot repositories.
419
+ When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.
420
+ The snapshots themselves are left untouched and in place.</p>
421
+
422
+
423
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-repo-api.html>`_
410
424
 
411
425
  :param name: Name of the snapshot repository to unregister. Wildcard (`*`) patterns
412
426
  are supported.
@@ -478,9 +492,12 @@ class SnapshotClient(NamespacedClient):
478
492
  verbose: t.Optional[bool] = None,
479
493
  ) -> ObjectApiResponse[t.Any]:
480
494
  """
481
- Get snapshot information.
495
+ .. raw:: html
496
+
497
+ <p>Get snapshot information.</p>
498
+
482
499
 
483
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-api.html>`_
500
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-api.html>`_
484
501
 
485
502
  :param repository: Comma-separated list of snapshot repository names used to
486
503
  limit the request. Wildcard (*) expressions are supported.
@@ -590,9 +607,12 @@ class SnapshotClient(NamespacedClient):
590
607
  pretty: t.Optional[bool] = None,
591
608
  ) -> ObjectApiResponse[t.Any]:
592
609
  """
593
- Get snapshot repository information.
610
+ .. raw:: html
594
611
 
595
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-repo-api.html>`_
612
+ <p>Get snapshot repository information.</p>
613
+
614
+
615
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-repo-api.html>`_
596
616
 
597
617
  :param name: A comma-separated list of repository names
598
618
  :param local: Return local information, do not retrieve the state from master
@@ -652,122 +672,85 @@ class SnapshotClient(NamespacedClient):
652
672
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
653
673
  ) -> ObjectApiResponse[t.Any]:
654
674
  """
655
- Analyze a snapshot repository. Analyze the performance characteristics and any
656
- incorrect behaviour found in a repository. The response exposes implementation
657
- details of the analysis which may change from version to version. The response
658
- body format is therefore not considered stable and may be different in newer
659
- versions. There are a large number of third-party storage systems available,
660
- not all of which are suitable for use as a snapshot repository by Elasticsearch.
661
- Some storage systems behave incorrectly, or perform poorly, especially when accessed
662
- concurrently by multiple clients as the nodes of an Elasticsearch cluster do.
663
- This API performs a collection of read and write operations on your repository
664
- which are designed to detect incorrect behaviour and to measure the performance
665
- characteristics of your storage system. The default values for the parameters
666
- are deliberately low to reduce the impact of running an analysis inadvertently
667
- and to provide a sensible starting point for your investigations. Run your first
668
- analysis with the default parameter values to check for simple problems. If successful,
669
- run a sequence of increasingly large analyses until you encounter a failure or
670
- you reach a `blob_count` of at least `2000`, a `max_blob_size` of at least `2gb`,
671
- a `max_total_data_size` of at least `1tb`, and a `register_operation_count` of
672
- at least `100`. Always specify a generous timeout, possibly `1h` or longer, to
673
- allow time for each analysis to run to completion. Perform the analyses using
674
- a multi-node cluster of a similar size to your production cluster so that it
675
- can detect any problems that only arise when the repository is accessed by many
676
- nodes at once. If the analysis fails, Elasticsearch detected that your repository
677
- behaved unexpectedly. This usually means you are using a third-party storage
678
- system with an incorrect or incompatible implementation of the API it claims
679
- to support. If so, this storage system is not suitable for use as a snapshot
680
- repository. You will need to work with the supplier of your storage system to
681
- address the incompatibilities that Elasticsearch detects. If the analysis is
682
- successful, the API returns details of the testing process, optionally including
683
- how long each operation took. You can use this information to determine the performance
684
- of your storage system. If any operation fails or returns an incorrect result,
685
- the API returns an error. If the API returns an error, it may not have removed
686
- all the data it wrote to the repository. The error will indicate the location
687
- of any leftover data and this path is also recorded in the Elasticsearch logs.
688
- You should verify that this location has been cleaned up correctly. If there
689
- is still leftover data at the specified location, you should manually remove
690
- it. If the connection from your client to Elasticsearch is closed while the client
691
- is waiting for the result of the analysis, the test is cancelled. Some clients
692
- are configured to close their connection if no response is received within a
693
- certain timeout. An analysis takes a long time to complete so you might need
694
- to relax any such client-side timeouts. On cancellation the analysis attempts
695
- to clean up the data it was writing, but it may not be able to remove it all.
696
- The path to the leftover data is recorded in the Elasticsearch logs. You should
697
- verify that this location has been cleaned up correctly. If there is still leftover
698
- data at the specified location, you should manually remove it. If the analysis
699
- is successful then it detected no incorrect behaviour, but this does not mean
700
- that correct behaviour is guaranteed. The analysis attempts to detect common
701
- bugs but it does not offer 100% coverage. Additionally, it does not test the
702
- following: * Your repository must perform durable writes. Once a blob has been
703
- written it must remain in place until it is deleted, even after a power loss
704
- or similar disaster. * Your repository must not suffer from silent data corruption.
705
- Once a blob has been written, its contents must remain unchanged until it is
706
- deliberately modified or deleted. * Your repository must behave correctly even
707
- if connectivity from the cluster is disrupted. Reads and writes may fail in this
708
- case, but they must not return incorrect results. IMPORTANT: An analysis writes
709
- a substantial amount of data to your repository and then reads it back again.
710
- This consumes bandwidth on the network between the cluster and the repository,
711
- and storage space and I/O bandwidth on the repository itself. You must ensure
712
- this load does not affect other users of these systems. Analyses respect the
713
- repository settings `max_snapshot_bytes_per_sec` and `max_restore_bytes_per_sec`
714
- if available and the cluster setting `indices.recovery.max_bytes_per_sec` which
715
- you can use to limit the bandwidth they consume. NOTE: This API is intended for
716
- exploratory use by humans. You should expect the request parameters and the response
717
- format to vary in future versions. NOTE: Different versions of Elasticsearch
718
- may perform different checks for repository compatibility, with newer versions
719
- typically being stricter than older ones. A storage system that passes repository
720
- analysis with one version of Elasticsearch may fail with a different version.
721
- This indicates it behaves incorrectly in ways that the former version did not
722
- detect. You must work with the supplier of your storage system to address the
723
- incompatibilities detected by the repository analysis API in any version of Elasticsearch.
724
- NOTE: This API may not work correctly in a mixed-version cluster. *Implementation
725
- details* NOTE: This section of documentation describes how the repository analysis
726
- API works in this version of Elasticsearch, but you should expect the implementation
727
- to vary between versions. The request parameters and response format depend on
728
- details of the implementation so may also be different in newer versions. The
729
- analysis comprises a number of blob-level tasks, as set by the `blob_count` parameter
730
- and a number of compare-and-exchange operations on linearizable registers, as
731
- set by the `register_operation_count` parameter. These tasks are distributed
732
- over the data and master-eligible nodes in the cluster for execution. For most
733
- blob-level tasks, the executing node first writes a blob to the repository and
734
- then instructs some of the other nodes in the cluster to attempt to read the
735
- data it just wrote. The size of the blob is chosen randomly, according to the
736
- `max_blob_size` and `max_total_data_size` parameters. If any of these reads fails
737
- then the repository does not implement the necessary read-after-write semantics
738
- that Elasticsearch requires. For some blob-level tasks, the executing node will
739
- instruct some of its peers to attempt to read the data before the writing process
740
- completes. These reads are permitted to fail, but must not return partial data.
741
- If any read returns partial data then the repository does not implement the necessary
742
- atomicity semantics that Elasticsearch requires. For some blob-level tasks, the
743
- executing node will overwrite the blob while its peers are reading it. In this
744
- case the data read may come from either the original or the overwritten blob,
745
- but the read operation must not return partial data or a mix of data from the
746
- two blobs. If any of these reads returns partial data or a mix of the two blobs
747
- then the repository does not implement the necessary atomicity semantics that
748
- Elasticsearch requires for overwrites. The executing node will use a variety
749
- of different methods to write the blob. For instance, where applicable, it will
750
- use both single-part and multi-part uploads. Similarly, the reading nodes will
751
- use a variety of different methods to read the data back again. For instance
752
- they may read the entire blob from start to end or may read only a subset of
753
- the data. For some blob-level tasks, the executing node will cancel the write
754
- before it is complete. In this case, it still instructs some of the other nodes
755
- in the cluster to attempt to read the blob but all of these reads must fail to
756
- find the blob. Linearizable registers are special blobs that Elasticsearch manipulates
757
- using an atomic compare-and-exchange operation. This operation ensures correct
758
- and strongly-consistent behavior even when the blob is accessed by multiple nodes
759
- at the same time. The detailed implementation of the compare-and-exchange operation
760
- on linearizable registers varies by repository type. Repository analysis verifies
761
- that that uncontended compare-and-exchange operations on a linearizable register
762
- blob always succeed. Repository analysis also verifies that contended operations
763
- either succeed or report the contention but do not return incorrect results.
764
- If an operation fails due to contention, Elasticsearch retries the operation
765
- until it succeeds. Most of the compare-and-exchange operations performed by repository
766
- analysis atomically increment a counter which is represented as an 8-byte blob.
767
- Some operations also verify the behavior on small blobs with sizes other than
768
- 8 bytes.
769
-
770
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/repo-analysis-api.html>`_
675
+ .. raw:: html
676
+
677
+ <p>Analyze a snapshot repository.
678
+ Analyze the performance characteristics and any incorrect behaviour found in a repository.</p>
679
+ <p>The response exposes implementation details of the analysis which may change from version to version.
680
+ The response body format is therefore not considered stable and may be different in newer versions.</p>
681
+ <p>There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch.
682
+ Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system.</p>
683
+ <p>The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations.
684
+ Run your first analysis with the default parameter values to check for simple problems.
685
+ If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a <code>blob_count</code> of at least <code>2000</code>, a <code>max_blob_size</code> of at least <code>2gb</code>, a <code>max_total_data_size</code> of at least <code>1tb</code>, and a <code>register_operation_count</code> of at least <code>100</code>.
686
+ Always specify a generous timeout, possibly <code>1h</code> or longer, to allow time for each analysis to run to completion.
687
+ Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once.</p>
688
+ <p>If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly.
689
+ This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support.
690
+ If so, this storage system is not suitable for use as a snapshot repository.
691
+ You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects.</p>
692
+ <p>If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took.
693
+ You can use this information to determine the performance of your storage system.
694
+ If any operation fails or returns an incorrect result, the API returns an error.
695
+ If the API returns an error, it may not have removed all the data it wrote to the repository.
696
+ The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs.
697
+ You should verify that this location has been cleaned up correctly.
698
+ If there is still leftover data at the specified location, you should manually remove it.</p>
699
+ <p>If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled.
700
+ Some clients are configured to close their connection if no response is received within a certain timeout.
701
+ An analysis takes a long time to complete so you might need to relax any such client-side timeouts.
702
+ On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all.
703
+ The path to the leftover data is recorded in the Elasticsearch logs.
704
+ You should verify that this location has been cleaned up correctly.
705
+ If there is still leftover data at the specified location, you should manually remove it.</p>
706
+ <p>If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed.
707
+ The analysis attempts to detect common bugs but it does not offer 100% coverage.
708
+ Additionally, it does not test the following:</p>
709
+ <ul>
710
+ <li>Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster.</li>
711
+ <li>Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted.</li>
712
+ <li>Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results.</li>
713
+ </ul>
714
+ <p>IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again.
715
+ This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself.
716
+ You must ensure this load does not affect other users of these systems.
717
+ Analyses respect the repository settings <code>max_snapshot_bytes_per_sec</code> and <code>max_restore_bytes_per_sec</code> if available and the cluster setting <code>indices.recovery.max_bytes_per_sec</code> which you can use to limit the bandwidth they consume.</p>
718
+ <p>NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions.</p>
719
+ <p>NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones.
720
+ A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version.
721
+ This indicates it behaves incorrectly in ways that the former version did not detect.
722
+ You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch.</p>
723
+ <p>NOTE: This API may not work correctly in a mixed-version cluster.</p>
724
+ <p><em>Implementation details</em></p>
725
+ <p>NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions.</p>
726
+ <p>The analysis comprises a number of blob-level tasks, as set by the <code>blob_count</code> parameter and a number of compare-and-exchange operations on linearizable registers, as set by the <code>register_operation_count</code> parameter.
727
+ These tasks are distributed over the data and master-eligible nodes in the cluster for execution.</p>
728
+ <p>For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote.
729
+ The size of the blob is chosen randomly, according to the <code>max_blob_size</code> and <code>max_total_data_size</code> parameters.
730
+ If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires.</p>
731
+ <p>For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes.
732
+ These reads are permitted to fail, but must not return partial data.
733
+ If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires.</p>
734
+ <p>For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it.
735
+ In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs.
736
+ If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites.</p>
737
+ <p>The executing node will use a variety of different methods to write the blob.
738
+ For instance, where applicable, it will use both single-part and multi-part uploads.
739
+ Similarly, the reading nodes will use a variety of different methods to read the data back again.
740
+ For instance they may read the entire blob from start to end or may read only a subset of the data.</p>
741
+ <p>For some blob-level tasks, the executing node will cancel the write before it is complete.
742
+ In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob.</p>
743
+ <p>Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation.
744
+ This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time.
745
+ The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type.
746
+ Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed.
747
+ Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results.
748
+ If an operation fails due to contention, Elasticsearch retries the operation until it succeeds.
749
+ Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob.
750
+ Some operations also verify the behavior on small blobs with sizes other than 8 bytes.</p>
751
+
752
+
753
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/repo-analysis-api.html>`_
771
754
 
772
755
  :param name: The name of the repository.
773
756
  :param blob_count: The total number of blobs to write to the repository during
@@ -868,42 +851,33 @@ class SnapshotClient(NamespacedClient):
868
851
  verify_blob_contents: t.Optional[bool] = None,
869
852
  ) -> ObjectApiResponse[t.Any]:
870
853
  """
871
- Verify the repository integrity. Verify the integrity of the contents of a snapshot
872
- repository. This API enables you to perform a comprehensive check of the contents
873
- of a repository, looking for any anomalies in its data or metadata which might
874
- prevent you from restoring snapshots from the repository or which might cause
875
- future snapshot create or delete operations to fail. If you suspect the integrity
876
- of the contents of one of your snapshot repositories, cease all write activity
877
- to this repository immediately, set its `read_only` option to `true`, and use
878
- this API to verify its integrity. Until you do so: * It may not be possible to
879
- restore some snapshots from this repository. * Searchable snapshots may report
880
- errors when searched or may have unassigned shards. * Taking snapshots into this
881
- repository may fail or may appear to succeed but have created a snapshot which
882
- cannot be restored. * Deleting snapshots from this repository may fail or may
883
- appear to succeed but leave the underlying data on disk. * Continuing to write
884
- to the repository while it is in an invalid state may causing additional damage
885
- to its contents. If the API finds any problems with the integrity of the contents
886
- of your repository, Elasticsearch will not be able to repair the damage. The
887
- only way to bring the repository back into a fully working state after its contents
888
- have been damaged is by restoring its contents from a repository backup which
889
- was taken before the damage occurred. You must also identify what caused the
890
- damage and take action to prevent it from happening again. If you cannot restore
891
- a repository backup, register a new repository and use this for all future snapshot
892
- operations. In some cases it may be possible to recover some of the contents
893
- of a damaged repository, either by restoring as many of its snapshots as needed
894
- and taking new snapshots of the restored data, or by using the reindex API to
895
- copy data from any searchable snapshots mounted from the damaged repository.
896
- Avoid all operations which write to the repository while the verify repository
897
- integrity API is running. If something changes the repository contents while
898
- an integrity verification is running then Elasticsearch may incorrectly report
899
- having detected some anomalies in its contents due to the concurrent writes.
900
- It may also incorrectly fail to report some anomalies that the concurrent writes
901
- prevented it from detecting. NOTE: This API is intended for exploratory use by
902
- humans. You should expect the request parameters and the response format to vary
903
- in future versions. NOTE: This API may not work correctly in a mixed-version
904
- cluster.
905
-
906
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-repo-integrity-api.html>`_
854
+ .. raw:: html
855
+
856
+ <p>Verify the repository integrity.
857
+ Verify the integrity of the contents of a snapshot repository.</p>
858
+ <p>This API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail.</p>
859
+ <p>If you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its <code>read_only</code> option to <code>true</code>, and use this API to verify its integrity.
860
+ Until you do so:</p>
861
+ <ul>
862
+ <li>It may not be possible to restore some snapshots from this repository.</li>
863
+ <li>Searchable snapshots may report errors when searched or may have unassigned shards.</li>
864
+ <li>Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored.</li>
865
+ <li>Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk.</li>
866
+ <li>Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents.</li>
867
+ </ul>
868
+ <p>If the API finds any problems with the integrity of the contents of your repository, Elasticsearch will not be able to repair the damage.
869
+ The only way to bring the repository back into a fully working state after its contents have been damaged is by restoring its contents from a repository backup which was taken before the damage occurred.
870
+ You must also identify what caused the damage and take action to prevent it from happening again.</p>
871
+ <p>If you cannot restore a repository backup, register a new repository and use this for all future snapshot operations.
872
+ In some cases it may be possible to recover some of the contents of a damaged repository, either by restoring as many of its snapshots as needed and taking new snapshots of the restored data, or by using the reindex API to copy data from any searchable snapshots mounted from the damaged repository.</p>
873
+ <p>Avoid all operations which write to the repository while the verify repository integrity API is running.
874
+ If something changes the repository contents while an integrity verification is running then Elasticsearch may incorrectly report having detected some anomalies in its contents due to the concurrent writes.
875
+ It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.</p>
876
+ <p>NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions.</p>
877
+ <p>NOTE: This API may not work correctly in a mixed-version cluster.</p>
878
+
879
+
880
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-repo-integrity-api.html>`_
907
881
 
908
882
  :param name: A repository name
909
883
  :param blob_thread_pool_concurrency: Number of threads to use for reading blob
@@ -998,22 +972,22 @@ class SnapshotClient(NamespacedClient):
998
972
  body: t.Optional[t.Dict[str, t.Any]] = None,
999
973
  ) -> ObjectApiResponse[t.Any]:
1000
974
  """
1001
- Restore a snapshot. Restore a snapshot of a cluster or data streams and indices.
1002
- You can restore a snapshot only to a running cluster with an elected master node.
1003
- The snapshot repository must be registered and available to the cluster. The
1004
- snapshot and cluster versions must be compatible. To restore a snapshot, the
1005
- cluster's global metadata must be writable. Ensure there are't any cluster blocks
1006
- that prevent writes. The restore operation ignores index blocks. Before you restore
1007
- a data stream, ensure the cluster contains a matching index template with data
1008
- streams enabled. To check, use the index management feature in Kibana or the
1009
- get index template API: ``` GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream
1010
- ``` If no such template exists, you can create one or restore a cluster state
1011
- that contains one. Without a matching index template, a data stream can't roll
1012
- over or create backing indices. If your snapshot contains data from App Search
1013
- or Workplace Search, you must restore the Enterprise Search encryption key before
1014
- you restore the snapshot.
1015
-
1016
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/restore-snapshot-api.html>`_
975
+ .. raw:: html
976
+
977
+ <p>Restore a snapshot.
978
+ Restore a snapshot of a cluster or data streams and indices.</p>
979
+ <p>You can restore a snapshot only to a running cluster with an elected master node.
980
+ The snapshot repository must be registered and available to the cluster.
981
+ The snapshot and cluster versions must be compatible.</p>
982
+ <p>To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks.</p>
983
+ <p>Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API:</p>
984
+ <pre><code>GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream
985
+ </code></pre>
986
+ <p>If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices.</p>
987
+ <p>If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot.</p>
988
+
989
+
990
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/restore-snapshot-api.html>`_
1017
991
 
1018
992
  :param repository: A repository name
1019
993
  :param snapshot: A snapshot name
@@ -1104,20 +1078,20 @@ class SnapshotClient(NamespacedClient):
1104
1078
  pretty: t.Optional[bool] = None,
1105
1079
  ) -> ObjectApiResponse[t.Any]:
1106
1080
  """
1107
- Get the snapshot status. Get a detailed description of the current state for
1108
- each shard participating in the snapshot. Note that this API should be used only
1109
- to obtain detailed shard-level information for ongoing snapshots. If this detail
1110
- is not needed or you want to obtain information about one or more existing snapshots,
1111
- use the get snapshot API. WARNING: Using the API to return the status of any
1112
- snapshots other than currently running snapshots can be expensive. The API requires
1113
- a read from the repository for each shard in each snapshot. For example, if you
1114
- have 100 snapshots with 1,000 shards each, an API request that includes all snapshots
1115
- will require 100,000 reads (100 snapshots x 1,000 shards). Depending on the latency
1116
- of your storage, such requests can take an extremely long time to return results.
1117
- These requests can also tax machine resources and, when using cloud storage,
1118
- incur high processing costs.
1119
-
1120
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-status-api.html>`_
1081
+ .. raw:: html
1082
+
1083
+ <p>Get the snapshot status.
1084
+ Get a detailed description of the current state for each shard participating in the snapshot.
1085
+ Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots.
1086
+ If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.</p>
1087
+ <p>WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.
1088
+ The API requires a read from the repository for each shard in each snapshot.
1089
+ For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).</p>
1090
+ <p>Depending on the latency of your storage, such requests can take an extremely long time to return results.
1091
+ These requests can also tax machine resources and, when using cloud storage, incur high processing costs.</p>
1092
+
1093
+
1094
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-status-api.html>`_
1121
1095
 
1122
1096
  :param repository: A repository name
1123
1097
  :param snapshot: A comma-separated list of snapshot names
@@ -1174,10 +1148,13 @@ class SnapshotClient(NamespacedClient):
1174
1148
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1175
1149
  ) -> ObjectApiResponse[t.Any]:
1176
1150
  """
1177
- Verify a snapshot repository. Check for common misconfigurations in a snapshot
1178
- repository.
1151
+ .. raw:: html
1152
+
1153
+ <p>Verify a snapshot repository.
1154
+ Check for common misconfigurations in a snapshot repository.</p>
1155
+
1179
1156
 
1180
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-snapshot-repo-api.html>`_
1157
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-snapshot-repo-api.html>`_
1181
1158
 
1182
1159
  :param name: A repository name
1183
1160
  :param master_timeout: Explicit operation timeout for connection to master node