elasticsearch 8.17.2__py3-none-any.whl → 9.0.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 (138) hide show
  1. elasticsearch/_async/client/__init__.py +192 -312
  2. elasticsearch/_async/client/_base.py +1 -2
  3. elasticsearch/_async/client/async_search.py +14 -14
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -33
  6. elasticsearch/_async/client/ccr.py +186 -72
  7. elasticsearch/_async/client/cluster.py +42 -23
  8. elasticsearch/_async/client/connector.py +44 -30
  9. elasticsearch/_async/client/dangling_indices.py +3 -3
  10. elasticsearch/_async/client/enrich.py +26 -5
  11. elasticsearch/_async/client/eql.py +32 -4
  12. elasticsearch/_async/client/esql.py +64 -12
  13. elasticsearch/_async/client/features.py +12 -2
  14. elasticsearch/_async/client/fleet.py +23 -19
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +30 -22
  17. elasticsearch/_async/client/indices.py +435 -231
  18. elasticsearch/_async/client/inference.py +1906 -61
  19. elasticsearch/_async/client/ingest.py +32 -38
  20. elasticsearch/_async/client/license.py +51 -16
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +145 -121
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +10 -28
  26. elasticsearch/_async/client/query_rules.py +8 -8
  27. elasticsearch/_async/client/rollup.py +8 -8
  28. elasticsearch/_async/client/search_application.py +13 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  30. elasticsearch/_async/client/security.py +78 -75
  31. elasticsearch/_async/client/shutdown.py +3 -10
  32. elasticsearch/_async/client/simulate.py +6 -6
  33. elasticsearch/_async/client/slm.py +9 -9
  34. elasticsearch/_async/client/snapshot.py +280 -134
  35. elasticsearch/_async/client/sql.py +6 -6
  36. elasticsearch/_async/client/ssl.py +1 -1
  37. elasticsearch/_async/client/synonyms.py +7 -7
  38. elasticsearch/_async/client/tasks.py +3 -9
  39. elasticsearch/_async/client/text_structure.py +4 -4
  40. elasticsearch/_async/client/transform.py +30 -28
  41. elasticsearch/_async/client/watcher.py +23 -15
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_async/helpers.py +0 -1
  44. elasticsearch/_sync/client/__init__.py +192 -312
  45. elasticsearch/_sync/client/_base.py +1 -2
  46. elasticsearch/_sync/client/async_search.py +14 -14
  47. elasticsearch/_sync/client/autoscaling.py +4 -4
  48. elasticsearch/_sync/client/cat.py +26 -33
  49. elasticsearch/_sync/client/ccr.py +186 -72
  50. elasticsearch/_sync/client/cluster.py +42 -23
  51. elasticsearch/_sync/client/connector.py +44 -30
  52. elasticsearch/_sync/client/dangling_indices.py +3 -3
  53. elasticsearch/_sync/client/enrich.py +26 -5
  54. elasticsearch/_sync/client/eql.py +32 -4
  55. elasticsearch/_sync/client/esql.py +64 -12
  56. elasticsearch/_sync/client/features.py +12 -2
  57. elasticsearch/_sync/client/fleet.py +23 -19
  58. elasticsearch/_sync/client/graph.py +1 -1
  59. elasticsearch/_sync/client/ilm.py +30 -22
  60. elasticsearch/_sync/client/indices.py +435 -231
  61. elasticsearch/_sync/client/inference.py +1906 -61
  62. elasticsearch/_sync/client/ingest.py +32 -38
  63. elasticsearch/_sync/client/license.py +51 -16
  64. elasticsearch/_sync/client/logstash.py +3 -3
  65. elasticsearch/_sync/client/migration.py +3 -3
  66. elasticsearch/_sync/client/ml.py +145 -121
  67. elasticsearch/_sync/client/monitoring.py +1 -1
  68. elasticsearch/_sync/client/nodes.py +10 -28
  69. elasticsearch/_sync/client/query_rules.py +8 -8
  70. elasticsearch/_sync/client/rollup.py +8 -8
  71. elasticsearch/_sync/client/search_application.py +13 -13
  72. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  73. elasticsearch/_sync/client/security.py +78 -75
  74. elasticsearch/_sync/client/shutdown.py +3 -10
  75. elasticsearch/_sync/client/simulate.py +6 -6
  76. elasticsearch/_sync/client/slm.py +9 -9
  77. elasticsearch/_sync/client/snapshot.py +280 -134
  78. elasticsearch/_sync/client/sql.py +6 -6
  79. elasticsearch/_sync/client/ssl.py +1 -1
  80. elasticsearch/_sync/client/synonyms.py +7 -7
  81. elasticsearch/_sync/client/tasks.py +3 -9
  82. elasticsearch/_sync/client/text_structure.py +4 -4
  83. elasticsearch/_sync/client/transform.py +30 -28
  84. elasticsearch/_sync/client/utils.py +0 -40
  85. elasticsearch/_sync/client/watcher.py +23 -15
  86. elasticsearch/_sync/client/xpack.py +2 -2
  87. elasticsearch/_version.py +1 -1
  88. elasticsearch/dsl/__init__.py +203 -0
  89. elasticsearch/dsl/_async/__init__.py +16 -0
  90. elasticsearch/dsl/_async/document.py +522 -0
  91. elasticsearch/dsl/_async/faceted_search.py +50 -0
  92. elasticsearch/dsl/_async/index.py +639 -0
  93. elasticsearch/dsl/_async/mapping.py +49 -0
  94. elasticsearch/dsl/_async/search.py +237 -0
  95. elasticsearch/dsl/_async/update_by_query.py +47 -0
  96. elasticsearch/dsl/_sync/__init__.py +16 -0
  97. elasticsearch/dsl/_sync/document.py +514 -0
  98. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  99. elasticsearch/dsl/_sync/index.py +597 -0
  100. elasticsearch/dsl/_sync/mapping.py +49 -0
  101. elasticsearch/dsl/_sync/search.py +230 -0
  102. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  103. elasticsearch/dsl/aggs.py +3734 -0
  104. elasticsearch/dsl/analysis.py +341 -0
  105. elasticsearch/dsl/async_connections.py +37 -0
  106. elasticsearch/dsl/connections.py +142 -0
  107. elasticsearch/dsl/document.py +20 -0
  108. elasticsearch/dsl/document_base.py +444 -0
  109. elasticsearch/dsl/exceptions.py +32 -0
  110. elasticsearch/dsl/faceted_search.py +28 -0
  111. elasticsearch/dsl/faceted_search_base.py +489 -0
  112. elasticsearch/dsl/field.py +4392 -0
  113. elasticsearch/dsl/function.py +180 -0
  114. elasticsearch/dsl/index.py +23 -0
  115. elasticsearch/dsl/index_base.py +178 -0
  116. elasticsearch/dsl/mapping.py +19 -0
  117. elasticsearch/dsl/mapping_base.py +219 -0
  118. elasticsearch/dsl/query.py +2822 -0
  119. elasticsearch/dsl/response/__init__.py +388 -0
  120. elasticsearch/dsl/response/aggs.py +100 -0
  121. elasticsearch/dsl/response/hit.py +53 -0
  122. elasticsearch/dsl/search.py +20 -0
  123. elasticsearch/dsl/search_base.py +1053 -0
  124. elasticsearch/dsl/serializer.py +34 -0
  125. elasticsearch/dsl/types.py +6453 -0
  126. elasticsearch/dsl/update_by_query.py +19 -0
  127. elasticsearch/dsl/update_by_query_base.py +149 -0
  128. elasticsearch/dsl/utils.py +687 -0
  129. elasticsearch/dsl/wrappers.py +144 -0
  130. elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
  131. elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
  132. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/METADATA +12 -15
  133. elasticsearch-9.0.0.dist-info/RECORD +160 -0
  134. elasticsearch/transport.py +0 -57
  135. elasticsearch-8.17.2.dist-info/RECORD +0 -119
  136. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/WHEEL +0 -0
  137. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/LICENSE +0 -0
  138. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/NOTICE +0 -0
