elasticsearch 8.17.0__py3-none-any.whl → 8.17.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +2034 -740
  3. elasticsearch/_async/client/async_search.py +33 -22
  4. elasticsearch/_async/client/autoscaling.py +27 -21
  5. elasticsearch/_async/client/cat.py +280 -336
  6. elasticsearch/_async/client/ccr.py +96 -70
  7. elasticsearch/_async/client/cluster.py +152 -144
  8. elasticsearch/_async/client/connector.py +488 -55
  9. elasticsearch/_async/client/dangling_indices.py +22 -16
  10. elasticsearch/_async/client/enrich.py +25 -6
  11. elasticsearch/_async/client/eql.py +22 -9
  12. elasticsearch/_async/client/esql.py +295 -3
  13. elasticsearch/_async/client/features.py +25 -25
  14. elasticsearch/_async/client/fleet.py +15 -9
  15. elasticsearch/_async/client/graph.py +9 -8
  16. elasticsearch/_async/client/ilm.py +91 -61
  17. elasticsearch/_async/client/indices.py +746 -324
  18. elasticsearch/_async/client/inference.py +101 -4
  19. elasticsearch/_async/client/ingest.py +231 -19
  20. elasticsearch/_async/client/license.py +48 -31
  21. elasticsearch/_async/client/logstash.py +20 -6
  22. elasticsearch/_async/client/migration.py +25 -7
  23. elasticsearch/_async/client/ml.py +532 -278
  24. elasticsearch/_async/client/monitoring.py +5 -1
  25. elasticsearch/_async/client/nodes.py +46 -30
  26. elasticsearch/_async/client/query_rules.py +65 -18
  27. elasticsearch/_async/client/rollup.py +126 -13
  28. elasticsearch/_async/client/search_application.py +170 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +45 -23
  30. elasticsearch/_async/client/security.py +1299 -340
  31. elasticsearch/_async/client/shutdown.py +43 -15
  32. elasticsearch/_async/client/simulate.py +145 -0
  33. elasticsearch/_async/client/slm.py +163 -19
  34. elasticsearch/_async/client/snapshot.py +288 -23
  35. elasticsearch/_async/client/sql.py +94 -53
  36. elasticsearch/_async/client/ssl.py +16 -17
  37. elasticsearch/_async/client/synonyms.py +67 -26
  38. elasticsearch/_async/client/tasks.py +103 -28
  39. elasticsearch/_async/client/text_structure.py +475 -46
  40. elasticsearch/_async/client/transform.py +108 -72
  41. elasticsearch/_async/client/watcher.py +245 -43
  42. elasticsearch/_async/client/xpack.py +20 -6
  43. elasticsearch/_async/helpers.py +1 -1
  44. elasticsearch/_sync/client/__init__.py +2034 -740
  45. elasticsearch/_sync/client/async_search.py +33 -22
  46. elasticsearch/_sync/client/autoscaling.py +27 -21
  47. elasticsearch/_sync/client/cat.py +280 -336
  48. elasticsearch/_sync/client/ccr.py +96 -70
  49. elasticsearch/_sync/client/cluster.py +152 -144
  50. elasticsearch/_sync/client/connector.py +488 -55
  51. elasticsearch/_sync/client/dangling_indices.py +22 -16
  52. elasticsearch/_sync/client/enrich.py +25 -6
  53. elasticsearch/_sync/client/eql.py +22 -9
  54. elasticsearch/_sync/client/esql.py +295 -3
  55. elasticsearch/_sync/client/features.py +25 -25
  56. elasticsearch/_sync/client/fleet.py +15 -9
  57. elasticsearch/_sync/client/graph.py +9 -8
  58. elasticsearch/_sync/client/ilm.py +91 -61
  59. elasticsearch/_sync/client/indices.py +746 -324
  60. elasticsearch/_sync/client/inference.py +101 -4
  61. elasticsearch/_sync/client/ingest.py +231 -19
  62. elasticsearch/_sync/client/license.py +48 -31
  63. elasticsearch/_sync/client/logstash.py +20 -6
  64. elasticsearch/_sync/client/migration.py +25 -7
  65. elasticsearch/_sync/client/ml.py +532 -278
  66. elasticsearch/_sync/client/monitoring.py +5 -1
  67. elasticsearch/_sync/client/nodes.py +46 -30
  68. elasticsearch/_sync/client/query_rules.py +65 -18
  69. elasticsearch/_sync/client/rollup.py +126 -13
  70. elasticsearch/_sync/client/search_application.py +170 -13
  71. elasticsearch/_sync/client/searchable_snapshots.py +45 -23
  72. elasticsearch/_sync/client/security.py +1299 -340
  73. elasticsearch/_sync/client/shutdown.py +43 -15
  74. elasticsearch/_sync/client/simulate.py +145 -0
  75. elasticsearch/_sync/client/slm.py +163 -19
  76. elasticsearch/_sync/client/snapshot.py +288 -23
  77. elasticsearch/_sync/client/sql.py +94 -53
  78. elasticsearch/_sync/client/ssl.py +16 -17
  79. elasticsearch/_sync/client/synonyms.py +67 -26
  80. elasticsearch/_sync/client/tasks.py +103 -28
  81. elasticsearch/_sync/client/text_structure.py +475 -46
  82. elasticsearch/_sync/client/transform.py +108 -72
  83. elasticsearch/_sync/client/utils.py +1 -1
  84. elasticsearch/_sync/client/watcher.py +245 -43
  85. elasticsearch/_sync/client/xpack.py +20 -6
  86. elasticsearch/_version.py +1 -1
  87. elasticsearch/client.py +4 -0
  88. elasticsearch/helpers/actions.py +1 -1
  89. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  90. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
  91. elasticsearch-8.17.2.dist-info/RECORD +119 -0
  92. elasticsearch-8.17.0.dist-info/RECORD +0 -117
  93. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
  94. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
