elasticsearch 8.12.1__py3-none-any.whl → 8.13.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/__init__.py +7 -0
- elasticsearch/_async/client/__init__.py +477 -128
- elasticsearch/_async/client/_base.py +41 -1
- elasticsearch/_async/client/async_search.py +40 -12
- elasticsearch/_async/client/autoscaling.py +37 -11
- elasticsearch/_async/client/cat.py +260 -69
- elasticsearch/_async/client/ccr.py +123 -38
- elasticsearch/_async/client/cluster.py +153 -42
- elasticsearch/_async/client/dangling_indices.py +27 -8
- elasticsearch/_async/client/enrich.py +48 -14
- elasticsearch/_async/client/eql.py +38 -12
- elasticsearch/_async/client/esql.py +10 -2
- elasticsearch/_async/client/features.py +17 -4
- elasticsearch/_async/client/fleet.py +30 -7
- elasticsearch/_async/client/graph.py +11 -3
- elasticsearch/_async/client/ilm.py +101 -29
- elasticsearch/_async/client/indices.py +688 -181
- elasticsearch/_async/client/inference.py +111 -44
- elasticsearch/_async/client/ingest.py +59 -16
- elasticsearch/_async/client/license.py +58 -14
- elasticsearch/_async/client/logstash.py +31 -9
- elasticsearch/_async/client/migration.py +28 -7
- elasticsearch/_async/client/ml.py +781 -214
- elasticsearch/_async/client/monitoring.py +10 -2
- elasticsearch/_async/client/nodes.py +103 -29
- elasticsearch/_async/client/query_ruleset.py +37 -11
- elasticsearch/_async/client/rollup.py +79 -24
- elasticsearch/_async/client/search_application.py +76 -23
- elasticsearch/_async/client/searchable_snapshots.py +49 -12
- elasticsearch/_async/client/security.py +544 -143
- elasticsearch/_async/client/shutdown.py +28 -6
- elasticsearch/_async/client/slm.py +80 -22
- elasticsearch/_async/client/snapshot.py +140 -54
- elasticsearch/_async/client/sql.py +55 -15
- elasticsearch/_async/client/ssl.py +9 -2
- elasticsearch/_async/client/synonyms.py +75 -21
- elasticsearch/_async/client/tasks.py +29 -8
- elasticsearch/_async/client/text_structure.py +74 -2
- elasticsearch/_async/client/transform.py +106 -32
- elasticsearch/_async/client/watcher.py +110 -31
- elasticsearch/_async/client/xpack.py +16 -4
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_otel.py +92 -0
- elasticsearch/_sync/client/__init__.py +477 -128
- elasticsearch/_sync/client/_base.py +41 -1
- elasticsearch/_sync/client/async_search.py +40 -12
- elasticsearch/_sync/client/autoscaling.py +37 -11
- elasticsearch/_sync/client/cat.py +260 -69
- elasticsearch/_sync/client/ccr.py +123 -38
- elasticsearch/_sync/client/cluster.py +153 -42
- elasticsearch/_sync/client/dangling_indices.py +27 -8
- elasticsearch/_sync/client/enrich.py +48 -14
- elasticsearch/_sync/client/eql.py +38 -12
- elasticsearch/_sync/client/esql.py +10 -2
- elasticsearch/_sync/client/features.py +17 -4
- elasticsearch/_sync/client/fleet.py +30 -7
- elasticsearch/_sync/client/graph.py +11 -3
- elasticsearch/_sync/client/ilm.py +101 -29
- elasticsearch/_sync/client/indices.py +688 -181
- elasticsearch/_sync/client/inference.py +111 -44
- elasticsearch/_sync/client/ingest.py +59 -16
- elasticsearch/_sync/client/license.py +58 -14
- elasticsearch/_sync/client/logstash.py +31 -9
- elasticsearch/_sync/client/migration.py +28 -7
- elasticsearch/_sync/client/ml.py +781 -214
- elasticsearch/_sync/client/monitoring.py +10 -2
- elasticsearch/_sync/client/nodes.py +103 -29
- elasticsearch/_sync/client/query_ruleset.py +37 -11
- elasticsearch/_sync/client/rollup.py +79 -24
- elasticsearch/_sync/client/search_application.py +76 -23
- elasticsearch/_sync/client/searchable_snapshots.py +49 -12
- elasticsearch/_sync/client/security.py +544 -143
- elasticsearch/_sync/client/shutdown.py +28 -6
- elasticsearch/_sync/client/slm.py +80 -22
- elasticsearch/_sync/client/snapshot.py +140 -54
- elasticsearch/_sync/client/sql.py +55 -15
- elasticsearch/_sync/client/ssl.py +9 -2
- elasticsearch/_sync/client/synonyms.py +75 -21
- elasticsearch/_sync/client/tasks.py +29 -8
- elasticsearch/_sync/client/text_structure.py +74 -2
- elasticsearch/_sync/client/transform.py +106 -32
- elasticsearch/_sync/client/watcher.py +110 -31
- elasticsearch/_sync/client/xpack.py +16 -4
- elasticsearch/_version.py +1 -1
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/__init__.py +62 -0
- elasticsearch/helpers/vectorstore/_async/__init__.py +16 -0
- elasticsearch/helpers/vectorstore/_async/_utils.py +39 -0
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +89 -0
- elasticsearch/helpers/vectorstore/_async/strategies.py +466 -0
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +391 -0
- elasticsearch/helpers/vectorstore/_sync/__init__.py +16 -0
- elasticsearch/helpers/vectorstore/_sync/_utils.py +39 -0
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +89 -0
- elasticsearch/helpers/vectorstore/_sync/strategies.py +466 -0
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +388 -0
- elasticsearch/helpers/vectorstore/_utils.py +116 -0
- elasticsearch/serializer.py +14 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/METADATA +28 -8
- elasticsearch-8.13.1.dist-info/RECORD +116 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.12.1.dist-info/RECORD +0 -103
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/LICENSE +0 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/NOTICE +0 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/top_level.txt +0 -0
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class ClusterClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters(
|
|
28
29
|
body_fields=("current_node", "index", "primary", "shard"),
|
|
29
30
|
)
|
|
@@ -45,7 +46,7 @@ class ClusterClient(NamespacedClient):
|
|
|
45
46
|
"""
|
|
46
47
|
Provides explanations for shard allocations in the cluster.
|
|
47
48
|
|
|
48
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
49
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-allocation-explain.html>`_
|
|
49
50
|
|
|
50
51
|
:param current_node: Specifies the node ID or the name of the node to only explain
|
|
51
52
|
a shard that is currently located on the specified node.
|
|
@@ -59,6 +60,7 @@ class ClusterClient(NamespacedClient):
|
|
|
59
60
|
:param shard: Specifies the ID of the shard that you would like an explanation
|
|
60
61
|
for.
|
|
61
62
|
"""
|
|
63
|
+
__path_parts: t.Dict[str, str] = {}
|
|
62
64
|
__path = "/_cluster/allocation/explain"
|
|
63
65
|
__query: t.Dict[str, t.Any] = {}
|
|
64
66
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
@@ -89,7 +91,13 @@ class ClusterClient(NamespacedClient):
|
|
|
89
91
|
if __body is not None:
|
|
90
92
|
__headers["content-type"] = "application/json"
|
|
91
93
|
return self.perform_request( # type: ignore[return-value]
|
|
92
|
-
"POST",
|
|
94
|
+
"POST",
|
|
95
|
+
__path,
|
|
96
|
+
params=__query,
|
|
97
|
+
headers=__headers,
|
|
98
|
+
body=__body,
|
|
99
|
+
endpoint_id="cluster.allocation_explain",
|
|
100
|
+
path_parts=__path_parts,
|
|
93
101
|
)
|
|
94
102
|
|
|
95
103
|
@_rewrite_parameters()
|
|
@@ -109,7 +117,7 @@ class ClusterClient(NamespacedClient):
|
|
|
109
117
|
"""
|
|
110
118
|
Deletes a component template
|
|
111
119
|
|
|
112
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
120
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-component-template.html>`_
|
|
113
121
|
|
|
114
122
|
:param name: Comma-separated list or wildcard expression of component template
|
|
115
123
|
names used to limit the request.
|
|
@@ -121,7 +129,8 @@ class ClusterClient(NamespacedClient):
|
|
|
121
129
|
"""
|
|
122
130
|
if name in SKIP_IN_PATH:
|
|
123
131
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
124
|
-
|
|
132
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
133
|
+
__path = f'/_component_template/{__path_parts["name"]}'
|
|
125
134
|
__query: t.Dict[str, t.Any] = {}
|
|
126
135
|
if error_trace is not None:
|
|
127
136
|
__query["error_trace"] = error_trace
|
|
@@ -137,7 +146,12 @@ class ClusterClient(NamespacedClient):
|
|
|
137
146
|
__query["timeout"] = timeout
|
|
138
147
|
__headers = {"accept": "application/json"}
|
|
139
148
|
return self.perform_request( # type: ignore[return-value]
|
|
140
|
-
"DELETE",
|
|
149
|
+
"DELETE",
|
|
150
|
+
__path,
|
|
151
|
+
params=__query,
|
|
152
|
+
headers=__headers,
|
|
153
|
+
endpoint_id="cluster.delete_component_template",
|
|
154
|
+
path_parts=__path_parts,
|
|
141
155
|
)
|
|
142
156
|
|
|
143
157
|
@_rewrite_parameters()
|
|
@@ -153,7 +167,7 @@ class ClusterClient(NamespacedClient):
|
|
|
153
167
|
"""
|
|
154
168
|
Clears cluster voting config exclusions.
|
|
155
169
|
|
|
156
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
170
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/voting-config-exclusions.html>`_
|
|
157
171
|
|
|
158
172
|
:param wait_for_removal: Specifies whether to wait for all excluded nodes to
|
|
159
173
|
be removed from the cluster before clearing the voting configuration exclusions
|
|
@@ -162,6 +176,7 @@ class ClusterClient(NamespacedClient):
|
|
|
162
176
|
configuration exclusions list is cleared even if some excluded nodes are
|
|
163
177
|
still in the cluster.
|
|
164
178
|
"""
|
|
179
|
+
__path_parts: t.Dict[str, str] = {}
|
|
165
180
|
__path = "/_cluster/voting_config_exclusions"
|
|
166
181
|
__query: t.Dict[str, t.Any] = {}
|
|
167
182
|
if error_trace is not None:
|
|
@@ -176,7 +191,12 @@ class ClusterClient(NamespacedClient):
|
|
|
176
191
|
__query["wait_for_removal"] = wait_for_removal
|
|
177
192
|
__headers = {"accept": "application/json"}
|
|
178
193
|
return self.perform_request( # type: ignore[return-value]
|
|
179
|
-
"DELETE",
|
|
194
|
+
"DELETE",
|
|
195
|
+
__path,
|
|
196
|
+
params=__query,
|
|
197
|
+
headers=__headers,
|
|
198
|
+
endpoint_id="cluster.delete_voting_config_exclusions",
|
|
199
|
+
path_parts=__path_parts,
|
|
180
200
|
)
|
|
181
201
|
|
|
182
202
|
@_rewrite_parameters()
|
|
@@ -196,7 +216,7 @@ class ClusterClient(NamespacedClient):
|
|
|
196
216
|
"""
|
|
197
217
|
Returns information about whether a particular component template exist
|
|
198
218
|
|
|
199
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
219
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-component-template.html>`_
|
|
200
220
|
|
|
201
221
|
:param name: Comma-separated list of component template names used to limit the
|
|
202
222
|
request. Wildcard (*) expressions are supported.
|
|
@@ -209,7 +229,8 @@ class ClusterClient(NamespacedClient):
|
|
|
209
229
|
"""
|
|
210
230
|
if name in SKIP_IN_PATH:
|
|
211
231
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
212
|
-
|
|
232
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
233
|
+
__path = f'/_component_template/{__path_parts["name"]}'
|
|
213
234
|
__query: t.Dict[str, t.Any] = {}
|
|
214
235
|
if error_trace is not None:
|
|
215
236
|
__query["error_trace"] = error_trace
|
|
@@ -225,7 +246,12 @@ class ClusterClient(NamespacedClient):
|
|
|
225
246
|
__query["pretty"] = pretty
|
|
226
247
|
__headers = {"accept": "application/json"}
|
|
227
248
|
return self.perform_request( # type: ignore[return-value]
|
|
228
|
-
"HEAD",
|
|
249
|
+
"HEAD",
|
|
250
|
+
__path,
|
|
251
|
+
params=__query,
|
|
252
|
+
headers=__headers,
|
|
253
|
+
endpoint_id="cluster.exists_component_template",
|
|
254
|
+
path_parts=__path_parts,
|
|
229
255
|
)
|
|
230
256
|
|
|
231
257
|
@_rewrite_parameters()
|
|
@@ -247,7 +273,7 @@ class ClusterClient(NamespacedClient):
|
|
|
247
273
|
"""
|
|
248
274
|
Returns one or more component templates
|
|
249
275
|
|
|
250
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
276
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-component-template.html>`_
|
|
251
277
|
|
|
252
278
|
:param name: Comma-separated list of component template names used to limit the
|
|
253
279
|
request. Wildcard (`*`) expressions are supported.
|
|
@@ -260,9 +286,12 @@ class ClusterClient(NamespacedClient):
|
|
|
260
286
|
no response is received before the timeout expires, the request fails and
|
|
261
287
|
returns an error.
|
|
262
288
|
"""
|
|
289
|
+
__path_parts: t.Dict[str, str]
|
|
263
290
|
if name not in SKIP_IN_PATH:
|
|
264
|
-
|
|
291
|
+
__path_parts = {"name": _quote(name)}
|
|
292
|
+
__path = f'/_component_template/{__path_parts["name"]}'
|
|
265
293
|
else:
|
|
294
|
+
__path_parts = {}
|
|
266
295
|
__path = "/_component_template"
|
|
267
296
|
__query: t.Dict[str, t.Any] = {}
|
|
268
297
|
if error_trace is not None:
|
|
@@ -283,7 +312,12 @@ class ClusterClient(NamespacedClient):
|
|
|
283
312
|
__query["pretty"] = pretty
|
|
284
313
|
__headers = {"accept": "application/json"}
|
|
285
314
|
return self.perform_request( # type: ignore[return-value]
|
|
286
|
-
"GET",
|
|
315
|
+
"GET",
|
|
316
|
+
__path,
|
|
317
|
+
params=__query,
|
|
318
|
+
headers=__headers,
|
|
319
|
+
endpoint_id="cluster.get_component_template",
|
|
320
|
+
path_parts=__path_parts,
|
|
287
321
|
)
|
|
288
322
|
|
|
289
323
|
@_rewrite_parameters()
|
|
@@ -304,7 +338,7 @@ class ClusterClient(NamespacedClient):
|
|
|
304
338
|
"""
|
|
305
339
|
Returns cluster settings.
|
|
306
340
|
|
|
307
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
341
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-get-settings.html>`_
|
|
308
342
|
|
|
309
343
|
:param flat_settings: If `true`, returns settings in flat format.
|
|
310
344
|
:param include_defaults: If `true`, returns default cluster settings from the
|
|
@@ -315,6 +349,7 @@ class ClusterClient(NamespacedClient):
|
|
|
315
349
|
:param timeout: Period to wait for a response. If no response is received before
|
|
316
350
|
the timeout expires, the request fails and returns an error.
|
|
317
351
|
"""
|
|
352
|
+
__path_parts: t.Dict[str, str] = {}
|
|
318
353
|
__path = "/_cluster/settings"
|
|
319
354
|
__query: t.Dict[str, t.Any] = {}
|
|
320
355
|
if error_trace is not None:
|
|
@@ -335,7 +370,12 @@ class ClusterClient(NamespacedClient):
|
|
|
335
370
|
__query["timeout"] = timeout
|
|
336
371
|
__headers = {"accept": "application/json"}
|
|
337
372
|
return self.perform_request( # type: ignore[return-value]
|
|
338
|
-
"GET",
|
|
373
|
+
"GET",
|
|
374
|
+
__path,
|
|
375
|
+
params=__query,
|
|
376
|
+
headers=__headers,
|
|
377
|
+
endpoint_id="cluster.get_settings",
|
|
378
|
+
path_parts=__path_parts,
|
|
339
379
|
)
|
|
340
380
|
|
|
341
381
|
@_rewrite_parameters()
|
|
@@ -382,7 +422,7 @@ class ClusterClient(NamespacedClient):
|
|
|
382
422
|
"""
|
|
383
423
|
Returns basic information about the health of the cluster.
|
|
384
424
|
|
|
385
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
425
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-health.html>`_
|
|
386
426
|
|
|
387
427
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
388
428
|
used to limit the request. Wildcard expressions (*) are supported. To target
|
|
@@ -418,9 +458,12 @@ class ClusterClient(NamespacedClient):
|
|
|
418
458
|
provided) until the status of the cluster changes to the one provided or
|
|
419
459
|
better, i.e. green > yellow > red. By default, will not wait for any status.
|
|
420
460
|
"""
|
|
461
|
+
__path_parts: t.Dict[str, str]
|
|
421
462
|
if index not in SKIP_IN_PATH:
|
|
422
|
-
|
|
463
|
+
__path_parts = {"index": _quote(index)}
|
|
464
|
+
__path = f'/_cluster/health/{__path_parts["index"]}'
|
|
423
465
|
else:
|
|
466
|
+
__path_parts = {}
|
|
424
467
|
__path = "/_cluster/health"
|
|
425
468
|
__query: t.Dict[str, t.Any] = {}
|
|
426
469
|
if error_trace is not None:
|
|
@@ -455,7 +498,12 @@ class ClusterClient(NamespacedClient):
|
|
|
455
498
|
__query["wait_for_status"] = wait_for_status
|
|
456
499
|
__headers = {"accept": "application/json"}
|
|
457
500
|
return self.perform_request( # type: ignore[return-value]
|
|
458
|
-
"GET",
|
|
501
|
+
"GET",
|
|
502
|
+
__path,
|
|
503
|
+
params=__query,
|
|
504
|
+
headers=__headers,
|
|
505
|
+
endpoint_id="cluster.health",
|
|
506
|
+
path_parts=__path_parts,
|
|
459
507
|
)
|
|
460
508
|
|
|
461
509
|
@_rewrite_parameters()
|
|
@@ -480,14 +528,15 @@ class ClusterClient(NamespacedClient):
|
|
|
480
528
|
"""
|
|
481
529
|
Returns different information about the cluster.
|
|
482
530
|
|
|
483
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
531
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-info.html>`_
|
|
484
532
|
|
|
485
533
|
:param target: Limits the information returned to the specific target. Supports
|
|
486
534
|
a comma-separated list, such as http,ingest.
|
|
487
535
|
"""
|
|
488
536
|
if target in SKIP_IN_PATH:
|
|
489
537
|
raise ValueError("Empty value passed for parameter 'target'")
|
|
490
|
-
|
|
538
|
+
__path_parts: t.Dict[str, str] = {"target": _quote(target)}
|
|
539
|
+
__path = f'/_info/{__path_parts["target"]}'
|
|
491
540
|
__query: t.Dict[str, t.Any] = {}
|
|
492
541
|
if error_trace is not None:
|
|
493
542
|
__query["error_trace"] = error_trace
|
|
@@ -499,7 +548,12 @@ class ClusterClient(NamespacedClient):
|
|
|
499
548
|
__query["pretty"] = pretty
|
|
500
549
|
__headers = {"accept": "application/json"}
|
|
501
550
|
return self.perform_request( # type: ignore[return-value]
|
|
502
|
-
"GET",
|
|
551
|
+
"GET",
|
|
552
|
+
__path,
|
|
553
|
+
params=__query,
|
|
554
|
+
headers=__headers,
|
|
555
|
+
endpoint_id="cluster.info",
|
|
556
|
+
path_parts=__path_parts,
|
|
503
557
|
)
|
|
504
558
|
|
|
505
559
|
@_rewrite_parameters()
|
|
@@ -519,7 +573,7 @@ class ClusterClient(NamespacedClient):
|
|
|
519
573
|
Returns a list of any cluster-level changes (e.g. create index, update mapping,
|
|
520
574
|
allocate or fail shard) which have not yet been executed.
|
|
521
575
|
|
|
522
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
576
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-pending.html>`_
|
|
523
577
|
|
|
524
578
|
:param local: If `true`, the request retrieves information from the local node
|
|
525
579
|
only. If `false`, information is retrieved from the master node.
|
|
@@ -527,6 +581,7 @@ class ClusterClient(NamespacedClient):
|
|
|
527
581
|
no response is received before the timeout expires, the request fails and
|
|
528
582
|
returns an error.
|
|
529
583
|
"""
|
|
584
|
+
__path_parts: t.Dict[str, str] = {}
|
|
530
585
|
__path = "/_cluster/pending_tasks"
|
|
531
586
|
__query: t.Dict[str, t.Any] = {}
|
|
532
587
|
if error_trace is not None:
|
|
@@ -543,7 +598,12 @@ class ClusterClient(NamespacedClient):
|
|
|
543
598
|
__query["pretty"] = pretty
|
|
544
599
|
__headers = {"accept": "application/json"}
|
|
545
600
|
return self.perform_request( # type: ignore[return-value]
|
|
546
|
-
"GET",
|
|
601
|
+
"GET",
|
|
602
|
+
__path,
|
|
603
|
+
params=__query,
|
|
604
|
+
headers=__headers,
|
|
605
|
+
endpoint_id="cluster.pending_tasks",
|
|
606
|
+
path_parts=__path_parts,
|
|
547
607
|
)
|
|
548
608
|
|
|
549
609
|
@_rewrite_parameters()
|
|
@@ -561,7 +621,7 @@ class ClusterClient(NamespacedClient):
|
|
|
561
621
|
"""
|
|
562
622
|
Updates the cluster voting config exclusions by node ids or node names.
|
|
563
623
|
|
|
564
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
624
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/voting-config-exclusions.html>`_
|
|
565
625
|
|
|
566
626
|
:param node_ids: A comma-separated list of the persistent ids of the nodes to
|
|
567
627
|
exclude from the voting configuration. If specified, you may not also specify
|
|
@@ -573,6 +633,7 @@ class ClusterClient(NamespacedClient):
|
|
|
573
633
|
If the timeout expires before the appropriate condition is satisfied, the
|
|
574
634
|
request fails and returns an error.
|
|
575
635
|
"""
|
|
636
|
+
__path_parts: t.Dict[str, str] = {}
|
|
576
637
|
__path = "/_cluster/voting_config_exclusions"
|
|
577
638
|
__query: t.Dict[str, t.Any] = {}
|
|
578
639
|
if error_trace is not None:
|
|
@@ -591,7 +652,12 @@ class ClusterClient(NamespacedClient):
|
|
|
591
652
|
__query["timeout"] = timeout
|
|
592
653
|
__headers = {"accept": "application/json"}
|
|
593
654
|
return self.perform_request( # type: ignore[return-value]
|
|
594
|
-
"POST",
|
|
655
|
+
"POST",
|
|
656
|
+
__path,
|
|
657
|
+
params=__query,
|
|
658
|
+
headers=__headers,
|
|
659
|
+
endpoint_id="cluster.post_voting_config_exclusions",
|
|
660
|
+
path_parts=__path_parts,
|
|
595
661
|
)
|
|
596
662
|
|
|
597
663
|
@_rewrite_parameters(
|
|
@@ -619,7 +685,7 @@ class ClusterClient(NamespacedClient):
|
|
|
619
685
|
"""
|
|
620
686
|
Creates or updates a component template
|
|
621
687
|
|
|
622
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
688
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/indices-component-template.html>`_
|
|
623
689
|
|
|
624
690
|
:param name: Name of the component template to create. Elasticsearch includes
|
|
625
691
|
the following built-in component templates: `logs-mappings`; 'logs-settings`;
|
|
@@ -654,7 +720,8 @@ class ClusterClient(NamespacedClient):
|
|
|
654
720
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
655
721
|
if template is None and body is None:
|
|
656
722
|
raise ValueError("Empty value passed for parameter 'template'")
|
|
657
|
-
|
|
723
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
724
|
+
__path = f'/_component_template/{__path_parts["name"]}'
|
|
658
725
|
__query: t.Dict[str, t.Any] = {}
|
|
659
726
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
660
727
|
if create is not None:
|
|
@@ -680,7 +747,13 @@ class ClusterClient(NamespacedClient):
|
|
|
680
747
|
__body["version"] = version
|
|
681
748
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
682
749
|
return self.perform_request( # type: ignore[return-value]
|
|
683
|
-
"PUT",
|
|
750
|
+
"PUT",
|
|
751
|
+
__path,
|
|
752
|
+
params=__query,
|
|
753
|
+
headers=__headers,
|
|
754
|
+
body=__body,
|
|
755
|
+
endpoint_id="cluster.put_component_template",
|
|
756
|
+
path_parts=__path_parts,
|
|
684
757
|
)
|
|
685
758
|
|
|
686
759
|
@_rewrite_parameters(
|
|
@@ -705,7 +778,7 @@ class ClusterClient(NamespacedClient):
|
|
|
705
778
|
"""
|
|
706
779
|
Updates the cluster settings.
|
|
707
780
|
|
|
708
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
781
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-update-settings.html>`_
|
|
709
782
|
|
|
710
783
|
:param flat_settings: Return settings in flat format (default: false)
|
|
711
784
|
:param master_timeout: Explicit operation timeout for connection to master node
|
|
@@ -713,6 +786,7 @@ class ClusterClient(NamespacedClient):
|
|
|
713
786
|
:param timeout: Explicit operation timeout
|
|
714
787
|
:param transient:
|
|
715
788
|
"""
|
|
789
|
+
__path_parts: t.Dict[str, str] = {}
|
|
716
790
|
__path = "/_cluster/settings"
|
|
717
791
|
__query: t.Dict[str, t.Any] = {}
|
|
718
792
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
@@ -737,7 +811,13 @@ class ClusterClient(NamespacedClient):
|
|
|
737
811
|
__body["transient"] = transient
|
|
738
812
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
739
813
|
return self.perform_request( # type: ignore[return-value]
|
|
740
|
-
"PUT",
|
|
814
|
+
"PUT",
|
|
815
|
+
__path,
|
|
816
|
+
params=__query,
|
|
817
|
+
headers=__headers,
|
|
818
|
+
body=__body,
|
|
819
|
+
endpoint_id="cluster.put_settings",
|
|
820
|
+
path_parts=__path_parts,
|
|
741
821
|
)
|
|
742
822
|
|
|
743
823
|
@_rewrite_parameters()
|
|
@@ -752,8 +832,9 @@ class ClusterClient(NamespacedClient):
|
|
|
752
832
|
"""
|
|
753
833
|
Returns the information about configured remote clusters.
|
|
754
834
|
|
|
755
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
835
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-remote-info.html>`_
|
|
756
836
|
"""
|
|
837
|
+
__path_parts: t.Dict[str, str] = {}
|
|
757
838
|
__path = "/_remote/info"
|
|
758
839
|
__query: t.Dict[str, t.Any] = {}
|
|
759
840
|
if error_trace is not None:
|
|
@@ -766,7 +847,12 @@ class ClusterClient(NamespacedClient):
|
|
|
766
847
|
__query["pretty"] = pretty
|
|
767
848
|
__headers = {"accept": "application/json"}
|
|
768
849
|
return self.perform_request( # type: ignore[return-value]
|
|
769
|
-
"GET",
|
|
850
|
+
"GET",
|
|
851
|
+
__path,
|
|
852
|
+
params=__query,
|
|
853
|
+
headers=__headers,
|
|
854
|
+
endpoint_id="cluster.remote_info",
|
|
855
|
+
path_parts=__path_parts,
|
|
770
856
|
)
|
|
771
857
|
|
|
772
858
|
@_rewrite_parameters(
|
|
@@ -793,7 +879,7 @@ class ClusterClient(NamespacedClient):
|
|
|
793
879
|
"""
|
|
794
880
|
Allows to manually change the allocation of individual shards in the cluster.
|
|
795
881
|
|
|
796
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
882
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-reroute.html>`_
|
|
797
883
|
|
|
798
884
|
:param commands: Defines the commands to perform.
|
|
799
885
|
:param dry_run: If true, then the request simulates the operation only and returns
|
|
@@ -809,6 +895,7 @@ class ClusterClient(NamespacedClient):
|
|
|
809
895
|
:param timeout: Period to wait for a response. If no response is received before
|
|
810
896
|
the timeout expires, the request fails and returns an error.
|
|
811
897
|
"""
|
|
898
|
+
__path_parts: t.Dict[str, str] = {}
|
|
812
899
|
__path = "/_cluster/reroute"
|
|
813
900
|
__query: t.Dict[str, t.Any] = {}
|
|
814
901
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
@@ -841,7 +928,13 @@ class ClusterClient(NamespacedClient):
|
|
|
841
928
|
if __body is not None:
|
|
842
929
|
__headers["content-type"] = "application/json"
|
|
843
930
|
return self.perform_request( # type: ignore[return-value]
|
|
844
|
-
"POST",
|
|
931
|
+
"POST",
|
|
932
|
+
__path,
|
|
933
|
+
params=__query,
|
|
934
|
+
headers=__headers,
|
|
935
|
+
body=__body,
|
|
936
|
+
endpoint_id="cluster.reroute",
|
|
937
|
+
path_parts=__path_parts,
|
|
845
938
|
)
|
|
846
939
|
|
|
847
940
|
@_rewrite_parameters()
|
|
@@ -877,7 +970,7 @@ class ClusterClient(NamespacedClient):
|
|
|
877
970
|
"""
|
|
878
971
|
Returns a comprehensive information about the state of the cluster.
|
|
879
972
|
|
|
880
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
973
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-state.html>`_
|
|
881
974
|
|
|
882
975
|
:param metric: Limit the information returned to the specified metrics
|
|
883
976
|
:param index: A comma-separated list of index names; use `_all` or empty string
|
|
@@ -898,13 +991,18 @@ class ClusterClient(NamespacedClient):
|
|
|
898
991
|
:param wait_for_timeout: The maximum time to wait for wait_for_metadata_version
|
|
899
992
|
before timing out
|
|
900
993
|
"""
|
|
994
|
+
__path_parts: t.Dict[str, str]
|
|
901
995
|
if metric not in SKIP_IN_PATH and index not in SKIP_IN_PATH:
|
|
902
|
-
|
|
996
|
+
__path_parts = {"metric": _quote(metric), "index": _quote(index)}
|
|
997
|
+
__path = f'/_cluster/state/{__path_parts["metric"]}/{__path_parts["index"]}'
|
|
903
998
|
elif metric not in SKIP_IN_PATH:
|
|
904
|
-
|
|
999
|
+
__path_parts = {"metric": _quote(metric)}
|
|
1000
|
+
__path = f'/_cluster/state/{__path_parts["metric"]}'
|
|
905
1001
|
elif index not in SKIP_IN_PATH:
|
|
906
|
-
|
|
1002
|
+
__path_parts = {"index": _quote(index)}
|
|
1003
|
+
__path = f'/_cluster/state/_all/{__path_parts["index"]}'
|
|
907
1004
|
else:
|
|
1005
|
+
__path_parts = {}
|
|
908
1006
|
__path = "/_cluster/state"
|
|
909
1007
|
__query: t.Dict[str, t.Any] = {}
|
|
910
1008
|
if allow_no_indices is not None:
|
|
@@ -933,7 +1031,12 @@ class ClusterClient(NamespacedClient):
|
|
|
933
1031
|
__query["wait_for_timeout"] = wait_for_timeout
|
|
934
1032
|
__headers = {"accept": "application/json"}
|
|
935
1033
|
return self.perform_request( # type: ignore[return-value]
|
|
936
|
-
"GET",
|
|
1034
|
+
"GET",
|
|
1035
|
+
__path,
|
|
1036
|
+
params=__query,
|
|
1037
|
+
headers=__headers,
|
|
1038
|
+
endpoint_id="cluster.state",
|
|
1039
|
+
path_parts=__path_parts,
|
|
937
1040
|
)
|
|
938
1041
|
|
|
939
1042
|
@_rewrite_parameters()
|
|
@@ -951,7 +1054,7 @@ class ClusterClient(NamespacedClient):
|
|
|
951
1054
|
"""
|
|
952
1055
|
Returns high-level overview of cluster statistics.
|
|
953
1056
|
|
|
954
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1057
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/cluster-stats.html>`_
|
|
955
1058
|
|
|
956
1059
|
:param node_id: Comma-separated list of node filters used to limit returned information.
|
|
957
1060
|
Defaults to all nodes in the cluster.
|
|
@@ -961,9 +1064,12 @@ class ClusterClient(NamespacedClient):
|
|
|
961
1064
|
timed out nodes are included in the response’s `_nodes.failed` property.
|
|
962
1065
|
Defaults to no timeout.
|
|
963
1066
|
"""
|
|
1067
|
+
__path_parts: t.Dict[str, str]
|
|
964
1068
|
if node_id not in SKIP_IN_PATH:
|
|
965
|
-
|
|
1069
|
+
__path_parts = {"node_id": _quote(node_id)}
|
|
1070
|
+
__path = f'/_cluster/stats/nodes/{__path_parts["node_id"]}'
|
|
966
1071
|
else:
|
|
1072
|
+
__path_parts = {}
|
|
967
1073
|
__path = "/_cluster/stats"
|
|
968
1074
|
__query: t.Dict[str, t.Any] = {}
|
|
969
1075
|
if error_trace is not None:
|
|
@@ -980,5 +1086,10 @@ class ClusterClient(NamespacedClient):
|
|
|
980
1086
|
__query["timeout"] = timeout
|
|
981
1087
|
__headers = {"accept": "application/json"}
|
|
982
1088
|
return self.perform_request( # type: ignore[return-value]
|
|
983
|
-
"GET",
|
|
1089
|
+
"GET",
|
|
1090
|
+
__path,
|
|
1091
|
+
params=__query,
|
|
1092
|
+
headers=__headers,
|
|
1093
|
+
endpoint_id="cluster.stats",
|
|
1094
|
+
path_parts=__path_parts,
|
|
984
1095
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class DanglingIndicesClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete_dangling_index(
|
|
29
30
|
self,
|
|
@@ -42,7 +43,7 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
42
43
|
"""
|
|
43
44
|
Deletes the specified dangling index
|
|
44
45
|
|
|
45
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
46
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-gateway-dangling-indices.html>`_
|
|
46
47
|
|
|
47
48
|
:param index_uuid: The UUID of the dangling index
|
|
48
49
|
:param accept_data_loss: Must be set to true in order to delete the dangling
|
|
@@ -54,7 +55,8 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
54
55
|
raise ValueError("Empty value passed for parameter 'index_uuid'")
|
|
55
56
|
if accept_data_loss is None:
|
|
56
57
|
raise ValueError("Empty value passed for parameter 'accept_data_loss'")
|
|
57
|
-
|
|
58
|
+
__path_parts: t.Dict[str, str] = {"index_uuid": _quote(index_uuid)}
|
|
59
|
+
__path = f'/_dangling/{__path_parts["index_uuid"]}'
|
|
58
60
|
__query: t.Dict[str, t.Any] = {}
|
|
59
61
|
if accept_data_loss is not None:
|
|
60
62
|
__query["accept_data_loss"] = accept_data_loss
|
|
@@ -72,7 +74,12 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
72
74
|
__query["timeout"] = timeout
|
|
73
75
|
__headers = {"accept": "application/json"}
|
|
74
76
|
return self.perform_request( # type: ignore[return-value]
|
|
75
|
-
"DELETE",
|
|
77
|
+
"DELETE",
|
|
78
|
+
__path,
|
|
79
|
+
params=__query,
|
|
80
|
+
headers=__headers,
|
|
81
|
+
endpoint_id="dangling_indices.delete_dangling_index",
|
|
82
|
+
path_parts=__path_parts,
|
|
76
83
|
)
|
|
77
84
|
|
|
78
85
|
@_rewrite_parameters()
|
|
@@ -93,7 +100,7 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
93
100
|
"""
|
|
94
101
|
Imports the specified dangling index
|
|
95
102
|
|
|
96
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
103
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-gateway-dangling-indices.html>`_
|
|
97
104
|
|
|
98
105
|
:param index_uuid: The UUID of the dangling index
|
|
99
106
|
:param accept_data_loss: Must be set to true in order to import the dangling
|
|
@@ -105,7 +112,8 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
105
112
|
raise ValueError("Empty value passed for parameter 'index_uuid'")
|
|
106
113
|
if accept_data_loss is None:
|
|
107
114
|
raise ValueError("Empty value passed for parameter 'accept_data_loss'")
|
|
108
|
-
|
|
115
|
+
__path_parts: t.Dict[str, str] = {"index_uuid": _quote(index_uuid)}
|
|
116
|
+
__path = f'/_dangling/{__path_parts["index_uuid"]}'
|
|
109
117
|
__query: t.Dict[str, t.Any] = {}
|
|
110
118
|
if accept_data_loss is not None:
|
|
111
119
|
__query["accept_data_loss"] = accept_data_loss
|
|
@@ -123,7 +131,12 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
123
131
|
__query["timeout"] = timeout
|
|
124
132
|
__headers = {"accept": "application/json"}
|
|
125
133
|
return self.perform_request( # type: ignore[return-value]
|
|
126
|
-
"POST",
|
|
134
|
+
"POST",
|
|
135
|
+
__path,
|
|
136
|
+
params=__query,
|
|
137
|
+
headers=__headers,
|
|
138
|
+
endpoint_id="dangling_indices.import_dangling_index",
|
|
139
|
+
path_parts=__path_parts,
|
|
127
140
|
)
|
|
128
141
|
|
|
129
142
|
@_rewrite_parameters()
|
|
@@ -138,8 +151,9 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
138
151
|
"""
|
|
139
152
|
Returns all dangling indices.
|
|
140
153
|
|
|
141
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
154
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-gateway-dangling-indices.html>`_
|
|
142
155
|
"""
|
|
156
|
+
__path_parts: t.Dict[str, str] = {}
|
|
143
157
|
__path = "/_dangling"
|
|
144
158
|
__query: t.Dict[str, t.Any] = {}
|
|
145
159
|
if error_trace is not None:
|
|
@@ -152,5 +166,10 @@ class DanglingIndicesClient(NamespacedClient):
|
|
|
152
166
|
__query["pretty"] = pretty
|
|
153
167
|
__headers = {"accept": "application/json"}
|
|
154
168
|
return self.perform_request( # type: ignore[return-value]
|
|
155
|
-
"GET",
|
|
169
|
+
"GET",
|
|
170
|
+
__path,
|
|
171
|
+
params=__query,
|
|
172
|
+
headers=__headers,
|
|
173
|
+
endpoint_id="dangling_indices.list_dangling_indices",
|
|
174
|
+
path_parts=__path_parts,
|
|
156
175
|
)
|