@@ -50,11 +50,18 @@ class SnapshotClient(NamespacedClient):
50
50
  Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.</p>
51
51
 
52
52
 
53
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clean-up-snapshot-repo-api.html>`_
54
-
55
- :param name: Snapshot repository to clean up.
56
- :param master_timeout: Period to wait for a connection to the master node.
57
- :param timeout: Period to wait for a response.
53
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-cleanup-repository>`_
54
+
55
+ :param name: The name of the snapshot repository to clean up.
56
+ :param master_timeout: The period to wait for a connection to the master node.
57
+ If the master node is not available before the timeout expires, the request
58
+ fails and returns an error. To indicate that the request should never timeout,
59
+ set it to `-1`
60
+ :param timeout: The period to wait for a response from all relevant nodes in
61
+ the cluster after updating the cluster metadata. If no response is received
62
+ before the timeout expires, the cluster metadata update still applies but
63
+ the response will indicate that it was not completely acknowledged. To indicate
64
+ that the request should never timeout, set it to `-1`.
58
65
  """
59
66
  if name in SKIP_IN_PATH:
60
67
  raise ValueError("Empty value passed for parameter 'name'")
@@ -98,7 +105,6 @@ class SnapshotClient(NamespacedClient):
98
105
  human: t.Optional[bool] = None,
99
106
  master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
100
107
  pretty: t.Optional[bool] = None,
101
- timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
102
108
  body: t.Optional[t.Dict[str, t.Any]] = None,
103
109
  ) -> ObjectApiResponse[t.Any]:
104
110
  """
@@ -108,14 +114,17 @@ class SnapshotClient(NamespacedClient):
108
114
  Clone part of all of a snapshot into another snapshot in the same repository.</p>
109
115
 
110
116
 
111
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clone-snapshot-api.html>`_
117
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-clone>`_
112
118
 