@@ -44,8 +44,11 @@ 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
- Triggers the review of a snapshot repository’s contents and deletes any stale
48
- data not referenced by existing snapshots.
47
+ .. raw:: html
48
+
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
+
49
52
 
50
53
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clean-up-snapshot-repo-api.html>`_
51
54
 
@@ -99,9 +102,13 @@ class SnapshotClient(NamespacedClient):
99
102
  body: t.Optional[t.Dict[str, t.Any]] = None,
100
103
  ) -> ObjectApiResponse[t.Any]:
101
104
  """
102
- Clones indices from one snapshot into another snapshot in the same repository.
105
+ .. raw:: html
103
106
 
104
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
107
+ <p>Clone a snapshot.
108
+ Clone part of all of a snapshot into another snapshot in the same repository.</p>
109
+
110
+
111
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clone-snapshot-api.html>`_
105
112
 
106
113
  :param repository: A repository name
107
114
  :param snapshot: The name of the snapshot to clone from
@@ -182,9 +189,13 @@ class SnapshotClient(NamespacedClient):
182
189
  body: t.Optional[t.Dict[str, t.Any]] = None,
183
190
  ) -> ObjectApiResponse[t.Any]:
184
191
  """
185
- Creates a snapshot in a repository.
192
+ .. raw:: html
186
193
 
187
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
194
+ <p>Create a snapshot.
195
+ Take a snapshot of a cluster or of data streams and indices.</p>
196
+
197
+
198
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-snapshot-api.html>`_
188
199
 
189
200
  :param repository: Repository for the snapshot.
190
201
  :param snapshot: Name of the snapshot. Must be unique in the repository.
@@ -286,7 +297,13 @@ class SnapshotClient(NamespacedClient):
286
297
  verify: t.Optional[bool] = None,
287
298
  ) -> ObjectApiResponse[t.Any]:
288
299
  """
