elasticsearch 8.16.0__py3-none-any.whl → 8.17.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 +234 -96
- elasticsearch/_async/client/async_search.py +12 -22
- elasticsearch/_async/client/autoscaling.py +39 -4
- elasticsearch/_async/client/cat.py +90 -221
- elasticsearch/_async/client/ccr.py +85 -35
- elasticsearch/_async/client/cluster.py +160 -68
- elasticsearch/_async/client/connector.py +362 -25
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +6 -6
- elasticsearch/_async/client/eql.py +13 -11
- elasticsearch/_async/client/esql.py +3 -2
- elasticsearch/_async/client/features.py +27 -5
- elasticsearch/_async/client/fleet.py +1 -1
- elasticsearch/_async/client/graph.py +9 -3
- elasticsearch/_async/client/ilm.py +74 -39
- elasticsearch/_async/client/indices.py +633 -152
- elasticsearch/_async/client/inference.py +99 -16
- elasticsearch/_async/client/ingest.py +201 -23
- elasticsearch/_async/client/license.py +38 -22
- elasticsearch/_async/client/logstash.py +12 -9
- elasticsearch/_async/client/migration.py +17 -8
- elasticsearch/_async/client/ml.py +137 -79
- elasticsearch/_async/client/monitoring.py +3 -2
- elasticsearch/_async/client/nodes.py +37 -23
- elasticsearch/_async/client/query_rules.py +47 -25
- elasticsearch/_async/client/rollup.py +96 -21
- elasticsearch/_async/client/search_application.py +138 -9
- elasticsearch/_async/client/searchable_snapshots.py +33 -24
- elasticsearch/_async/client/security.py +751 -123
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +147 -28
- elasticsearch/_async/client/snapshot.py +309 -25
- elasticsearch/_async/client/sql.py +79 -58
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +52 -29
- elasticsearch/_async/client/tasks.py +71 -31
- elasticsearch/_async/client/text_structure.py +468 -48
- elasticsearch/_async/client/transform.py +21 -14
- elasticsearch/_async/client/watcher.py +226 -60
- elasticsearch/_async/client/xpack.py +13 -8
- elasticsearch/_sync/client/__init__.py +234 -96
- elasticsearch/_sync/client/async_search.py +12 -22
- elasticsearch/_sync/client/autoscaling.py +39 -4
- elasticsearch/_sync/client/cat.py +90 -221
- elasticsearch/_sync/client/ccr.py +85 -35
- elasticsearch/_sync/client/cluster.py +160 -68
- elasticsearch/_sync/client/connector.py +362 -25
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +6 -6
- elasticsearch/_sync/client/eql.py +13 -11
- elasticsearch/_sync/client/esql.py +3 -2
- elasticsearch/_sync/client/features.py +27 -5
- elasticsearch/_sync/client/fleet.py +1 -1
- elasticsearch/_sync/client/graph.py +9 -3
- elasticsearch/_sync/client/ilm.py +74 -39
- elasticsearch/_sync/client/indices.py +633 -152
- elasticsearch/_sync/client/inference.py +99 -16
- elasticsearch/_sync/client/ingest.py +201 -23
- elasticsearch/_sync/client/license.py +38 -22
- elasticsearch/_sync/client/logstash.py +12 -9
- elasticsearch/_sync/client/migration.py +17 -8
- elasticsearch/_sync/client/ml.py +137 -79
- elasticsearch/_sync/client/monitoring.py +3 -2
- elasticsearch/_sync/client/nodes.py +37 -23
- elasticsearch/_sync/client/query_rules.py +47 -25
- elasticsearch/_sync/client/rollup.py +96 -21
- elasticsearch/_sync/client/search_application.py +138 -9
- elasticsearch/_sync/client/searchable_snapshots.py +33 -24
- elasticsearch/_sync/client/security.py +751 -123
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +147 -28
- elasticsearch/_sync/client/snapshot.py +309 -25
- elasticsearch/_sync/client/sql.py +79 -58
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +52 -29
- elasticsearch/_sync/client/tasks.py +71 -31
- elasticsearch/_sync/client/text_structure.py +468 -48
- elasticsearch/_sync/client/transform.py +21 -14
- elasticsearch/_sync/client/watcher.py +226 -60
- elasticsearch/_sync/client/xpack.py +13 -8
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.16.0.dist-info/RECORD +0 -117
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -36,9 +36,10 @@ class CcrClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
39
|
+
Delete auto-follow patterns. Delete a collection of cross-cluster replication
|
|
40
|
+
auto-follow patterns.
|
|
40
41
|
|
|
41
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
42
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-delete-auto-follow-pattern.html>`_
|
|
42
43
|
|
|
43
44
|
:param name: The name of the auto follow pattern.
|
|
44
45
|
"""
|
|
@@ -107,9 +108,12 @@ class CcrClient(NamespacedClient):
|
|
|
107
108
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
108
109
|
) -> ObjectApiResponse[t.Any]:
|
|
109
110
|
"""
|
|
110
|
-
|
|
111
|
+
Create a follower. Create a cross-cluster replication follower index that follows
|
|
112
|
+
a specific leader index. When the API returns, the follower index exists and
|
|
113
|
+
cross-cluster replication starts replicating operations from the leader index
|
|
114
|
+
to the follower index.
|
|
111
115
|
|
|
112
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
116
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-follow.html>`_
|
|
113
117
|
|
|
114
118
|
:param index: The name of the follower index
|
|
115
119
|
:param leader_index:
|
|
@@ -198,10 +202,12 @@ class CcrClient(NamespacedClient):
|
|
|
198
202
|
pretty: t.Optional[bool] = None,
|
|
199
203
|
) -> ObjectApiResponse[t.Any]:
|
|
200
204
|
"""
|
|
201
|
-
|
|
202
|
-
|
|
205
|
+
Get follower information. Get information about all cross-cluster replication
|
|
206
|
+
follower indices. For example, the results include follower index names, leader
|
|
207
|
+
index names, replication options, and whether the follower indices are active
|
|
208
|
+
or paused.
|
|
203
209
|
|
|
204
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
210
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-info.html>`_
|
|
205
211
|
|
|
206
212
|
:param index: A comma-separated list of index patterns; use `_all` to perform
|
|
207
213
|
the operation on all indices
|
|
@@ -240,10 +246,11 @@ class CcrClient(NamespacedClient):
|
|
|
240
246
|
pretty: t.Optional[bool] = None,
|
|
241
247
|
) -> ObjectApiResponse[t.Any]:
|
|
242
248
|
"""
|
|
243
|
-
|
|
244
|
-
associated with each shard for
|
|
249
|
+
Get follower stats. Get cross-cluster replication follower stats. The API returns
|
|
250
|
+
shard-level stats about the "following tasks" associated with each shard for
|
|
251
|
+
the specified indices.
|
|
245
252
|
|
|
246
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
253
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-follow-stats.html>`_
|
|
247
254
|
|
|
248
255
|
:param index: A comma-separated list of index patterns; use `_all` to perform
|
|
249
256
|
the operation on all indices
|
|
@@ -294,9 +301,25 @@ class CcrClient(NamespacedClient):
|
|
|
294
301
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
295
302
|
) -> ObjectApiResponse[t.Any]:
|
|
296
303
|
"""
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
304
|
+
Forget a follower. Remove the cross-cluster replication follower retention leases
|
|
305
|
+
from the leader. A following index takes out retention leases on its leader index.
|
|
306
|
+
These leases are used to increase the likelihood that the shards of the leader
|
|
307
|
+
index retain the history of operations that the shards of the following index
|
|
308
|
+
need to run replication. When a follower index is converted to a regular index
|
|
309
|
+
by the unfollow API (either by directly calling the API or by index lifecycle
|
|
310
|
+
management tasks), these leases are removed. However, removal of the leases can
|
|
311
|
+
fail, for example when the remote cluster containing the leader index is unavailable.
|
|
312
|
+
While the leases will eventually expire on their own, their extended existence
|
|
313
|
+
can cause the leader index to hold more history than necessary and prevent index
|
|
314
|
+
lifecycle management from performing some operations on the leader index. This
|
|
315
|
+
API exists to enable manually removing the leases when the unfollow API is unable
|
|
316
|
+
to do so. NOTE: This API does not stop replication by a following index. If you
|
|
317
|
+
use this API with a follower index that is still actively following, the following
|
|
318
|
+
index will add back retention leases on the leader. The only purpose of this
|
|
319
|
+
API is to handle the case of failure to remove the following retention leases
|
|
320
|
+
after the unfollow API is invoked.
|
|
321
|
+
|
|
322
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-forget-follower.html>`_
|
|
300
323
|
|
|
301
324
|
:param index: the name of the leader index for which specified follower retention
|
|
302
325
|
leases should be removed
|
|
@@ -350,10 +373,9 @@ class CcrClient(NamespacedClient):
|
|
|
350
373
|
pretty: t.Optional[bool] = None,
|
|
351
374
|
) -> ObjectApiResponse[t.Any]:
|
|
352
375
|
"""
|
|
353
|
-
|
|
354
|
-
collection.
|
|
376
|
+
Get auto-follow patterns. Get cross-cluster replication auto-follow patterns.
|
|
355
377
|
|
|
356
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
378
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-auto-follow-pattern.html>`_
|
|
357
379
|
|
|
358
380
|
:param name: Specifies the auto-follow pattern collection that you want to retrieve.
|
|
359
381
|
If you do not specify a name, the API returns information for all collections.
|
|
@@ -395,9 +417,16 @@ class CcrClient(NamespacedClient):
|
|
|
395
417
|
pretty: t.Optional[bool] = None,
|
|
396
418
|
) -> ObjectApiResponse[t.Any]:
|
|
397
419
|
"""
|
|
398
|
-
|
|
420
|
+
Pause an auto-follow pattern. Pause a cross-cluster replication auto-follow pattern.
|
|
421
|
+
When the API returns, the auto-follow pattern is inactive. New indices that are
|
|
422
|
+
created on the remote cluster and match the auto-follow patterns are ignored.
|
|
423
|
+
You can resume auto-following with the resume auto-follow pattern API. When it
|
|
424
|
+
resumes, the auto-follow pattern is active again and automatically configures
|
|
425
|
+
follower indices for newly created indices on the remote cluster that match its
|
|
426
|
+
patterns. Remote indices that were created while the pattern was paused will
|
|
427
|
+
also be followed, unless they have been deleted or closed in the interim.
|
|
399
428
|
|
|
400
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
429
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-pause-auto-follow-pattern.html>`_
|
|
401
430
|
|
|
402
431
|
:param name: The name of the auto follow pattern that should pause discovering
|
|
403
432
|
new indices to follow.
|
|
@@ -436,10 +465,12 @@ class CcrClient(NamespacedClient):
|
|
|
436
465
|
pretty: t.Optional[bool] = None,
|
|
437
466
|
) -> ObjectApiResponse[t.Any]:
|
|
438
467
|
"""
|
|
439
|
-
|
|
440
|
-
from the leader index.
|
|
468
|
+
Pause a follower. Pause a cross-cluster replication follower index. The follower
|
|
469
|
+
index will not fetch any additional operations from the leader index. You can
|
|
470
|
+
resume following with the resume follower API. You can pause and resume a follower
|
|
471
|
+
index to change the configuration of the following task.
|
|
441
472
|
|
|
442
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
473
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-pause-follow.html>`_
|
|
443
474
|
|
|
444
475
|
:param index: The name of the follower index that should pause following its
|
|
445
476
|
leader index.
|
|
@@ -512,11 +543,16 @@ class CcrClient(NamespacedClient):
|
|
|
512
543
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
513
544
|
) -> ObjectApiResponse[t.Any]:
|
|
514
545
|
"""
|
|
515
|
-
|
|
516
|
-
cluster. Newly created indices on the remote
|
|
517
|
-
patterns
|
|
546
|
+
Create or update auto-follow patterns. Create a collection of cross-cluster replication
|
|
547
|
+
auto-follow patterns for a remote cluster. Newly created indices on the remote
|
|
548
|
+
cluster that match any of the patterns are automatically configured as follower
|
|
549
|
+
indices. Indices on the remote cluster that were created before the auto-follow
|
|
550
|
+
pattern was created will not be auto-followed even if they match the pattern.
|
|
551
|
+
This API can also be used to update auto-follow patterns. NOTE: Follower indices
|
|
552
|
+
that were configured automatically before updating an auto-follow pattern will
|
|
553
|
+
remain unchanged even if they do not match against the new patterns.
|
|
518
554
|
|
|
519
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
555
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-put-auto-follow-pattern.html>`_
|
|
520
556
|
|
|
521
557
|
:param name: The name of the collection of auto-follow patterns.
|
|
522
558
|
:param remote_cluster: The remote cluster containing the leader indices to match
|
|
@@ -638,9 +674,13 @@ class CcrClient(NamespacedClient):
|
|
|
638
674
|
pretty: t.Optional[bool] = None,
|
|
639
675
|
) -> ObjectApiResponse[t.Any]:
|
|
640
676
|
"""
|
|
641
|
-
|
|
677
|
+
Resume an auto-follow pattern. Resume a cross-cluster replication auto-follow
|
|
678
|
+
pattern that was paused. The auto-follow pattern will resume configuring following
|
|
679
|
+
indices for newly created indices that match its patterns on the remote cluster.
|
|
680
|
+
Remote indices created while the pattern was paused will also be followed unless
|
|
681
|
+
they have been deleted or closed in the interim.
|
|
642
682
|
|
|
643
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
683
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-resume-auto-follow-pattern.html>`_
|
|
644
684
|
|
|
645
685
|
:param name: The name of the auto follow pattern to resume discovering new indices
|
|
646
686
|
to follow.
|
|
@@ -703,9 +743,13 @@ class CcrClient(NamespacedClient):
|
|
|
703
743
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
704
744
|
) -> ObjectApiResponse[t.Any]:
|
|
705
745
|
"""
|
|
706
|
-
|
|
746
|
+
Resume a follower. Resume a cross-cluster replication follower index that was
|
|
747
|
+
paused. The follower index could have been paused with the pause follower API.
|
|
748
|
+
Alternatively it could be paused due to replication that cannot be retried due
|
|
749
|
+
to failures during following tasks. When this API returns, the follower index
|
|
750
|
+
will resume fetching operations from the leader index.
|
|
707
751
|
|
|
708
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
752
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-resume-follow.html>`_
|
|
709
753
|
|
|
710
754
|
:param index: The name of the follow index to resume following.
|
|
711
755
|
:param max_outstanding_read_requests:
|
|
@@ -785,9 +829,10 @@ class CcrClient(NamespacedClient):
|
|
|
785
829
|
pretty: t.Optional[bool] = None,
|
|
786
830
|
) -> ObjectApiResponse[t.Any]:
|
|
787
831
|
"""
|
|
788
|
-
|
|
832
|
+
Get cross-cluster replication stats. This API returns stats about auto-following
|
|
833
|
+
and the same shard-level stats as the get follower stats API.
|
|
789
834
|
|
|
790
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
835
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-get-stats.html>`_
|
|
791
836
|
"""
|
|
792
837
|
__path_parts: t.Dict[str, str] = {}
|
|
793
838
|
__path = "/_ccr/stats"
|
|
@@ -821,10 +866,15 @@ class CcrClient(NamespacedClient):
|
|
|
821
866
|
pretty: t.Optional[bool] = None,
|
|
822
867
|
) -> ObjectApiResponse[t.Any]:
|
|
823
868
|
"""
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
869
|
+
Unfollow an index. Convert a cross-cluster replication follower index to a regular
|
|
870
|
+
index. The API stops the following task associated with a follower index and
|
|
871
|
+
removes index metadata and settings associated with cross-cluster replication.
|
|
872
|
+
The follower index must be paused and closed before you call the unfollow API.
|
|
873
|
+
NOTE: Currently cross-cluster replication does not support converting an existing
|
|
874
|
+
regular index to a follower index. Converting a follower index to a regular index
|
|
875
|
+
is an irreversible operation.
|
|
876
|
+
|
|
877
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-unfollow.html>`_
|
|
828
878
|
|
|
829
879
|
:param index: The name of the follower index that should be turned into a regular
|
|
830
880
|
index.
|
|
@@ -44,9 +44,15 @@ class ClusterClient(NamespacedClient):
|
|
|
44
44
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
45
45
|
) -> ObjectApiResponse[t.Any]:
|
|
46
46
|
"""
|
|
47
|
-
|
|
47
|
+
Explain the shard allocations. Get explanations for shard allocations in the
|
|
48
|
+
cluster. For unassigned shards, it provides an explanation for why the shard
|
|
49
|
+
is unassigned. For assigned shards, it provides an explanation for why the shard
|
|
50
|
+
is remaining on its current node and has not moved or rebalanced to another node.
|
|
51
|
+
This API can be very useful when attempting to diagnose why a shard is unassigned
|
|
52
|
+
or why a shard continues to remain on its current node when you might expect
|
|
53
|
+
otherwise.
|
|
48
54
|
|
|
49
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
55
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-allocation-explain.html>`_
|
|
50
56
|
|
|
51
57
|
:param current_node: Specifies the node ID or the name of the node to only explain
|
|
52
58
|
a shard that is currently located on the specified node.
|
|
@@ -113,11 +119,10 @@ class ClusterClient(NamespacedClient):
|
|
|
113
119
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
114
120
|
) -> ObjectApiResponse[t.Any]:
|
|
115
121
|
"""
|
|
116
|
-
Delete component templates.
|
|
117
|
-
|
|
118
|
-
settings, and aliases.
|
|
122
|
+
Delete component templates. Component templates are building blocks for constructing
|
|
123
|
+
index templates that specify index mappings, settings, and aliases.
|
|
119
124
|
|
|
120
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
125
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
|
|
121
126
|
|
|
122
127
|
:param name: Comma-separated list or wildcard expression of component template
|
|
123
128
|
names used to limit the request.
|
|
@@ -165,9 +170,10 @@ class ClusterClient(NamespacedClient):
|
|
|
165
170
|
wait_for_removal: t.Optional[bool] = None,
|
|
166
171
|
) -> ObjectApiResponse[t.Any]:
|
|
167
172
|
"""
|
|
168
|
-
|
|
173
|
+
Clear cluster voting config exclusions. Remove master-eligible nodes from the
|
|
174
|
+
voting configuration exclusion list.
|
|
169
175
|
|
|
170
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
176
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/voting-config-exclusions.html>`_
|
|
171
177
|
|
|
172
178
|
:param wait_for_removal: Specifies whether to wait for all excluded nodes to
|
|
173
179
|
be removed from the cluster before clearing the voting configuration exclusions
|
|
@@ -215,7 +221,7 @@ class ClusterClient(NamespacedClient):
|
|
|
215
221
|
Check component templates. Returns information about whether a particular component
|
|
216
222
|
template exists.
|
|
217
223
|
|
|
218
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
224
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
|
|
219
225
|
|
|
220
226
|
:param name: Comma-separated list of component template names used to limit the
|
|
221
227
|
request. Wildcard (*) expressions are supported.
|
|
@@ -268,9 +274,9 @@ class ClusterClient(NamespacedClient):
|
|
|
268
274
|
pretty: t.Optional[bool] = None,
|
|
269
275
|
) -> ObjectApiResponse[t.Any]:
|
|
270
276
|
"""
|
|
271
|
-
Get component templates.
|
|
277
|
+
Get component templates. Get information about component templates.
|
|
272
278
|
|
|
273
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
279
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
|
|
274
280
|
|
|
275
281
|
:param name: Comma-separated list of component template names used to limit the
|
|
276
282
|
request. Wildcard (`*`) expressions are supported.
|
|
@@ -331,10 +337,10 @@ class ClusterClient(NamespacedClient):
|
|
|
331
337
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
332
338
|
) -> ObjectApiResponse[t.Any]:
|
|
333
339
|
"""
|
|
334
|
-
|
|
335
|
-
|
|
340
|
+
Get cluster-wide settings. By default, it returns only settings that have been
|
|
341
|
+
explicitly defined.
|
|
336
342
|
|
|
337
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
343
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-get-settings.html>`_
|
|
338
344
|
|
|
339
345
|
:param flat_settings: If `true`, returns settings in flat format.
|
|
340
346
|
:param include_defaults: If `true`, returns default cluster settings from the
|
|
@@ -414,17 +420,18 @@ class ClusterClient(NamespacedClient):
|
|
|
414
420
|
] = None,
|
|
415
421
|
) -> ObjectApiResponse[t.Any]:
|
|
416
422
|
"""
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
Get the cluster health status. You can also use the API to get the health status
|
|
424
|
+
of only specified data streams and indices. For data streams, the API retrieves
|
|
425
|
+
the health status of the stream’s backing indices. The cluster health status
|
|
426
|
+
is: green, yellow or red. On the shard level, a red status indicates that the
|
|
427
|
+
specific shard is not allocated in the cluster. Yellow means that the primary
|
|
428
|
+
shard is allocated but replicas are not. Green means that all shards are allocated.
|
|
429
|
+
The index level status is controlled by the worst shard status. One of the main
|
|
430
|
+
benefits of the API is the ability to wait until the cluster reaches a certain
|
|
431
|
+
high watermark health level. The cluster status is controlled by the worst index
|
|
425
432
|
status.
|
|
426
433
|
|
|
427
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
434
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-health.html>`_
|
|
428
435
|
|
|
429
436
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
430
437
|
used to limit the request. Wildcard expressions (`*`) are supported. To target
|
|
@@ -528,7 +535,7 @@ class ClusterClient(NamespacedClient):
|
|
|
528
535
|
"""
|
|
529
536
|
Get cluster info. Returns basic information about the cluster.
|
|
530
537
|
|
|
531
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
538
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-info.html>`_
|
|
532
539
|
|
|
533
540
|
:param target: Limits the information returned to the specific target. Supports
|
|
534
541
|
a comma-separated list, such as http,ingest.
|
|
@@ -568,16 +575,16 @@ class ClusterClient(NamespacedClient):
|
|
|
568
575
|
pretty: t.Optional[bool] = None,
|
|
569
576
|
) -> ObjectApiResponse[t.Any]:
|
|
570
577
|
"""
|
|
571
|
-
|
|
572
|
-
or fail shard) that have not yet
|
|
573
|
-
of any pending updates to the cluster state.
|
|
574
|
-
reported by the
|
|
575
|
-
by the user, such as node stats, search queries,
|
|
576
|
-
if a user-initiated task such as a create
|
|
577
|
-
update, the activity of this task might
|
|
578
|
-
cluster tasks API.
|
|
578
|
+
Get the pending cluster tasks. Get information about cluster-level changes (such
|
|
579
|
+
as create index, update mapping, allocate or fail shard) that have not yet taken
|
|
580
|
+
effect. NOTE: This API returns a list of any pending updates to the cluster state.
|
|
581
|
+
These are distinct from the tasks reported by the task management API which include
|
|
582
|
+
periodic tasks and tasks initiated by the user, such as node stats, search queries,
|
|
583
|
+
or create index requests. However, if a user-initiated task such as a create
|
|
584
|
+
index command causes a cluster state update, the activity of this task might
|
|
585
|
+
be reported by both task api and pending cluster tasks API.
|
|
579
586
|
|
|
580
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
587
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-pending.html>`_
|
|
581
588
|
|
|
582
589
|
:param local: If `true`, the request retrieves information from the local node
|
|
583
590
|
only. If `false`, information is retrieved from the master node.
|
|
@@ -623,9 +630,35 @@ class ClusterClient(NamespacedClient):
|
|
|
623
630
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
624
631
|
) -> ObjectApiResponse[t.Any]:
|
|
625
632
|
"""
|
|
626
|
-
|
|
633
|
+
Update voting configuration exclusions. Update the cluster voting config exclusions
|
|
634
|
+
by node IDs or node names. By default, if there are more than three master-eligible
|
|
635
|
+
nodes in the cluster and you remove fewer than half of the master-eligible nodes
|
|
636
|
+
in the cluster at once, the voting configuration automatically shrinks. If you
|
|
637
|
+
want to shrink the voting configuration to contain fewer than three nodes or
|
|
638
|
+
to remove half or more of the master-eligible nodes in the cluster at once, use
|
|
639
|
+
this API to remove departing nodes from the voting configuration manually. The
|
|
640
|
+
API adds an entry for each specified node to the cluster’s voting configuration
|
|
641
|
+
exclusions list. It then waits until the cluster has reconfigured its voting
|
|
642
|
+
configuration to exclude the specified nodes. Clusters should have no voting
|
|
643
|
+
configuration exclusions in normal operation. Once the excluded nodes have stopped,
|
|
644
|
+
clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`.
|
|
645
|
+
This API waits for the nodes to be fully removed from the cluster before it returns.
|
|
646
|
+
If your cluster has voting configuration exclusions for nodes that you no longer
|
|
647
|
+
intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false`
|
|
648
|
+
to clear the voting configuration exclusions without waiting for the nodes to
|
|
649
|
+
leave the cluster. A response to `POST /_cluster/voting_config_exclusions` with
|
|
650
|
+
an HTTP status code of 200 OK guarantees that the node has been removed from
|
|
651
|
+
the voting configuration and will not be reinstated until the voting configuration
|
|
652
|
+
exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`.
|
|
653
|
+
If the call to `POST /_cluster/voting_config_exclusions` fails or returns a response
|
|
654
|
+
with an HTTP status code other than 200 OK then the node may not have been removed
|
|
655
|
+
from the voting configuration. In that case, you may safely retry the call. NOTE:
|
|
656
|
+
Voting exclusions are required only when you remove at least half of the master-eligible
|
|
657
|
+
nodes from a cluster in a short time period. They are not required when removing
|
|
658
|
+
master-ineligible nodes or when removing fewer than half of the master-eligible
|
|
659
|
+
nodes.
|
|
627
660
|
|
|
628
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
661
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/voting-config-exclusions.html>`_
|
|
629
662
|
|
|
630
663
|
:param node_ids: A comma-separated list of the persistent ids of the nodes to
|
|
631
664
|
exclude from the voting configuration. If specified, you may not also specify
|
|
@@ -685,22 +718,23 @@ class ClusterClient(NamespacedClient):
|
|
|
685
718
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
686
719
|
) -> ObjectApiResponse[t.Any]:
|
|
687
720
|
"""
|
|
688
|
-
Create or update a component template.
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
indices. You can use C-style `/* *\\/` block comments in component templates.
|
|
721
|
+
Create or update a component template. Component templates are building blocks
|
|
722
|
+
for constructing index templates that specify index mappings, settings, and aliases.
|
|
723
|
+
An index template can be composed of multiple component templates. To use a component
|
|
724
|
+
template, specify it in an index template’s `composed_of` list. Component templates
|
|
725
|
+
are only applied to new data streams and indices as part of a matching index
|
|
726
|
+
template. Settings and mappings specified directly in the index template or the
|
|
727
|
+
create index request override any settings or mappings specified in a component
|
|
728
|
+
template. Component templates are only used during index creation. For data streams,
|
|
729
|
+
this includes data stream creation and the creation of a stream’s backing indices.
|
|
730
|
+
Changes to component templates do not affect existing indices, including a stream’s
|
|
731
|
+
backing indices. You can use C-style `/* *\\/` block comments in component templates.
|
|
700
732
|
You can include comments anywhere in the request body except before the opening
|
|
701
|
-
curly bracket.
|
|
733
|
+
curly bracket. **Applying component templates** You cannot directly apply a component
|
|
734
|
+
template to a data stream or index. To be applied, a component template must
|
|
735
|
+
be included in an index template's `composed_of` list.
|
|
702
736
|
|
|
703
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
737
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-component-template.html>`_
|
|
704
738
|
|
|
705
739
|
:param name: Name of the component template to create. Elasticsearch includes
|
|
706
740
|
the following built-in component templates: `logs-mappings`; `logs-settings`;
|
|
@@ -721,8 +755,8 @@ class ClusterClient(NamespacedClient):
|
|
|
721
755
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
722
756
|
no response is received before the timeout expires, the request fails and
|
|
723
757
|
returns an error.
|
|
724
|
-
:param meta: Optional user metadata about the component template.
|
|
725
|
-
contents. This map is not automatically generated by Elasticsearch. This
|
|
758
|
+
:param meta: Optional user metadata about the component template. It may have
|
|
759
|
+
any contents. This map is not automatically generated by Elasticsearch. This
|
|
726
760
|
information is stored in the cluster state, so keeping it short is preferable.
|
|
727
761
|
To unset `_meta`, replace the template without specifying this information.
|
|
728
762
|
:param version: Version number used to manage component templates externally.
|
|
@@ -787,9 +821,28 @@ class ClusterClient(NamespacedClient):
|
|
|
787
821
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
788
822
|
) -> ObjectApiResponse[t.Any]:
|
|
789
823
|
"""
|
|
790
|
-
|
|
824
|
+
Update the cluster settings. Configure and update dynamic settings on a running
|
|
825
|
+
cluster. You can also configure dynamic settings locally on an unstarted or shut
|
|
826
|
+
down node in `elasticsearch.yml`. Updates made with this API can be persistent,
|
|
827
|
+
which apply across cluster restarts, or transient, which reset after a cluster
|
|
828
|
+
restart. You can also reset transient or persistent settings by assigning them
|
|
829
|
+
a null value. If you configure the same setting using multiple methods, Elasticsearch
|
|
830
|
+
applies the settings in following order of precedence: 1) Transient setting;
|
|
831
|
+
2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting value.
|
|
832
|
+
For example, you can apply a transient setting to override a persistent setting
|
|
833
|
+
or `elasticsearch.yml` setting. However, a change to an `elasticsearch.yml` setting
|
|
834
|
+
will not override a defined transient or persistent setting. TIP: In Elastic
|
|
835
|
+
Cloud, use the user settings feature to configure all cluster settings. This
|
|
836
|
+
method automatically rejects unsafe settings that could break your cluster. If
|
|
837
|
+
you run Elasticsearch on your own hardware, use this API to configure dynamic
|
|
838
|
+
cluster settings. Only use `elasticsearch.yml` for static cluster settings and
|
|
839
|
+
node settings. The API doesn’t require a restart and ensures a setting’s value
|
|
840
|
+
is the same on all nodes. WARNING: Transient cluster settings are no longer recommended.
|
|
841
|
+
Use persistent cluster settings instead. If a cluster becomes unstable, transient
|
|
842
|
+
settings can clear unexpectedly, resulting in a potentially undesired cluster
|
|
843
|
+
configuration.
|
|
791
844
|
|
|
792
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
845
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-update-settings.html>`_
|
|
793
846
|
|
|
794
847
|
:param flat_settings: Return settings in flat format (default: false)
|
|
795
848
|
:param master_timeout: Explicit operation timeout for connection to master node
|
|
@@ -841,11 +894,11 @@ class ClusterClient(NamespacedClient):
|
|
|
841
894
|
pretty: t.Optional[bool] = None,
|
|
842
895
|
) -> ObjectApiResponse[t.Any]:
|
|
843
896
|
"""
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
897
|
+
Get remote cluster information. Get all of the configured remote cluster information.
|
|
898
|
+
This API returns connection and endpoint information keyed by the configured
|
|
899
|
+
remote cluster alias.
|
|
847
900
|
|
|
848
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
901
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-remote-info.html>`_
|
|
849
902
|
"""
|
|
850
903
|
__path_parts: t.Dict[str, str] = {}
|
|
851
904
|
__path = "/_remote/info"
|
|
@@ -888,15 +941,35 @@ class ClusterClient(NamespacedClient):
|
|
|
888
941
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
889
942
|
) -> ObjectApiResponse[t.Any]:
|
|
890
943
|
"""
|
|
891
|
-
|
|
944
|
+
Reroute the cluster. Manually change the allocation of individual shards in the
|
|
945
|
+
cluster. For example, a shard can be moved from one node to another explicitly,
|
|
946
|
+
an allocation can be canceled, and an unassigned shard can be explicitly allocated
|
|
947
|
+
to a specific node. It is important to note that after processing any reroute
|
|
948
|
+
commands Elasticsearch will perform rebalancing as normal (respecting the values
|
|
949
|
+
of settings such as `cluster.routing.rebalance.enable`) in order to remain in
|
|
950
|
+
a balanced state. For example, if the requested allocation includes moving a
|
|
951
|
+
shard from node1 to node2 then this may cause a shard to be moved from node2
|
|
952
|
+
back to node1 to even things out. The cluster can be set to disable allocations
|
|
953
|
+
using the `cluster.routing.allocation.enable` setting. If allocations are disabled
|
|
954
|
+
then the only allocations that will be performed are explicit ones given using
|
|
955
|
+
the reroute command, and consequent allocations due to rebalancing. The cluster
|
|
956
|
+
will attempt to allocate a shard a maximum of `index.allocation.max_retries`
|
|
957
|
+
times in a row (defaults to `5`), before giving up and leaving the shard unallocated.
|
|
958
|
+
This scenario can be caused by structural problems such as having an analyzer
|
|
959
|
+
which refers to a stopwords file which doesn’t exist on all nodes. Once the problem
|
|
960
|
+
has been corrected, allocation can be manually retried by calling the reroute
|
|
961
|
+
API with the `?retry_failed` URI query parameter, which will attempt a single
|
|
962
|
+
retry round for these shards.
|
|
892
963
|
|
|
893
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
964
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-reroute.html>`_
|
|
894
965
|
|
|
895
966
|
:param commands: Defines the commands to perform.
|
|
896
|
-
:param dry_run: If true, then the request simulates the operation
|
|
897
|
-
the
|
|
967
|
+
:param dry_run: If true, then the request simulates the operation. It will calculate
|
|
968
|
+
the result of applying the commands to the current cluster state and return
|
|
969
|
+
the resulting cluster state after the commands (and rebalancing) have been
|
|
970
|
+
applied; it will not actually perform the requested changes.
|
|
898
971
|
:param explain: If true, then the response contains an explanation of why the
|
|
899
|
-
commands can or cannot
|
|
972
|
+
commands can or cannot run.
|
|
900
973
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
901
974
|
no response is received before the timeout expires, the request fails and
|
|
902
975
|
returns an error.
|
|
@@ -975,9 +1048,28 @@ class ClusterClient(NamespacedClient):
|
|
|
975
1048
|
wait_for_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
976
1049
|
) -> ObjectApiResponse[t.Any]:
|
|
977
1050
|
"""
|
|
978
|
-
|
|
1051
|
+
Get the cluster state. Get comprehensive information about the state of the cluster.
|
|
1052
|
+
The cluster state is an internal data structure which keeps track of a variety
|
|
1053
|
+
of information needed by every node, including the identity and attributes of
|
|
1054
|
+
the other nodes in the cluster; cluster-wide settings; index metadata, including
|
|
1055
|
+
the mapping and settings for each index; the location and status of every shard
|
|
1056
|
+
copy in the cluster. The elected master node ensures that every node in the cluster
|
|
1057
|
+
has a copy of the same cluster state. This API lets you retrieve a representation
|
|
1058
|
+
of this internal state for debugging or diagnostic purposes. You may need to
|
|
1059
|
+
consult the Elasticsearch source code to determine the precise meaning of the
|
|
1060
|
+
response. By default the API will route requests to the elected master node since
|
|
1061
|
+
this node is the authoritative source of cluster states. You can also retrieve
|
|
1062
|
+
the cluster state held on the node handling the API request by adding the `?local=true`
|
|
1063
|
+
query parameter. Elasticsearch may need to expend significant effort to compute
|
|
1064
|
+
a response to this API in larger clusters, and the response may comprise a very
|
|
1065
|
+
large quantity of data. If you use this API repeatedly, your cluster may become
|
|
1066
|
+
unstable. WARNING: The response is a representation of an internal data structure.
|
|
1067
|
+
Its format is not subject to the same compatibility guarantees as other more
|
|
1068
|
+
stable APIs and may change from version to version. Do not query this API using
|
|
1069
|
+
external monitoring tools. Instead, obtain the information you require using
|
|
1070
|
+
other more stable cluster APIs.
|
|
979
1071
|
|
|
980
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1072
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-state.html>`_
|
|
981
1073
|
|
|
982
1074
|
:param metric: Limit the information returned to the specified metrics
|
|
983
1075
|
:param index: A comma-separated list of index names; use `_all` or empty string
|
|
@@ -1059,11 +1151,11 @@ class ClusterClient(NamespacedClient):
|
|
|
1059
1151
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1060
1152
|
) -> ObjectApiResponse[t.Any]:
|
|
1061
1153
|
"""
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1154
|
+
Get cluster statistics. Get basic index metrics (shard numbers, store size, memory
|
|
1155
|
+
usage) and information about the current nodes that form the cluster (number,
|
|
1156
|
+
roles, os, jvm versions, memory usage, cpu and installed plugins).
|
|
1065
1157
|
|
|
1066
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1158
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-stats.html>`_
|
|
1067
1159
|
|
|
1068
1160
|
:param node_id: Comma-separated list of node filters used to limit returned information.
|
|
1069
1161
|
Defaults to all nodes in the cluster.
|