113
- :param repository: A repository name
114
- :param snapshot: The name of the snapshot to clone from
115
- :param target_snapshot: The name of the cloned snapshot to create
116
- :param indices:
117
- :param master_timeout: Explicit operation timeout for connection to master node
118
- :param timeout:
119
+ :param repository: The name of the snapshot repository that both source and target
120
+ snapshot belong to.
121
+ :param snapshot: The source snapshot name.
122
+ :param target_snapshot: The target snapshot name.
123
+ :param indices: A comma-separated list of indices to include in the snapshot.
124
+ Multi-target syntax is supported.
125
+ :param master_timeout: The period to wait for the master node. If the master
126
+ node is not available before the timeout expires, the request fails and returns
127
+ an error. To indicate that the request should never timeout, set it to `-1`.
119
128
  """
120
129
  if repository in SKIP_IN_PATH:
121
130
  raise ValueError("Empty value passed for parameter 'repository'")
@@ -143,8 +152,6 @@ class SnapshotClient(NamespacedClient):
143
152
  __query["master_timeout"] = master_timeout
144
153
  if pretty is not None:
145
154
  __query["pretty"] = pretty
146
- if timeout is not None:
147
- __query["timeout"] = timeout
148
155
  if not __body:
149
156
  if indices is not None:
150
157
  __body["indices"] = indices
@@ -161,6 +168,7 @@ class SnapshotClient(NamespacedClient):
161
168
 
162
169
  @_rewrite_parameters(
163
170
  body_fields=(
171
+ "expand_wildcards",
164
172
  "feature_states",
165
173
  "ignore_unavailable",
166
174
  "include_global_state",
@@ -175,6 +183,14 @@ class SnapshotClient(NamespacedClient):
175
183
  repository: str,
176
184
  snapshot: str,
177
185
  error_trace: t.Optional[bool] = None,
186
+ expand_wildcards: t.Optional[
187
+ t.Union[
188
+ t.Sequence[
189
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
190
+ ],
191
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
192
+ ]
193
+ ] = None,
178
194
  feature_states: t.Optional[t.Sequence[str]] = None,
179
195
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
180
196
  human: t.Optional[bool] = None,
@@ -195,15 +211,22 @@ class SnapshotClient(NamespacedClient):
195
211
  Take a snapshot of a cluster or of data streams and indices.</p>
196
212
 
197
213
 
198
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-snapshot-api.html>`_
214
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-create>`_
199
215
 
200
- :param repository: Repository for the snapshot.
201
- :param snapshot: Name of the snapshot. Must be unique in the repository.
202
- :param feature_states: Feature states to include in the snapshot. Each feature
216
+ :param repository: The name of the repository for the snapshot.
217
+ :param snapshot: The name of the snapshot. It supportes date math. It must be
218
+ unique in the repository.
219
+ :param expand_wildcards: Determines how wildcard patterns in the `indices` parameter
220
+ match data streams and indices. It supports comma-separated values such as
221
+ `open,hidden`.
222
+ :param feature_states: The feature states to include in the snapshot. Each feature
203
223
  state includes one or more system indices containing related data. You can
204
224
  view a list of eligible features using the get features API. If `include_global_state`
205
225
  is `true`, all current feature states are included by default. If `include_global_state`
206
- is `false`, no feature states are included by default.
226
+ is `false`, no feature states are included by default. Note that specifying
227
+ an empty array will result in the default behavior. To exclude all feature
228
+ states, regardless of the `include_global_state` value, specify an array
229
+ with only the value `none` (`["none"]`).
207
230
  :param ignore_unavailable: If `true`, the request ignores data streams and indices
208
231
  in `indices` that are missing or closed. If `false`, the request returns
209
232
  an error for any data stream or index that is missing or closed.
@@ -212,18 +235,24 @@ class SnapshotClient(NamespacedClient):
212
235
  composable index templates, legacy index templates, ingest pipelines, and
213
236
  ILM policies. It also includes data stored in system indices, such as Watches
214
237
  and task records (configurable via `feature_states`).
215
- :param indices: Data streams and indices to include in the snapshot. Supports
216
- multi-target syntax. Includes all data streams and indices by default.
217
- :param master_timeout: Period to wait for a connection to the master node. If
218
- no response is received before the timeout expires, the request fails and
219
- returns an error.
220
- :param metadata: Optional metadata for the snapshot. May have any contents. Must
221
- be less than 1024 bytes. This map is not automatically generated by Elasticsearch.
222
- :param partial: If `true`, allows restoring a partial snapshot of indices with
223
- unavailable shards. Only shards that were successfully included in the snapshot
224
- will be restored. All missing shards will be recreated as empty. If `false`,
225
- the entire restore operation will fail if one or more indices included in
226
- the snapshot do not have all primary shards available.
238
+ :param indices: A comma-separated list of data streams and indices to include
239
+ in the snapshot. It supports a multi-target syntax. The default is an empty
240
+ array (`[]`), which includes all regular data streams and regular indices.
241
+ To exclude all data streams and indices, use `-*`. You can't use this parameter
242
+ to include or exclude system indices or system data streams from a snapshot.
243
+ Use `feature_states` instead.
244
+ :param master_timeout: The period to wait for a connection to the master node.
245
+ If no response is received before the timeout expires, the request fails
246
+ and returns an error.
247
+ :param metadata: Arbitrary metadata to the snapshot, such as a record of who
248
+ took the snapshot, why it was taken, or any other useful data. It can have
249
+ any contents but it must be less than 1024 bytes. This information is not
250
+ automatically generated by Elasticsearch.
251
+ :param partial: If `true`, it enables you to restore a partial snapshot of indices
252
+ with unavailable shards. Only shards that were successfully included in the
253
+ snapshot will be restored. All missing shards will be recreated as empty.
254
+ If `false`, the entire restore operation will fail if one or more indices
255
+ included in the snapshot do not have all primary shards available.
227
256
  :param wait_for_completion: If `true`, the request returns a response when the
228
257
  snapshot is complete. If `false`, the request returns a response when the
229
258
  snapshot initializes.
@@ -252,6 +281,8 @@ class SnapshotClient(NamespacedClient):
252
281
  if wait_for_completion is not None:
253
282
  __query["wait_for_completion"] = wait_for_completion
254
283
  if not __body:
284
+ if expand_wildcards is not None:
285
+ __body["expand_wildcards"] = expand_wildcards
255
286
  if feature_states is not None:
256
287
  __body["feature_states"] = feature_states
257
288
  if ignore_unavailable is not None:
@@ -303,15 +334,26 @@ class SnapshotClient(NamespacedClient):
303
334
  IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
304
335
  To register a snapshot repository, the cluster's global metadata must be writeable.
305
336
  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>
337
+ <p>Several options for this API can be specified using a query parameter or a request body parameter.
338
+ If both parameters are specified, only the query parameter is used.</p>
306
339
 
307
340
 
308
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html>`_
341
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-create-repository>`_
309
342
 
310
- :param name: A repository name
343
+ :param name: The name of the snapshot repository to register or update.
311
344
  :param repository:
312
- :param master_timeout: Explicit operation timeout for connection to master node
313
- :param timeout: Explicit operation timeout
314
- :param verify: Whether to verify the repository after creation
345
+ :param master_timeout: The period to wait for the master node. If the master
346
+ node is not available before the timeout expires, the request fails and returns
347
+ an error. To indicate that the request should never timeout, set it to `-1`.
348
+ :param timeout: The period to wait for a response from all relevant nodes in
349
+ the cluster after updating the cluster metadata. If no response is received
350
+ before the timeout expires, the cluster metadata update still applies but
351
+ the response will indicate that it was not completely acknowledged. To indicate
352
+ that the request should never timeout, set it to `-1`.
353
+ :param verify: If `true`, the request verifies the repository is functional on
354
+ all master and data nodes in the cluster. If `false`, this verification is
355
+ skipped. You can also perform this verification with the verify snapshot
356
+ repository API.
315
357
  """