289
- Creates a repository.
300
+ .. raw:: html
301
+
302
+ <p>Create or update a snapshot repository.
303
+ IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
304
+ To register a snapshot repository, the cluster's global metadata must be writeable.
305
+ 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>
306
+
290
307
 
291
308
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
292
309
 
@@ -346,9 +363,12 @@ class SnapshotClient(NamespacedClient):
346
363
  pretty: t.Optional[bool] = None,
347
364
  ) -> ObjectApiResponse[t.Any]:
348
365
  """
349
- Deletes one or more snapshots.
366
+ .. raw:: html
350
367
 
351
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
368
+ <p>Delete snapshots.</p>
369
+
370
+
371
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-api.html>`_
352
372
 
353
373
  :param repository: A repository name
354
374
  :param snapshot: A comma-separated list of snapshot names
@@ -397,9 +417,14 @@ class SnapshotClient(NamespacedClient):
397
417
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
398
418
  ) -> ObjectApiResponse[t.Any]:
399
419
  """
400
- Deletes a repository.
420
+ .. raw:: html
421
+
422
+ <p>Delete snapshot repositories.
423
+ When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.
424
+ The snapshots themselves are left untouched and in place.</p>
401
425
 
402
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
426
+
427
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-repo-api.html>`_
403
428
 
404
429
  :param name: Name of the snapshot repository to unregister. Wildcard (`*`) patterns
405
430
  are supported.
@@ -471,9 +496,12 @@ class SnapshotClient(NamespacedClient):
471
496
  verbose: t.Optional[bool] = None,
472
497
  ) -> ObjectApiResponse[t.Any]:
473
498
  """
474
- Returns information about a snapshot.
499
+ .. raw:: html
475
500
 
476
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
501
+ <p>Get snapshot information.</p>
502
+
503
+
504
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-api.html>`_
477
505
 
478
506
  :param repository: Comma-separated list of snapshot repository names used to
479
507
  limit the request. Wildcard (*) expressions are supported.
@@ -583,9 +611,12 @@ class SnapshotClient(NamespacedClient):
583
611
  pretty: t.Optional[bool] = None,
584
612
  ) -> ObjectApiResponse[t.Any]:
