elasticsearch 8.19.0__py3-none-any.whl → 8.19.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +12 -6
- elasticsearch/_async/client/cat.py +124 -10
- elasticsearch/_async/client/cluster.py +7 -2
- elasticsearch/_async/client/esql.py +16 -6
- elasticsearch/_async/client/indices.py +1 -1
- elasticsearch/_async/client/inference.py +112 -4
- elasticsearch/_async/client/snapshot.py +262 -112
- elasticsearch/_async/client/sql.py +1 -1
- elasticsearch/_async/client/transform.py +60 -0
- elasticsearch/_sync/client/__init__.py +12 -6
- elasticsearch/_sync/client/cat.py +124 -10
- elasticsearch/_sync/client/cluster.py +7 -2
- elasticsearch/_sync/client/esql.py +16 -6
- elasticsearch/_sync/client/indices.py +1 -1
- elasticsearch/_sync/client/inference.py +112 -4
- elasticsearch/_sync/client/snapshot.py +262 -112
- elasticsearch/_sync/client/sql.py +1 -1
- elasticsearch/_sync/client/transform.py +60 -0
- elasticsearch/_version.py +1 -1
- elasticsearch/dsl/_async/document.py +84 -0
- elasticsearch/dsl/_sync/document.py +84 -0
- elasticsearch/dsl/aggs.py +20 -0
- elasticsearch/dsl/document_base.py +43 -0
- elasticsearch/dsl/field.py +49 -10
- elasticsearch/dsl/response/aggs.py +1 -1
- elasticsearch/dsl/types.py +140 -11
- elasticsearch/dsl/utils.py +1 -1
- elasticsearch/esql/__init__.py +2 -1
- elasticsearch/esql/esql.py +85 -34
- elasticsearch/esql/functions.py +37 -25
- {elasticsearch-8.19.0.dist-info → elasticsearch-8.19.1.dist-info}/METADATA +1 -3
- {elasticsearch-8.19.0.dist-info → elasticsearch-8.19.1.dist-info}/RECORD +35 -35
- {elasticsearch-8.19.0.dist-info → elasticsearch-8.19.1.dist-info}/WHEEL +0 -0
- {elasticsearch-8.19.0.dist-info → elasticsearch-8.19.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.19.0.dist-info → elasticsearch-8.19.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -52,9 +52,16 @@ class SnapshotClient(NamespacedClient):
|
|
|
52
52
|
|
|
53
53
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clean-up-snapshot-repo-api.html>`_
|
|
54
54
|
|
|
55
|
-
:param name:
|
|
56
|
-
:param master_timeout:
|
|
57
|
-
|
|
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'")
|
|
@@ -109,11 +116,15 @@ class SnapshotClient(NamespacedClient):
|
|
|
109
116
|
|
|
110
117
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clone-snapshot-api.html>`_
|
|
111
118
|
|
|
112
|
-
:param repository:
|
|
113
|
-
|
|
114
|
-
:param
|
|
115
|
-
:param
|
|
116
|
-
:param
|
|
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`.
|
|
117
128
|
"""
|
|
118
129
|
if repository in SKIP_IN_PATH:
|
|
119
130
|
raise ValueError("Empty value passed for parameter 'repository'")
|
|
@@ -157,6 +168,7 @@ class SnapshotClient(NamespacedClient):
|
|
|
157
168
|
|
|
158
169
|
@_rewrite_parameters(
|
|
159
170
|
body_fields=(
|
|
171
|
+
"expand_wildcards",
|
|
160
172
|
"feature_states",
|
|
161
173
|
"ignore_unavailable",
|
|
162
174
|
"include_global_state",
|
|
@@ -171,6 +183,14 @@ class SnapshotClient(NamespacedClient):
|
|
|
171
183
|
repository: str,
|
|
172
184
|
snapshot: str,
|
|
173
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,
|
|
174
194
|
feature_states: t.Optional[t.Sequence[str]] = None,
|
|
175
195
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
176
196
|
human: t.Optional[bool] = None,
|
|
@@ -193,13 +213,20 @@ class SnapshotClient(NamespacedClient):
|
|
|
193
213
|
|
|
194
214
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-snapshot-api.html>`_
|
|
195
215
|
|
|
196
|
-
:param repository:
|
|
197
|
-
:param snapshot:
|
|
198
|
-
|
|
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
|
|
199
223
|
state includes one or more system indices containing related data. You can
|
|
200
224
|
view a list of eligible features using the get features API. If `include_global_state`
|
|
201
225
|
is `true`, all current feature states are included by default. If `include_global_state`
|
|
202
|
-
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"]`).
|
|
203
230
|
:param ignore_unavailable: If `true`, the request ignores data streams and indices
|
|
204
231
|
in `indices` that are missing or closed. If `false`, the request returns
|
|
205
232
|
an error for any data stream or index that is missing or closed.
|
|
@@ -208,18 +235,24 @@ class SnapshotClient(NamespacedClient):
|
|
|
208
235
|
composable index templates, legacy index templates, ingest pipelines, and
|
|
209
236
|
ILM policies. It also includes data stored in system indices, such as Watches
|
|
210
237
|
and task records (configurable via `feature_states`).
|
|
211
|
-
:param indices:
|
|
212
|
-
multi-target syntax.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
the
|
|
222
|
-
|
|
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.
|
|
223
256
|
:param wait_for_completion: If `true`, the request returns a response when the
|
|
224
257
|
snapshot is complete. If `false`, the request returns a response when the
|
|
225
258
|
snapshot initializes.
|
|
@@ -248,6 +281,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
248
281
|
if wait_for_completion is not None:
|
|
249
282
|
__query["wait_for_completion"] = wait_for_completion
|
|
250
283
|
if not __body:
|
|
284
|
+
if expand_wildcards is not None:
|
|
285
|
+
__body["expand_wildcards"] = expand_wildcards
|
|
251
286
|
if feature_states is not None:
|
|
252
287
|
__body["feature_states"] = feature_states
|
|
253
288
|
if ignore_unavailable is not None:
|
|
@@ -299,15 +334,26 @@ class SnapshotClient(NamespacedClient):
|
|
|
299
334
|
IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
|
|
300
335
|
To register a snapshot repository, the cluster's global metadata must be writeable.
|
|
301
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>
|
|
302
339
|
|
|
303
340
|
|
|
304
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/
|
|
341
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-snapshot-repo-api.html>`_
|
|
305
342
|
|
|
306
|
-
:param name:
|
|
343
|
+
:param name: The name of the snapshot repository to register or update.
|
|
307
344
|
:param repository:
|
|
308
|
-
:param master_timeout:
|
|
309
|
-
|
|
310
|
-
|
|
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.
|
|
311
357
|
"""
|
|
312
358
|
if name in SKIP_IN_PATH:
|
|
313
359
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -367,9 +413,12 @@ class SnapshotClient(NamespacedClient):
|
|
|
367
413
|
|
|
368
414
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-snapshot-api.html>`_
|
|
369
415
|
|
|
370
|
-
:param repository:
|
|
371
|
-
:param snapshot: A comma-separated list of snapshot names
|
|
372
|
-
|
|
416
|
+
:param repository: The name of the repository to delete a snapshot from.
|
|
417
|
+
:param snapshot: A comma-separated list of snapshot names to delete. It also
|
|
418
|
+
accepts wildcards (`*`).
|
|
419
|
+
:param master_timeout: The period to wait for the master node. If the master
|
|
420
|
+
node is not available before the timeout expires, the request fails and returns
|
|
421
|
+
an error. To indicate that the request should never timeout, set it to `-1`.
|
|
373
422
|
:param wait_for_completion: If `true`, the request returns a response when the
|
|
374
423
|
matching snapshots are all deleted. If `false`, the request returns a response
|
|
375
424
|
as soon as the deletes are scheduled.
|
|
@@ -428,10 +477,16 @@ class SnapshotClient(NamespacedClient):
|
|
|
428
477
|
|
|
429
478
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-snapshot-repo-api.html>`_
|
|
430
479
|
|
|
431
|
-
:param name:
|
|
432
|
-
are supported.
|
|
433
|
-
:param master_timeout:
|
|
434
|
-
|
|
480
|
+
:param name: The ame of the snapshot repositories to unregister. Wildcard (`*`)
|
|
481
|
+
patterns are supported.
|
|
482
|
+
:param master_timeout: The period to wait for the master node. If the master
|
|
483
|
+
node is not available before the timeout expires, the request fails and returns
|
|
484
|
+
an error. To indicate that the request should never timeout, set it to `-1`.
|
|
485
|
+
:param timeout: The period to wait for a response from all relevant nodes in
|
|
486
|
+
the cluster after updating the cluster metadata. If no response is received
|
|
487
|
+
before the timeout expires, the cluster metadata update still applies but
|
|
488
|
+
the response will indicate that it was not completely acknowledged. To indicate
|
|
489
|
+
that the request should never timeout, set it to `-1`.
|
|
435
490
|
"""
|
|
436
491
|
if name in SKIP_IN_PATH:
|
|
437
492
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -501,50 +556,64 @@ class SnapshotClient(NamespacedClient):
|
|
|
501
556
|
.. raw:: html
|
|
502
557
|
|
|
503
558
|
<p>Get snapshot information.</p>
|
|
559
|
+
<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.
|
|
560
|
+
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.
|
|
561
|
+
Snapshots concurrently created may be seen during an iteration.</p>
|
|
504
562
|
|
|
505
563
|
|
|
506
564
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-api.html>`_
|
|
507
565
|
|
|
508
|
-
:param repository:
|
|
509
|
-
limit the request. Wildcard (
|
|
510
|
-
:param snapshot:
|
|
511
|
-
|
|
512
|
-
use a wildcard (
|
|
513
|
-
are currently running, use _current
|
|
514
|
-
:param after:
|
|
515
|
-
field in the response body.
|
|
516
|
-
:param from_sort_value:
|
|
517
|
-
|
|
518
|
-
or repository name
|
|
519
|
-
index
|
|
520
|
-
:param ignore_unavailable: If false
|
|
566
|
+
:param repository: A comma-separated list of snapshot repository names used to
|
|
567
|
+
limit the request. Wildcard (`*`) expressions are supported.
|
|
568
|
+
:param snapshot: A comma-separated list of snapshot names to retrieve Wildcards
|
|
569
|
+
(`*`) are supported. * To get information about all snapshots in a registered
|
|
570
|
+
repository, use a wildcard (`*`) or `_all`. * To get information about any
|
|
571
|
+
snapshots that are currently running, use `_current`.
|
|
572
|
+
:param after: An offset identifier to start pagination from as returned by the
|
|
573
|
+
next field in the response body.
|
|
574
|
+
:param from_sort_value: The value of the current sort column at which to start
|
|
575
|
+
retrieval. It can be a string `snapshot-` or a repository name when sorting
|
|
576
|
+
by snapshot or repository name. It can be a millisecond time value or a number
|
|
577
|
+
when sorting by `index-` or shard count.
|
|
578
|
+
:param ignore_unavailable: If `false`, the request returns an error for any snapshots
|
|
521
579
|
that are unavailable.
|
|
522
|
-
:param include_repository: If true
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
index
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
580
|
+
:param include_repository: If `true`, the response includes the repository name
|
|
581
|
+
in each snapshot.
|
|
582
|
+
:param index_details: If `true`, the response includes additional information
|
|
583
|
+
about each index in the snapshot comprising the number of shards in the index,
|
|
584
|
+
the total size of the index in bytes, and the maximum number of segments
|
|
585
|
+
per shard in the index. The default is `false`, meaning that this information
|
|
586
|
+
is omitted.
|
|
587
|
+
:param index_names: If `true`, the response includes the name of each index in
|
|
588
|
+
each snapshot.
|
|
589
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
590
|
+
If no response is received before the timeout expires, the request fails
|
|
591
|
+
and returns an error.
|
|
531
592
|
:param offset: Numeric offset to start pagination from based on the snapshots
|
|
532
593
|
matching this request. Using a non-zero value for this parameter is mutually
|
|
533
594
|
exclusive with using the after parameter. Defaults to 0.
|
|
534
|
-
:param order:
|
|
535
|
-
order.
|
|
536
|
-
:param size:
|
|
537
|
-
return all that match the request without limit.
|
|
538
|
-
:param slm_policy_filter: Filter snapshots by a comma-separated list of
|
|
539
|
-
names that snapshots belong to.
|
|
540
|
-
of wildcards followed by exclude patterns
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
595
|
+
:param order: The sort order. Valid values are `asc` for ascending and `desc`
|
|
596
|
+
for descending order. The default behavior is ascending order.
|
|
597
|
+
:param size: The maximum number of snapshots to return. The default is 0, which
|
|
598
|
+
means to return all that match the request without limit.
|
|
599
|
+
:param slm_policy_filter: Filter snapshots by a comma-separated list of snapshot
|
|
600
|
+
lifecycle management (SLM) policy names that snapshots belong to. You can
|
|
601
|
+
use wildcards (`*`) and combinations of wildcards followed by exclude patterns
|
|
602
|
+
starting with `-`. For example, the pattern `*,-policy-a-\\*` will return
|
|
603
|
+
all snapshots except for those that were created by an SLM policy with a
|
|
604
|
+
name starting with `policy-a-`. Note that the wildcard pattern `*` matches
|
|
605
|
+
all snapshots created by an SLM policy but not those snapshots that were
|
|
606
|
+
not created by an SLM policy. To include snapshots that were not created
|
|
607
|
+
by an SLM policy, you can use the special pattern `_none` that will match
|
|
608
|
+
all snapshots without an SLM policy.
|
|
609
|
+
:param sort: The sort order for the result. The default behavior is sorting by
|
|
610
|
+
snapshot start time stamp.
|
|
611
|
+
:param verbose: If `true`, returns additional information about each snapshot
|
|
612
|
+
such as the version of Elasticsearch which took the snapshot, the start and
|
|
613
|
+
end times of the snapshot, and the number of shards snapshotted. NOTE: The
|
|
614
|
+
parameters `size`, `order`, `after`, `from_sort_value`, `offset`, `slm_policy_filter`,
|
|
615
|
+
and `sort` are not supported when you set `verbose=false` and the sort order
|
|
616
|
+
for requests with `verbose=false` is undefined.
|
|
548
617
|
"""
|
|
549
618
|
if repository in SKIP_IN_PATH:
|
|
550
619
|
raise ValueError("Empty value passed for parameter 'repository'")
|
|
@@ -620,10 +689,16 @@ class SnapshotClient(NamespacedClient):
|
|
|
620
689
|
|
|
621
690
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-repo-api.html>`_
|
|
622
691
|
|
|
623
|
-
:param name: A comma-separated list of repository names
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
692
|
+
:param name: A comma-separated list of snapshot repository names used to limit
|
|
693
|
+
the request. Wildcard (`*`) expressions are supported including combining
|
|
694
|
+
wildcards with exclude patterns starting with `-`. To get information about
|
|
695
|
+
all snapshot repositories registered in the cluster, omit this parameter
|
|
696
|
+
or use `*` or `_all`.
|
|
697
|
+
:param local: If `true`, the request gets information from the local node only.
|
|
698
|
+
If `false`, the request gets information from the master node.
|
|
699
|
+
:param master_timeout: The period to wait for the master node. If the master
|
|
700
|
+
node is not available before the timeout expires, the request fails and returns
|
|
701
|
+
an error. To indicate that the request should never timeout, set it to `-1`.
|
|
627
702
|
"""
|
|
628
703
|
__path_parts: t.Dict[str, str]
|
|
629
704
|
if name not in SKIP_IN_PATH:
|
|
@@ -881,21 +956,39 @@ class SnapshotClient(NamespacedClient):
|
|
|
881
956
|
It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.</p>
|
|
882
957
|
<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>
|
|
883
958
|
<p>NOTE: This API may not work correctly in a mixed-version cluster.</p>
|
|
959
|
+
<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.
|
|
960
|
+
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.
|
|
961
|
+
If you modify these parameters to speed up the verification process, you risk disrupting other snapshot-related operations in your cluster.
|
|
962
|
+
For large repositories, consider setting up a separate single-node Elasticsearch cluster just for running the integrity verification API.</p>
|
|
963
|
+
<p>The response exposes implementation details of the analysis which may change from version to version.
|
|
964
|
+
The response body format is therefore not considered stable and may be different in newer versions.</p>
|
|
884
965
|
|
|
885
966
|
|
|
886
967
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/verify-repo-integrity-api.html>`_
|
|
887
968
|
|
|
888
|
-
:param name:
|
|
889
|
-
:param blob_thread_pool_concurrency:
|
|
890
|
-
|
|
891
|
-
:param index_snapshot_verification_concurrency:
|
|
892
|
-
concurrently within each index
|
|
893
|
-
:param index_verification_concurrency:
|
|
894
|
-
|
|
895
|
-
:param
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
:param
|
|
969
|
+
:param name: The name of the snapshot repository.
|
|
970
|
+
:param blob_thread_pool_concurrency: If `verify_blob_contents` is `true`, this
|
|
971
|
+
parameter specifies how many blobs to verify at once.
|
|
972
|
+
:param index_snapshot_verification_concurrency: The maximum number of index snapshots
|
|
973
|
+
to verify concurrently within each index verification.
|
|
974
|
+
:param index_verification_concurrency: The number of indices to verify concurrently.
|
|
975
|
+
The default behavior is to use the entire `snapshot_meta` thread pool.
|
|
976
|
+
:param max_bytes_per_sec: If `verify_blob_contents` is `true`, this parameter
|
|
977
|
+
specifies the maximum amount of data that Elasticsearch will read from the
|
|
978
|
+
repository every second.
|
|
979
|
+
:param max_failed_shard_snapshots: The number of shard snapshot failures to track
|
|
980
|
+
during integrity verification, in order to avoid excessive resource usage.
|
|
981
|
+
If your repository contains more than this number of shard snapshot failures,
|
|
982
|
+
the verification will fail.
|
|
983
|
+
:param meta_thread_pool_concurrency: The maximum number of snapshot metadata
|
|
984
|
+
operations to run concurrently. The default behavior is to use at most half
|
|
985
|
+
of the `snapshot_meta` thread pool at once.
|
|
986
|
+
:param snapshot_verification_concurrency: The number of snapshots to verify concurrently.
|
|
987
|
+
The default behavior is to use at most half of the `snapshot_meta` thread
|
|
988
|
+
pool at once.
|
|
989
|
+
:param verify_blob_contents: Indicates whether to verify the checksum of every
|
|
990
|
+
data blob in the repository. If this feature is enabled, Elasticsearch will
|
|
991
|
+
read the entire repository contents, which may be extremely slow and expensive.
|
|
899
992
|
"""
|
|
900
993
|
if name in SKIP_IN_PATH:
|
|
901
994
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -995,21 +1088,64 @@ class SnapshotClient(NamespacedClient):
|
|
|
995
1088
|
|
|
996
1089
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/restore-snapshot-api.html>`_
|
|
997
1090
|
|
|
998
|
-
:param repository:
|
|
999
|
-
:param snapshot:
|
|
1000
|
-
:param feature_states:
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
:param
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
:param
|
|
1011
|
-
|
|
1012
|
-
|
|
1091
|
+
:param repository: The name of the repository to restore a snapshot from.
|
|
1092
|
+
:param snapshot: The name of the snapshot to restore.
|
|
1093
|
+
:param feature_states: The feature states to restore. If `include_global_state`
|
|
1094
|
+
is `true`, the request restores all feature states in the snapshot by default.
|
|
1095
|
+
If `include_global_state` is `false`, the request restores no feature states
|
|
1096
|
+
by default. Note that specifying an empty array will result in the default
|
|
1097
|
+
behavior. To restore no feature states, regardless of the `include_global_state`
|
|
1098
|
+
value, specify an array containing only the value `none` (`["none"]`).
|
|
1099
|
+
:param ignore_index_settings: The index settings to not restore from the snapshot.
|
|
1100
|
+
You can't use this option to ignore `index.number_of_shards`. For data streams,
|
|
1101
|
+
this option applies only to restored backing indices. New backing indices
|
|
1102
|
+
are configured using the data stream's matching index template.
|
|
1103
|
+
:param ignore_unavailable: If `true`, the request ignores any index or data stream
|
|
1104
|
+
in indices that's missing from the snapshot. If `false`, the request returns
|
|
1105
|
+
an error for any missing index or data stream.
|
|
1106
|
+
:param include_aliases: If `true`, the request restores aliases for any restored
|
|
1107
|
+
data streams and indices. If `false`, the request doesn’t restore aliases.
|
|
1108
|
+
:param include_global_state: If `true`, restore the cluster state. The cluster
|
|
1109
|
+
state includes: * Persistent cluster settings * Index templates * Legacy
|
|
1110
|
+
index templates * Ingest pipelines * Index lifecycle management (ILM) policies
|
|
1111
|
+
* Stored scripts * For snapshots taken after 7.12.0, feature states If `include_global_state`
|
|
1112
|
+
is `true`, the restore operation merges the legacy index templates in your
|
|
1113
|
+
cluster with the templates contained in the snapshot, replacing any existing
|
|
1114
|
+
ones whose name matches one in the snapshot. It completely removes all persistent
|
|
1115
|
+
settings, non-legacy index templates, ingest pipelines, and ILM lifecycle
|
|
1116
|
+
policies that exist in your cluster and replaces them with the corresponding
|
|
1117
|
+
items from the snapshot. Use the `feature_states` parameter to configure
|
|
1118
|
+
how feature states are restored. If `include_global_state` is `true` and
|
|
1119
|
+
a snapshot was created without a global state then the restore request will
|
|
1120
|
+
fail.
|
|
1121
|
+
:param index_settings: Index settings to add or change in restored indices, including
|
|
1122
|
+
backing indices. You can't use this option to change `index.number_of_shards`.
|
|
1123
|
+
For data streams, this option applies only to restored backing indices. New
|
|
1124
|
+
backing indices are configured using the data stream's matching index template.
|
|
1125
|
+
:param indices: A comma-separated list of indices and data streams to restore.
|
|
1126
|
+
It supports a multi-target syntax. The default behavior is all regular indices
|
|
1127
|
+
and regular data streams in the snapshot. You can't use this parameter to
|
|
1128
|
+
restore system indices or system data streams. Use `feature_states` instead.
|
|
1129
|
+
:param master_timeout: The period to wait for the master node. If the master
|
|
1130
|
+
node is not available before the timeout expires, the request fails and returns
|
|
1131
|
+
an error. To indicate that the request should never timeout, set it to `-1`.
|
|
1132
|
+
:param partial: If `false`, the entire restore operation will fail if one or
|
|
1133
|
+
more indices included in the snapshot do not have all primary shards available.
|
|
1134
|
+
If true, it allows restoring a partial snapshot of indices with unavailable
|
|
1135
|
+
shards. Only shards that were successfully included in the snapshot will
|
|
1136
|
+
be restored. All missing shards will be recreated as empty.
|
|
1137
|
+
:param rename_pattern: A rename pattern to apply to restored data streams and
|
|
1138
|
+
indices. Data streams and indices matching the rename pattern will be renamed
|
|
1139
|
+
according to `rename_replacement`. The rename pattern is applied as defined
|
|
1140
|
+
by the regular expression that supports referencing the original text, according
|
|
1141
|
+
to the `appendReplacement` logic.
|
|
1142
|
+
:param rename_replacement: The rename replacement string that is used with the
|
|
1143
|
+
`rename_pattern`.
|
|
1144
|
+
:param wait_for_completion: If `true`, the request returns a response when the
|
|
1145
|
+
restore operation completes. The operation is complete when it finishes all
|
|
1146
|
+
attempts to recover primary shards for restored indices. This applies even
|
|
1147
|
+
if one or more of the recovery attempts fail. If `false`, the request returns
|
|
1148
|
+
a response when the restore operation initializes.
|
|
1013
1149
|
"""
|
|
1014
1150
|
if repository in SKIP_IN_PATH:
|
|
1015
1151
|
raise ValueError("Empty value passed for parameter 'repository'")
|
|
@@ -1087,9 +1223,12 @@ class SnapshotClient(NamespacedClient):
|
|
|
1087
1223
|
.. raw:: html
|
|
1088
1224
|
|
|
1089
1225
|
<p>Get the snapshot status.
|
|
1090
|
-
Get a detailed description of the current state for each shard participating in the snapshot
|
|
1091
|
-
Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots.
|
|
1226
|
+
Get a detailed description of the current state for each shard participating in the snapshot.</p>
|
|
1227
|
+
<p>Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots.
|
|
1092
1228
|
If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.</p>
|
|
1229
|
+
<p>If you omit the <code><snapshot></code> request path parameter, the request retrieves information only for currently running snapshots.
|
|
1230
|
+
This usage is preferred.
|
|
1231
|
+
If needed, you can specify <code><repository></code> and <code><snapshot></code> to retrieve information for specific snapshots, even if they're not currently running.</p>
|
|
1093
1232
|
<p>WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive.
|
|
1094
1233
|
The API requires a read from the repository for each shard in each snapshot.
|
|
1095
1234
|
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>
|
|
@@ -1099,11 +1238,16 @@ class SnapshotClient(NamespacedClient):
|
|
|
1099
1238
|
|
|
1100
1239
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-status-api.html>`_
|
|
1101
1240
|
|
|
1102
|
-
:param repository:
|
|
1103
|
-
|
|
1104
|
-
:param
|
|
1105
|
-
|
|
1106
|
-
:param
|
|
1241
|
+
:param repository: The snapshot repository name used to limit the request. It
|
|
1242
|
+
supports wildcards (`*`) if `<snapshot>` isn't specified.
|
|
1243
|
+
:param snapshot: A comma-separated list of snapshots to retrieve status for.
|
|
1244
|
+
The default is currently running snapshots. Wildcards (`*`) are not supported.
|
|
1245
|
+
:param ignore_unavailable: If `false`, the request returns an error for any snapshots
|
|
1246
|
+
that are unavailable. If `true`, the request ignores snapshots that are unavailable,
|
|
1247
|
+
such as those that are corrupted or temporarily cannot be returned.
|
|
1248
|
+
:param master_timeout: The period to wait for the master node. If the master
|
|
1249
|
+
node is not available before the timeout expires, the request fails and returns
|
|
1250
|
+
an error. To indicate that the request should never timeout, set it to `-1`.
|
|
1107
1251
|
"""
|
|
1108
1252
|
__path_parts: t.Dict[str, str]
|
|
1109
1253
|
if repository not in SKIP_IN_PATH and snapshot not in SKIP_IN_PATH:
|
|
@@ -1162,9 +1306,15 @@ class SnapshotClient(NamespacedClient):
|
|
|
1162
1306
|
|
|
1163
1307
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/verify-snapshot-repo-api.html>`_
|
|
1164
1308
|
|
|
1165
|
-
:param name:
|
|
1166
|
-
:param master_timeout:
|
|
1167
|
-
|
|
1309
|
+
:param name: The name of the snapshot repository to verify.
|
|
1310
|
+
:param master_timeout: The period to wait for the master node. If the master
|
|
1311
|
+
node is not available before the timeout expires, the request fails and returns
|
|
1312
|
+
an error. To indicate that the request should never timeout, set it to `-1`.
|
|
1313
|
+
:param timeout: The period to wait for a response from all relevant nodes in
|
|
1314
|
+
the cluster after updating the cluster metadata. If no response is received
|
|
1315
|
+
before the timeout expires, the cluster metadata update still applies but
|
|
1316
|
+
the response will indicate that it was not completely acknowledged. To indicate
|
|
1317
|
+
that the request should never timeout, set it to `-1`.
|
|
1168
1318
|
"""
|
|
1169
1319
|
if name in SKIP_IN_PATH:
|
|
1170
1320
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -283,7 +283,7 @@ class SqlClient(NamespacedClient):
|
|
|
283
283
|
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
284
284
|
keep_on_completion: t.Optional[bool] = None,
|
|
285
285
|
page_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
286
|
-
params: t.Optional[t.
|
|
286
|
+
params: t.Optional[t.Sequence[t.Any]] = None,
|
|
287
287
|
pretty: t.Optional[bool] = None,
|
|
288
288
|
query: t.Optional[str] = None,
|
|
289
289
|
request_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
@@ -602,6 +602,66 @@ class TransformClient(NamespacedClient):
|
|
|
602
602
|
path_parts=__path_parts,
|
|
603
603
|
)
|
|
604
604
|
|
|
605
|
+
@_rewrite_parameters()
|
|
606
|
+
async def set_upgrade_mode(
|
|
607
|
+
self,
|
|
608
|
+
*,
|
|
609
|
+
enabled: t.Optional[bool] = None,
|
|
610
|
+
error_trace: t.Optional[bool] = None,
|
|
611
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
612
|
+
human: t.Optional[bool] = None,
|
|
613
|
+
pretty: t.Optional[bool] = None,
|
|
614
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
615
|
+
) -> ObjectApiResponse[t.Any]:
|
|
616
|
+
"""
|
|
617
|
+
.. raw:: html
|
|
618
|
+
|
|
619
|
+
<p>Set upgrade_mode for transform indices.
|
|
620
|
+
Sets a cluster wide upgrade_mode setting that prepares transform
|
|
621
|
+
indices for an upgrade.
|
|
622
|
+
When upgrading your cluster, in some circumstances you must restart your
|
|
623
|
+
nodes and reindex your transform indices. In those circumstances,
|
|
624
|
+
there must be no transforms running. You can close the transforms,
|
|
625
|
+
do the upgrade, then open all the transforms again. Alternatively,
|
|
626
|
+
you can use this API to temporarily halt tasks associated with the transforms
|
|
627
|
+
and prevent new transforms from opening. You can also use this API
|
|
628
|
+
during upgrades that do not require you to reindex your transform
|
|
629
|
+
indices, though stopping transforms is not a requirement in that case.
|
|
630
|
+
You can see the current value for the upgrade_mode setting by using the get
|
|
631
|
+
transform info API.</p>
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode>`_
|
|
635
|
+
|
|
636
|
+
:param enabled: When `true`, it enables `upgrade_mode` which temporarily halts
|
|
637
|
+
all transform tasks and prohibits new transform tasks from starting.
|
|
638
|
+
:param timeout: The time to wait for the request to be completed.
|
|
639
|
+
"""
|
|
640
|
+
__path_parts: t.Dict[str, str] = {}
|
|
641
|
+
__path = "/_transform/set_upgrade_mode"
|
|
642
|
+
__query: t.Dict[str, t.Any] = {}
|
|
643
|
+
if enabled is not None:
|
|
644
|
+
__query["enabled"] = enabled
|
|
645
|
+
if error_trace is not None:
|
|
646
|
+
__query["error_trace"] = error_trace
|
|
647
|
+
if filter_path is not None:
|
|
648
|
+
__query["filter_path"] = filter_path
|
|
649
|
+
if human is not None:
|
|
650
|
+
__query["human"] = human
|
|
651
|
+
if pretty is not None:
|
|
652
|
+
__query["pretty"] = pretty
|
|
653
|
+
if timeout is not None:
|
|
654
|
+
__query["timeout"] = timeout
|
|
655
|
+
__headers = {"accept": "application/json"}
|
|
656
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
657
|
+
"POST",
|
|
658
|
+
__path,
|
|
659
|
+
params=__query,
|
|
660
|
+
headers=__headers,
|
|
661
|
+
endpoint_id="transform.set_upgrade_mode",
|
|
662
|
+
path_parts=__path_parts,
|
|
663
|
+
)
|
|
664
|
+
|
|
605
665
|
@_rewrite_parameters(
|
|
606
666
|
parameter_aliases={"from": "from_"},
|
|
607
667
|
)
|