316
358
  if name in SKIP_IN_PATH:
317
359
  raise ValueError("Empty value passed for parameter 'name'")
@@ -368,11 +410,14 @@ class SnapshotClient(NamespacedClient):
368
410
  <p>Delete snapshots.</p>
369
411
 
370
412
 
371
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-api.html>`_
413
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-delete>`_
372
414
 
373
- :param repository: A repository name
374
- :param snapshot: A comma-separated list of snapshot names
375
- :param master_timeout: Explicit operation timeout for connection to master node
415
+ :param repository: The name of the repository to delete a snapshot from.
416
+ :param snapshot: A comma-separated list of snapshot names to delete. It also
417
+ accepts wildcards (`*`).
418
+ :param master_timeout: The period to wait for the master node. If the master
419
+ node is not available before the timeout expires, the request fails and returns
420
+ an error. To indicate that the request should never timeout, set it to `-1`.
376
421
  """
377
422
  if repository in SKIP_IN_PATH:
378
423
  raise ValueError("Empty value passed for parameter 'repository'")
@@ -424,12 +469,18 @@ class SnapshotClient(NamespacedClient):
424
469
  The snapshots themselves are left untouched and in place.</p>
425
470
 
426
471
 
427
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-repo-api.html>`_
472
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-delete-repository>`_
428
473
 
429
- :param name: Name of the snapshot repository to unregister. Wildcard (`*`) patterns
430
- are supported.
431
- :param master_timeout: Explicit operation timeout for connection to master node
432
- :param timeout: Explicit operation timeout
474
+ :param name: The ame of the snapshot repositories to unregister. Wildcard (`*`)
475
+ patterns are supported.
476
+ :param master_timeout: The period to wait for the master node. If the master
477
+ node is not available before the timeout expires, the request fails and returns
478
+ an error. To indicate that the request should never timeout, set it to `-1`.
479
+ :param timeout: The period to wait for a response from all relevant nodes in
480
+ the cluster after updating the cluster metadata. If no response is received
481
+ before the timeout expires, the cluster metadata update still applies but
482
+ the response will indicate that it was not completely acknowledged. To indicate
483
+ that the request should never timeout, set it to `-1`.
433
484
  """