585
613
  """
586
- Returns information about a repository.
614
+ .. raw:: html
587
615
 
588
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
616
+ <p>Get snapshot repository information.</p>
617
+
618
+
619
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-repo-api.html>`_
589
620
 
590
621
  :param name: A comma-separated list of repository names
591
622
  :param local: Return local information, do not retrieve the state from master
@@ -622,6 +653,188 @@ class SnapshotClient(NamespacedClient):
622
653
  path_parts=__path_parts,
623
654
  )
624
655
 
656
+ @_rewrite_parameters()
657
+ def repository_analyze(
658
+ self,
659
+ *,
660
+ name: str,
661
+ blob_count: t.Optional[int] = None,
662
+ concurrency: t.Optional[int] = None,
663
+ detailed: t.Optional[bool] = None,
664
+ early_read_node_count: t.Optional[int] = None,
665
+ error_trace: t.Optional[bool] = None,
666
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
667
+ human: t.Optional[bool] = None,
668
+ max_blob_size: t.Optional[t.Union[int, str]] = None,
669
+ max_total_data_size: t.Optional[t.Union[int, str]] = None,
670
+ pretty: t.Optional[bool] = None,
671
+ rare_action_probability: t.Optional[float] = None,
672
+ rarely_abort_writes: t.Optional[bool] = None,
673
+ read_node_count: t.Optional[int] = None,
674
+ register_operation_count: t.Optional[int] = None,
675
+ seed: t.Optional[int] = None,
676
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
677
+ ) -> ObjectApiResponse[t.Any]:
678
+ """
679
+ .. raw:: html
680
+
681
+ <p>Analyze a snapshot repository.
682
+ Analyze the performance characteristics and any incorrect behaviour found in a repository.</p>
683
+ <p>The response exposes implementation details of the analysis which may change from version to version.
684
+ The response body format is therefore not considered stable and may be different in newer versions.</p>
685
+ <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.
686
+ 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>
687
+ <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.
688
+ Run your first analysis with the default parameter values to check for simple problems.
689
+ 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>.
690
+ Always specify a generous timeout, possibly <code>1h</code> or longer, to allow time for each analysis to run to completion.
691
+ 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>
692
+ <p>If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly.
693
+ This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support.
694
+ If so, this storage system is not suitable for use as a snapshot repository.
695
+ You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects.</p>
696
+ <p>If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took.
697
+ You can use this information to determine the performance of your storage system.
698
+ If any operation fails or returns an incorrect result, the API returns an error.
699
+ If the API returns an error, it may not have removed all the data it wrote to the repository.
700
+ The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs.
701
+ You should verify that this location has been cleaned up correctly.
702
+ If there is still leftover data at the specified location, you should manually remove it.</p>
703
+ <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.
704
+ Some clients are configured to close their connection if no response is received within a certain timeout.
705
+ An analysis takes a long time to complete so you might need to relax any such client-side timeouts.
706
+ On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all.
707
+ The path to the leftover data is recorded in the Elasticsearch logs.
708
+ You should verify that this location has been cleaned up correctly.
709
+ If there is still leftover data at the specified location, you should manually remove it.</p>
710
+ <p>If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed.
711
+ The analysis attempts to detect common bugs but it does not offer 100% coverage.
712
+ Additionally, it does not test the following:</p>
713
+ <ul>
714
+ <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>
715
+ <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>
716
+ <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>
717
+ </ul>
718
+ <p>IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again.
719
+ This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself.
720
+ You must ensure this load does not affect other users of these systems.
721
+ 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>
722
+ <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>
723
+ <p>NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones.
724
+ A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version.
725
+ This indicates it behaves incorrectly in ways that the former version did not detect.
726
+ 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>
727
+ <p>NOTE: This API may not work correctly in a mixed-version cluster.</p>
728
+ <p><em>Implementation details</em></p>
729
+ <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>
730
+ <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.
731
+ These tasks are distributed over the data and master-eligible nodes in the cluster for execution.</p>
732
+ <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.
733
+ The size of the blob is chosen randomly, according to the <code>max_blob_size</code> and <code>max_total_data_size</code> parameters.
734
+ If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires.</p>
735
+ <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.
736
+ These reads are permitted to fail, but must not return partial data.
737
+ If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires.</p>
738
+ <p>For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it.
739
+ 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.
740
+ 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>
741
+ <p>The executing node will use a variety of different methods to write the blob.
742
+ For instance, where applicable, it will use both single-part and multi-part uploads.
743
+ Similarly, the reading nodes will use a variety of different methods to read the data back again.
744
+ For instance they may read the entire blob from start to end or may read only a subset of the data.</p>
745
+ <p>For some blob-level tasks, the executing node will cancel the write before it is complete.
746
+ 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>
747
+ <p>Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation.
748
+ This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time.
749
+ The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type.
750
+ Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed.
751
+ Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results.
752
+ If an operation fails due to contention, Elasticsearch retries the operation until it succeeds.
753
+ Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob.
754
+ Some operations also verify the behavior on small blobs with sizes other than 8 bytes.</p>
755
+
756
+
757
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/repo-analysis-api.html>`_
758
+
759
+ :param name: The name of the repository.
760
+ :param blob_count: The total number of blobs to write to the repository during
761
+ the test. For realistic experiments, you should set it to at least `2000`.
762
+ :param concurrency: The number of operations to run concurrently during the test.
763
+ :param detailed: Indicates whether to return detailed results, including timing
764
+ information for every operation performed during the analysis. If false,
765
+ it returns only a summary of the analysis.
766
+ :param early_read_node_count: The number of nodes on which to perform an early
767
+ read operation while writing each blob. Early read operations are only rarely
768
+ performed.
769
+ :param max_blob_size: The maximum size of a blob to be written during the test.
770
+ For realistic experiments, you should set it to at least `2gb`.
771
+ :param max_total_data_size: An upper limit on the total size of all the blobs
772
+ written during the test. For realistic experiments, you should set it to
773
+ at least `1tb`.
774
+ :param rare_action_probability: The probability of performing a rare action such
775
+ as an early read, an overwrite, or an aborted write on each blob.
776
+ :param rarely_abort_writes: Indicates whether to rarely cancel writes before
777
+ they complete.
778
+ :param read_node_count: The number of nodes on which to read a blob after writing.
779
+ :param register_operation_count: The minimum number of linearizable register
780
+ operations to perform in total. For realistic experiments, you should set
781
+ it to at least `100`.
782
+ :param seed: The seed for the pseudo-random number generator used to generate
783
+ the list of operations performed during the test. To repeat the same set
784
+ of operations in multiple experiments, use the same seed in each experiment.
785
+ Note that the operations are performed concurrently so might not always happen
786
+ in the same order on each run.
787
+ :param timeout: The period of time to wait for the test to complete. If no response
788
+ is received before the timeout expires, the test is cancelled and returns
789
+ an error.
790
+ """
791
+ if name in SKIP_IN_PATH:
792
+ raise ValueError("Empty value passed for parameter 'name'")
793
+ __path_parts: t.Dict[str, str] = {"repository": _quote(name)}
794
+ __path = f'/_snapshot/{__path_parts["repository"]}/_analyze'
795
+ __query: t.Dict[str, t.Any] = {}
796
+ if blob_count is not None:
797
+ __query["blob_count"] = blob_count
798
+ if concurrency is not None:
799
+ __query["concurrency"] = concurrency
800
+ if detailed is not None:
801
+ __query["detailed"] = detailed
802
+ if early_read_node_count is not None:
803
+ __query["early_read_node_count"] = early_read_node_count
804
+ if error_trace is not None:
805
+ __query["error_trace"] = error_trace
806
+ if filter_path is not None:
807
+ __query["filter_path"] = filter_path
808
+ if human is not None:
809
+ __query["human"] = human
810
+ if max_blob_size is not None:
811
+ __query["max_blob_size"] = max_blob_size
812
+ if max_total_data_size is not None:
813
+ __query["max_total_data_size"] = max_total_data_size
814
+ if pretty is not None:
815
+ __query["pretty"] = pretty
816
+ if rare_action_probability is not None:
817
+ __query["rare_action_probability"] = rare_action_probability
818
+ if rarely_abort_writes is not None:
819
+ __query["rarely_abort_writes"] = rarely_abort_writes
820
+ if read_node_count is not None:
821
+ __query["read_node_count"] = read_node_count
822
+ if register_operation_count is not None:
823
+ __query["register_operation_count"] = register_operation_count
824
+ if seed is not None:
825
+ __query["seed"] = seed
826
+ if timeout is not None:
827
+ __query["timeout"] = timeout
828
+ __headers = {"accept": "application/json"}
829
+ return self.perform_request( # type: ignore[return-value]
830
+ "POST",
831
+ __path,
832
+ params=__query,
833
+ headers=__headers,
834
+ endpoint_id="snapshot.repository_analyze",
835
+ path_parts=__path_parts,
836
+ )
837
+
625
838
  @_rewrite_parameters()
626
839
  @_stability_warning(Stability.EXPERIMENTAL)
627
840
  def repository_verify_integrity(
@@ -642,9 +855,33 @@ class SnapshotClient(NamespacedClient):
642
855
  verify_blob_contents: t.Optional[bool] = None,
643
856
  ) -> ObjectApiResponse[t.Any]:
644
857
  """
645
- Verifies the integrity of the contents of a snapshot repository
858
+ .. raw:: html
646
859
 
647
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
860
+ <p>Verify the repository integrity.
861
+ Verify the integrity of the contents of a snapshot repository.</p>
862
+ <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>
863
+ <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.
864
+ Until you do so:</p>
865
+ <ul>
866
+ <li>It may not be possible to restore some snapshots from this repository.</li>
867
+ <li>Searchable snapshots may report errors when searched or may have unassigned shards.</li>
868
+ <li>Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored.</li>
869
+ <li>Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk.</li>
870
+ <li>Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents.</li>
871
+ </ul>
872
+ <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.
873
+ 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.
874
+ You must also identify what caused the damage and take action to prevent it from happening again.</p>
875
+ <p>If you cannot restore a repository backup, register a new repository and use this for all future snapshot operations.
876
+ 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>
877
+ <p>Avoid all operations which write to the repository while the verify repository integrity API is running.
878
+ 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.
879
+ It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.</p>
880
+ <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>
881
+ <p>NOTE: This API may not work correctly in a mixed-version cluster.</p>
882
+
883
+
884
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-repo-integrity-api.html>`_
648
885
 