434
485
  if name in SKIP_IN_PATH:
435
486
  raise ValueError("Empty value passed for parameter 'name'")
@@ -499,50 +550,64 @@ class SnapshotClient(NamespacedClient):
499
550
  .. raw:: html
500
551
 
501
552
  <p>Get snapshot information.</p>
502
-
503
-
504
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-api.html>`_
505
-
506
- :param repository: Comma-separated list of snapshot repository names used to
507
- limit the request. Wildcard (*) expressions are supported.
508
- :param snapshot: Comma-separated list of snapshot names to retrieve. Also accepts
509
- wildcards (*). - To get information about all snapshots in a registered repository,
510
- use a wildcard (*) or _all. - To get information about any snapshots that
511
- are currently running, use _current.
512
- :param after: Offset identifier to start pagination from as returned by the next
513
- field in the response body.
514
- :param from_sort_value: Value of the current sort column at which to start retrieval.
515
- Can either be a string snapshot- or repository name when sorting by snapshot
516
- or repository name, a millisecond time value or a number when sorting by
517
- index- or shard count.
518
- :param ignore_unavailable: If false, the request returns an error for any snapshots
553
+ <p>NOTE: The <code>after</code> parameter and <code>next</code> field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots.
554
+ It is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration.
555
+ Snapshots concurrently created may be seen during an iteration.</p>
556
+
557
+
558
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-get>`_
559
+
560
+ :param repository: A comma-separated list of snapshot repository names used to
561
+ limit the request. Wildcard (`*`) expressions are supported.
562
+ :param snapshot: A comma-separated list of snapshot names to retrieve Wildcards
563
+ (`*`) are supported. * To get information about all snapshots in a registered
564
+ repository, use a wildcard (`*`) or `_all`. * To get information about any
565
+ snapshots that are currently running, use `_current`.
566
+ :param after: An offset identifier to start pagination from as returned by the
567
+ next field in the response body.
568
+ :param from_sort_value: The value of the current sort column at which to start
569
+ retrieval. It can be a string `snapshot-` or a repository name when sorting
570
+ by snapshot or repository name. It can be a millisecond time value or a number
571
+ when sorting by `index-` or shard count.
572
+ :param ignore_unavailable: If `false`, the request returns an error for any snapshots
519
573
  that are unavailable.
520
- :param include_repository: If true, returns the repository name in each snapshot.
521
- :param index_details: If true, returns additional information about each index
522
- in the snapshot comprising the number of shards in the index, the total size
523
- of the index in bytes, and the maximum number of segments per shard in the
524
- index. Defaults to false, meaning that this information is omitted.
525
- :param index_names: If true, returns the name of each index in each snapshot.
526
- :param master_timeout: Period to wait for a connection to the master node. If
527
- no response is received before the timeout expires, the request fails and
528
- returns an error.
574
+ :param include_repository: If `true`, the response includes the repository name
575
+ in each snapshot.
576
+ :param index_details: If `true`, the response includes additional information
577
+ about each index in the snapshot comprising the number of shards in the index,
578
+ the total size of the index in bytes, and the maximum number of segments
579
+ per shard in the index. The default is `false`, meaning that this information
580
+ is omitted.
581
+ :param index_names: If `true`, the response includes the name of each index in
582
+ each snapshot.
583
+ :param master_timeout: The period to wait for a connection to the master node.
584
+ If no response is received before the timeout expires, the request fails
585
+ and returns an error.
529
586
  :param offset: Numeric offset to start pagination from based on the snapshots
530
587
  matching this request. Using a non-zero value for this parameter is mutually
531
588
  exclusive with using the after parameter. Defaults to 0.
532
- :param order: Sort order. Valid values are asc for ascending and desc for descending
533
- order. Defaults to asc, meaning ascending order.
534
- :param size: Maximum number of snapshots to return. Defaults to 0 which means
535
- return all that match the request without limit.
536
- :param slm_policy_filter: Filter snapshots by a comma-separated list of SLM policy
537
- names that snapshots belong to. Also accepts wildcards (*) and combinations
538
- of wildcards followed by exclude patterns starting with -. To include snapshots
539
- not created by an SLM policy you can use the special pattern _none that will
540
- match all snapshots without an SLM policy.
541
- :param sort: Allows setting a sort order for the result. Defaults to start_time,
542
- i.e. sorting by snapshot start time stamp.
543
- :param verbose: If true, returns additional information about each snapshot such
544
- as the version of Elasticsearch which took the snapshot, the start and end
545
- times of the snapshot, and the number of shards snapshotted.
589
+ :param order: The sort order. Valid values are `asc` for ascending and `desc`
590
+ for descending order. The default behavior is ascending order.
591
+ :param size: The maximum number of snapshots to return. The default is 0, which
592
+ means to return all that match the request without limit.
593
+ :param slm_policy_filter: Filter snapshots by a comma-separated list of snapshot
594
+ lifecycle management (SLM) policy names that snapshots belong to. You can
595
+ use wildcards (`*`) and combinations of wildcards followed by exclude patterns
596
+ starting with `-`. For example, the pattern `*,-policy-a-\\*` will return
597
+ all snapshots except for those that were created by an SLM policy with a
598
+ name starting with `policy-a-`. Note that the wildcard pattern `*` matches
599
+ all snapshots created by an SLM policy but not those snapshots that were
600
+ not created by an SLM policy. To include snapshots that were not created
601
+ by an SLM policy, you can use the special pattern `_none` that will match
602
+ all snapshots without an SLM policy.
603
+ :param sort: The sort order for the result. The default behavior is sorting by
604
+ snapshot start time stamp.
605
+ :param verbose: If `true`, returns additional information about each snapshot
606
+ such as the version of Elasticsearch which took the snapshot, the start and
607
+ end times of the snapshot, and the number of shards snapshotted. NOTE: The
608
+ parameters `size`, `order`, `after`, `from_sort_value`, `offset`, `slm_policy_filter`,
609
+ and `sort` are not supported when you set `verbose=false` and the sort order
610
+ for requests with `verbose=false` is undefined.
546
611
  """
547
612
  if repository in SKIP_IN_PATH:
548
613
  raise ValueError("Empty value passed for parameter 'repository'")
@@ -616,12 +681,18 @@ class SnapshotClient(NamespacedClient):
616
681
  <p>Get snapshot repository information.</p>
617
682
 
618
683
 
619
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-repo-api.html>`_
684
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-get-repository>`_
620
685
 
621
- :param name: A comma-separated list of repository names
622
- :param local: Return local information, do not retrieve the state from master
623
- node (default: false)
624
- :param master_timeout: Explicit operation timeout for connection to master node
686
+ :param name: A comma-separated list of snapshot repository names used to limit
687
+ the request. Wildcard (`*`) expressions are supported including combining
688
+ wildcards with exclude patterns starting with `-`. To get information about
689
+ all snapshot repositories registered in the cluster, omit this parameter
690
+ or use `*` or `_all`.
691
+ :param local: If `true`, the request gets information from the local node only.
692
+ If `false`, the request gets information from the master node.
693
+ :param master_timeout: The period to wait for the master node. If the master
694
+ node is not available before the timeout expires, the request fails and returns
695
+ an error. To indicate that the request should never timeout, set it to `-1`.
625
696
  """
626
697
  __path_parts: t.Dict[str, str]
627
698
  if name not in SKIP_IN_PATH:
@@ -754,7 +825,7 @@ class SnapshotClient(NamespacedClient):
754
825
  Some operations also verify the behavior on small blobs with sizes other than 8 bytes.</p>
755
826
 
756
827
 
757
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/repo-analysis-api.html>`_
828
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-repository-analyze>`_
758
829
 
759
830
  :param name: The name of the repository.
760
831
  :param blob_count: The total number of blobs to write to the repository during
@@ -879,21 +950,39 @@ class SnapshotClient(NamespacedClient):
879
950
  It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.</p>
880
951
  <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
952
  <p>NOTE: This API may not work correctly in a mixed-version cluster.</p>
953
+ <p>The default values for the parameters of this API are designed to limit the impact of the integrity verification on other activities in your cluster.
954
+ For instance, by default it will only use at most half of the <code>snapshot_meta</code> threads to verify the integrity of each snapshot, allowing other snapshot operations to use the other half of this thread pool.
955
+ If you modify these parameters to speed up the verification process, you risk disrupting other snapshot-related operations in your cluster.
956
+ For large repositories, consider setting up a separate single-node Elasticsearch cluster just for running the integrity verification API.</p>
957
+ <p>The response exposes implementation details of the analysis which may change from version to version.
958
+ The response body format is therefore not considered stable and may be different in newer versions.</p>
882
959
 
883
960
 