649
886
  :param name: A repository name
650
887
  :param blob_thread_pool_concurrency: Number of threads to use for reading blob
@@ -739,9 +976,22 @@ class SnapshotClient(NamespacedClient):
739
976
  body: t.Optional[t.Dict[str, t.Any]] = None,
740
977
  ) -> ObjectApiResponse[t.Any]:
741
978
  """
742
- Restores a snapshot.
979
+ .. raw:: html
743
980
 
744
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
981
+ <p>Restore a snapshot.
982
+ Restore a snapshot of a cluster or data streams and indices.</p>
983
+ <p>You can restore a snapshot only to a running cluster with an elected master node.
984
+ The snapshot repository must be registered and available to the cluster.
985
+ The snapshot and cluster versions must be compatible.</p>
986
+ <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>
987
+ <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>
988
+ <pre><code>GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream
989
+ </code></pre>
990
+ <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>
991
+ <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>
992
+
993
+
994
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/restore-snapshot-api.html>`_
745
995
 
746
996
  :param repository: A repository name
747
997
  :param snapshot: A snapshot name
@@ -832,9 +1082,20 @@ class SnapshotClient(NamespacedClient):
832
1082
  pretty: t.Optional[bool] = None,
833
1083
  ) -> ObjectApiResponse[t.Any]:
834
1084
  """