884
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-repo-integrity-api.html>`_
885
-
886
- :param name: A repository name
887
- :param blob_thread_pool_concurrency: Number of threads to use for reading blob
888
- contents
889
- :param index_snapshot_verification_concurrency: Number of snapshots to verify
890
- concurrently within each index
891
- :param index_verification_concurrency: Number of indices to verify concurrently
892
- :param max_bytes_per_sec: Rate limit for individual blob verification
893
- :param max_failed_shard_snapshots: Maximum permitted number of failed shard snapshots
894
- :param meta_thread_pool_concurrency: Number of threads to use for reading metadata
895
- :param snapshot_verification_concurrency: Number of snapshots to verify concurrently
896
- :param verify_blob_contents: Whether to verify the contents of individual blobs
961
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-repository-verify-integrity>`_
962
+
963
+ :param name: The name of the snapshot repository.
964
+ :param blob_thread_pool_concurrency: If `verify_blob_contents` is `true`, this
965
+ parameter specifies how many blobs to verify at once.
966
+ :param index_snapshot_verification_concurrency: The maximum number of index snapshots
967
+ to verify concurrently within each index verification.
968
+ :param index_verification_concurrency: The number of indices to verify concurrently.
969
+ The default behavior is to use the entire `snapshot_meta` thread pool.
970
+ :param max_bytes_per_sec: If `verify_blob_contents` is `true`, this parameter
971
+ specifies the maximum amount of data that Elasticsearch will read from the
972
+ repository every second.
973
+ :param max_failed_shard_snapshots: The number of shard snapshot failures to track
974
+ during integrity verification, in order to avoid excessive resource usage.
975
+ If your repository contains more than this number of shard snapshot failures,
976
+ the verification will fail.
977
+ :param meta_thread_pool_concurrency: The maximum number of snapshot metadata
978
+ operations to run concurrently. The default behavior is to use at most half
979
+ of the `snapshot_meta` thread pool at once.
980
+ :param snapshot_verification_concurrency: The number of snapshots to verify concurrently.
981
+ The default behavior is to use at most half of the `snapshot_meta` thread
982
+ pool at once.
983
+ :param verify_blob_contents: Indicates whether to verify the checksum of every
984
+ data blob in the repository. If this feature is enabled, Elasticsearch will
985
+ read the entire repository contents, which may be extremely slow and expensive.
897
986
  """
898
987
  if name in SKIP_IN_PATH:
899
988
  raise ValueError("Empty value passed for parameter 'name'")
@@ -991,23 +1080,66 @@ class SnapshotClient(NamespacedClient):
991
1080
  <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
1081
 
993
1082
 
994
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/restore-snapshot-api.html>`_
995
-
996
- :param repository: A repository name
997
- :param snapshot: A snapshot name
998
- :param feature_states:
999
- :param ignore_index_settings:
1000
- :param ignore_unavailable:
1001
- :param include_aliases:
1002
- :param include_global_state:
1003
- :param index_settings:
1004
- :param indices:
1005
- :param master_timeout: Explicit operation timeout for connection to master node
1006
- :param partial:
1007
- :param rename_pattern:
1008
- :param rename_replacement:
1009
- :param wait_for_completion: Should this request wait until the operation has
1010
- completed before returning
1083
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-restore>`_
1084
+
1085
+ :param repository: The name of the repository to restore a snapshot from.
1086
+ :param snapshot: The name of the snapshot to restore.
1087
+ :param feature_states: The feature states to restore. If `include_global_state`
1088
+ is `true`, the request restores all feature states in the snapshot by default.
1089
+ If `include_global_state` is `false`, the request restores no feature states
1090
+ by default. Note that specifying an empty array will result in the default
1091
+ behavior. To restore no feature states, regardless of the `include_global_state`
1092
+ value, specify an array containing only the value `none` (`["none"]`).
1093
+ :param ignore_index_settings: The index settings to not restore from the snapshot.
1094
+ You can't use this option to ignore `index.number_of_shards`. For data streams,
1095
+ this option applies only to restored backing indices. New backing indices
1096
+ are configured using the data stream's matching index template.
1097
+ :param ignore_unavailable: If `true`, the request ignores any index or data stream
1098
+ in indices that's missing from the snapshot. If `false`, the request returns
1099
+ an error for any missing index or data stream.
1100
+ :param include_aliases: If `true`, the request restores aliases for any restored
1101
+ data streams and indices. If `false`, the request doesn’t restore aliases.
1102
+ :param include_global_state: If `true`, restore the cluster state. The cluster
1103
+ state includes: * Persistent cluster settings * Index templates * Legacy
1104
+ index templates * Ingest pipelines * Index lifecycle management (ILM) policies
1105
+ * Stored scripts * For snapshots taken after 7.12.0, feature states If `include_global_state`
1106
+ is `true`, the restore operation merges the legacy index templates in your
1107
+ cluster with the templates contained in the snapshot, replacing any existing
1108
+ ones whose name matches one in the snapshot. It completely removes all persistent
1109
+ settings, non-legacy index templates, ingest pipelines, and ILM lifecycle
1110
+ policies that exist in your cluster and replaces them with the corresponding
1111
+ items from the snapshot. Use the `feature_states` parameter to configure
1112
+ how feature states are restored. If `include_global_state` is `true` and
1113
+ a snapshot was created without a global state then the restore request will
1114
+ fail.
1115
+ :param index_settings: Index settings to add or change in restored indices, including
1116
+ backing indices. You can't use this option to change `index.number_of_shards`.
1117
+ For data streams, this option applies only to restored backing indices. New
1118
+ backing indices are configured using the data stream's matching index template.
1119
+ :param indices: A comma-separated list of indices and data streams to restore.
1120
+ It supports a multi-target syntax. The default behavior is all regular indices
1121
+ and regular data streams in the snapshot. You can't use this parameter to
1122
+ restore system indices or system data streams. Use `feature_states` instead.
1123
+ :param master_timeout: The period to wait for the master node. If the master
1124
+ node is not available before the timeout expires, the request fails and returns
1125
+ an error. To indicate that the request should never timeout, set it to `-1`.
1126
+ :param partial: If `false`, the entire restore operation will fail if one or
1127
+ more indices included in the snapshot do not have all primary shards available.
1128
+ If true, it allows restoring a partial snapshot of indices with unavailable
1129
+ shards. Only shards that were successfully included in the snapshot will
1130
+ be restored. All missing shards will be recreated as empty.
1131
+ :param rename_pattern: A rename pattern to apply to restored data streams and
1132
+ indices. Data streams and indices matching the rename pattern will be renamed
1133
+ according to `rename_replacement`. The rename pattern is applied as defined
1134
+ by the regular expression that supports referencing the original text, according
1135
+ to the `appendReplacement` logic.
1136
+ :param rename_replacement: The rename replacement string that is used with the
1137
+ `rename_pattern`.
1138
+ :param wait_for_completion: If `true`, the request returns a response when the
1139
+ restore operation completes. The operation is complete when it finishes all
1140
+ attempts to recover primary shards for restored indices. This applies even
1141
+ if one or more of the recovery attempts fail. If `false`, the request returns
1142
+ a response when the restore operation initializes.
1011
1143
  """
1012
1144
  if repository in SKIP_IN_PATH:
1013
1145
  raise ValueError("Empty value passed for parameter 'repository'")
@@ -1085,9 +1217,12 @@ class SnapshotClient(NamespacedClient):
1085
1217
  .. raw:: html
1086
1218
 
1087
1219
  <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.
1220
+ Get a detailed description of the current state for each shard participating in the snapshot.</p>
1221
+ <p>Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots.
1090
1222
  If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.</p>
1223
+ <p>If you omit the <code>&lt;snapshot&gt;</code> request path parameter, the request retrieves information only for currently running snapshots.
1224
+ This usage is preferred.
1225
+ If needed, you can specify <code>&lt;repository&gt;</code> and <code>&lt;snapshot&gt;</code> to retrieve information for specific snapshots, even if they're not currently running.</p>
1091
1226
  <p>WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.
1092
1227
  The API requires a read from the repository for each shard in each snapshot.
1093
1228
  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>
@@ -1095,13 +1230,18 @@ class SnapshotClient(NamespacedClient):
1095
1230
  These requests can also tax machine resources and, when using cloud storage, incur high processing costs.</p>
1096
1231
 
1097
1232
 
1098
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-status-api.html>`_
1233
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-status>`_
1099
1234
 
1100
- :param repository: A repository name
1101
- :param snapshot: A comma-separated list of snapshot names
1102
- :param ignore_unavailable: Whether to ignore unavailable snapshots, defaults
1103
- to false which means a SnapshotMissingException is thrown
1104
- :param master_timeout: Explicit operation timeout for connection to master node
1235
+ :param repository: The snapshot repository name used to limit the request. It
1236
+ supports wildcards (`*`) if `<snapshot>` isn't specified.
1237
+ :param snapshot: A comma-separated list of snapshots to retrieve status for.
1238
+ The default is currently running snapshots. Wildcards (`*`) are not supported.
1239
+ :param ignore_unavailable: If `false`, the request returns an error for any snapshots
1240
+ that are unavailable. If `true`, the request ignores snapshots that are unavailable,
1241
+ such as those that are corrupted or temporarily cannot be returned.
1242
+ :param master_timeout: The period to wait for the master node. If the master
1243
+ node is not available before the timeout expires, the request fails and returns
1244
+ an error. To indicate that the request should never timeout, set it to `-1`.
1105
1245
  """
1106
1246
  __path_parts: t.Dict[str, str]
1107
1247
  if repository not in SKIP_IN_PATH and snapshot not in SKIP_IN_PATH:
@@ -1158,11 +1298,17 @@ class SnapshotClient(NamespacedClient):
1158
1298
  Check for common misconfigurations in a snapshot repository.</p>
1159
1299
 
1160
1300
 
1161
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-snapshot-repo-api.html>`_
1301
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-snapshot-verify-repository>`_
1162
1302
 
1163
- :param name: A repository name
1164
- :param master_timeout: Explicit operation timeout for connection to master node
1165
- :param timeout: Explicit operation timeout
1303
+ :param name: The name of the snapshot repository to verify.
1304
+ :param master_timeout: The period to wait for the master node. If the master
1305
+ node is not available before the timeout expires, the request fails and returns
1306
+ an error. To indicate that the request should never timeout, set it to `-1`.
1307
+ :param timeout: The period to wait for a response from all relevant nodes in
1308
+ the cluster after updating the cluster metadata. If no response is received
1309
+ before the timeout expires, the cluster metadata update still applies but
1310
+ the response will indicate that it was not completely acknowledged. To indicate
1311
+ that the request should never timeout, set it to `-1`.
1166
1312
  """
1167
1313
  if name in SKIP_IN_PATH:
1168
1314
  raise ValueError("Empty value passed for parameter 'name'")