835
- Returns information about the status of a snapshot.
1085
+ .. raw:: html
1086
+
1087
+ <p>Get the snapshot status.
1088
+ Get a detailed description of the current state for each shard participating in the snapshot.
1089
+ Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots.
1090
+ If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.</p>
1091
+ <p>WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.
1092
+ The API requires a read from the repository for each shard in each snapshot.
1093
+ 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>
1094
+ <p>Depending on the latency of your storage, such requests can take an extremely long time to return results.
1095
+ These requests can also tax machine resources and, when using cloud storage, incur high processing costs.</p>
836
1096
 
837
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
1097
+
1098
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-status-api.html>`_
838
1099
 
839
1100
  :param repository: A repository name
840
1101
  :param snapshot: A comma-separated list of snapshot names
@@ -891,9 +1152,13 @@ class SnapshotClient(NamespacedClient):
891
1152
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
892
1153
  ) -> ObjectApiResponse[t.Any]:
893
1154
  """
894
- Verifies a repository.
1155
+ .. raw:: html
895
1156
 
896
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
1157
+ <p>Verify a snapshot repository.
1158
+ Check for common misconfigurations in a snapshot repository.</p>
1159
+
1160
+
1161
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-snapshot-repo-api.html>`_
897
1162
 
898
1163
  :param name: A repository name
899
1164
  :param master_timeout: Explicit operation timeout for connection to master node