elasticsearch 8.11.1__py3-none-any.whl → 8.12.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +493 -347
- elasticsearch/_async/client/async_search.py +108 -72
- elasticsearch/_async/client/autoscaling.py +13 -8
- elasticsearch/_async/client/cat.py +26 -26
- elasticsearch/_async/client/ccr.py +178 -117
- elasticsearch/_async/client/cluster.py +56 -48
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +15 -13
- elasticsearch/_async/client/eql.py +53 -36
- elasticsearch/_async/client/esql.py +99 -0
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +111 -71
- elasticsearch/_async/client/graph.py +13 -11
- elasticsearch/_async/client/ilm.py +33 -27
- elasticsearch/_async/client/indices.py +326 -227
- elasticsearch/_async/client/inference.py +212 -0
- elasticsearch/_async/client/ingest.py +28 -24
- elasticsearch/_async/client/license.py +15 -13
- elasticsearch/_async/client/logstash.py +13 -10
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +758 -538
- elasticsearch/_async/client/monitoring.py +10 -5
- elasticsearch/_async/client/nodes.py +13 -11
- elasticsearch/_async/client/query_ruleset.py +12 -10
- elasticsearch/_async/client/rollup.py +59 -46
- elasticsearch/_async/client/search_application.py +23 -16
- elasticsearch/_async/client/searchable_snapshots.py +23 -16
- elasticsearch/_async/client/security.py +391 -289
- elasticsearch/_async/client/shutdown.py +18 -14
- elasticsearch/_async/client/slm.py +23 -21
- elasticsearch/_async/client/snapshot.py +91 -65
- elasticsearch/_async/client/sql.py +81 -58
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +23 -19
- elasticsearch/_async/client/tasks.py +3 -3
- elasticsearch/_async/client/text_structure.py +10 -5
- elasticsearch/_async/client/transform.py +111 -75
- elasticsearch/_async/client/watcher.py +77 -55
- elasticsearch/_async/client/xpack.py +2 -2
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_sync/client/__init__.py +493 -347
- elasticsearch/_sync/client/async_search.py +108 -72
- elasticsearch/_sync/client/autoscaling.py +13 -8
- elasticsearch/_sync/client/cat.py +26 -26
- elasticsearch/_sync/client/ccr.py +178 -117
- elasticsearch/_sync/client/cluster.py +56 -48
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +15 -13
- elasticsearch/_sync/client/eql.py +53 -36
- elasticsearch/_sync/client/esql.py +99 -0
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +111 -71
- elasticsearch/_sync/client/graph.py +13 -11
- elasticsearch/_sync/client/ilm.py +33 -27
- elasticsearch/_sync/client/indices.py +326 -227
- elasticsearch/_sync/client/inference.py +212 -0
- elasticsearch/_sync/client/ingest.py +28 -24
- elasticsearch/_sync/client/license.py +15 -13
- elasticsearch/_sync/client/logstash.py +13 -10
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +758 -538
- elasticsearch/_sync/client/monitoring.py +10 -5
- elasticsearch/_sync/client/nodes.py +13 -11
- elasticsearch/_sync/client/query_ruleset.py +12 -10
- elasticsearch/_sync/client/rollup.py +59 -46
- elasticsearch/_sync/client/search_application.py +23 -16
- elasticsearch/_sync/client/searchable_snapshots.py +23 -16
- elasticsearch/_sync/client/security.py +391 -289
- elasticsearch/_sync/client/shutdown.py +18 -14
- elasticsearch/_sync/client/slm.py +23 -21
- elasticsearch/_sync/client/snapshot.py +91 -65
- elasticsearch/_sync/client/sql.py +81 -58
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +23 -19
- elasticsearch/_sync/client/tasks.py +3 -3
- elasticsearch/_sync/client/text_structure.py +10 -5
- elasticsearch/_sync/client/transform.py +111 -75
- elasticsearch/_sync/client/utils.py +34 -10
- elasticsearch/_sync/client/watcher.py +77 -55
- elasticsearch/_sync/client/xpack.py +2 -2
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- elasticsearch/helpers/actions.py +1 -1
- {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/METADATA +2 -3
- elasticsearch-8.12.0.dist-info/RECORD +103 -0
- elasticsearch-8.11.1.dist-info/RECORD +0 -99
- {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/LICENSE +0 -0
- {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/NOTICE +0 -0
- {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/WHEEL +0 -0
- {elasticsearch-8.11.1.dist-info → elasticsearch-8.12.0.dist-info}/top_level.txt +0 -0
|
@@ -38,7 +38,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
38
38
|
Deletes an async search by ID. If the search is still running, the search request
|
|
39
39
|
will be cancelled. Otherwise, the saved search results are deleted.
|
|
40
40
|
|
|
41
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
41
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html>`_
|
|
42
42
|
|
|
43
43
|
:param id: A unique identifier for the async search.
|
|
44
44
|
"""
|
|
@@ -78,7 +78,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
78
78
|
Retrieves the results of a previously submitted async search request given its
|
|
79
79
|
ID.
|
|
80
80
|
|
|
81
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
81
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html>`_
|
|
82
82
|
|
|
83
83
|
:param id: A unique identifier for the async search.
|
|
84
84
|
:param keep_alive: Specifies how long the async search should be available in
|
|
@@ -133,7 +133,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
133
133
|
Retrieves the status of a previously submitted async search request given its
|
|
134
134
|
ID.
|
|
135
135
|
|
|
136
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
136
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html>`_
|
|
137
137
|
|
|
138
138
|
:param id: A unique identifier for the async search.
|
|
139
139
|
"""
|
|
@@ -155,7 +155,41 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
155
155
|
)
|
|
156
156
|
|
|
157
157
|
@_rewrite_parameters(
|
|
158
|
-
body_fields=
|
|
158
|
+
body_fields=(
|
|
159
|
+
"aggregations",
|
|
160
|
+
"aggs",
|
|
161
|
+
"collapse",
|
|
162
|
+
"docvalue_fields",
|
|
163
|
+
"explain",
|
|
164
|
+
"ext",
|
|
165
|
+
"fields",
|
|
166
|
+
"from_",
|
|
167
|
+
"highlight",
|
|
168
|
+
"indices_boost",
|
|
169
|
+
"knn",
|
|
170
|
+
"min_score",
|
|
171
|
+
"pit",
|
|
172
|
+
"post_filter",
|
|
173
|
+
"profile",
|
|
174
|
+
"query",
|
|
175
|
+
"rescore",
|
|
176
|
+
"runtime_mappings",
|
|
177
|
+
"script_fields",
|
|
178
|
+
"search_after",
|
|
179
|
+
"seq_no_primary_term",
|
|
180
|
+
"size",
|
|
181
|
+
"slice",
|
|
182
|
+
"sort",
|
|
183
|
+
"source",
|
|
184
|
+
"stats",
|
|
185
|
+
"stored_fields",
|
|
186
|
+
"suggest",
|
|
187
|
+
"terminate_after",
|
|
188
|
+
"timeout",
|
|
189
|
+
"track_scores",
|
|
190
|
+
"track_total_hits",
|
|
191
|
+
"version",
|
|
192
|
+
),
|
|
159
193
|
parameter_aliases={
|
|
160
194
|
"_source": "source",
|
|
161
195
|
"_source_excludes": "source_excludes",
|
|
@@ -260,11 +294,12 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
260
294
|
wait_for_completion_timeout: t.Optional[
|
|
261
295
|
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
262
296
|
] = None,
|
|
297
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
263
298
|
) -> ObjectApiResponse[t.Any]:
|
|
264
299
|
"""
|
|
265
300
|
Executes a search request asynchronously.
|
|
266
301
|
|
|
267
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
302
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html>`_
|
|
268
303
|
|
|
269
304
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
270
305
|
empty string to perform the operation on all indices
|
|
@@ -396,8 +431,8 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
396
431
|
__path = f"/{_quote(index)}/_async_search"
|
|
397
432
|
else:
|
|
398
433
|
__path = "/_async_search"
|
|
399
|
-
__body: t.Dict[str, t.Any] = {}
|
|
400
434
|
__query: t.Dict[str, t.Any] = {}
|
|
435
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
401
436
|
# The 'sort' parameter with a colon can't be encoded to the body.
|
|
402
437
|
if sort is not None and (
|
|
403
438
|
(isinstance(sort, str) and ":" in sort)
|
|
@@ -409,10 +444,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
409
444
|
):
|
|
410
445
|
__query["sort"] = sort
|
|
411
446
|
sort = None
|
|
412
|
-
if aggregations is not None:
|
|
413
|
-
__body["aggregations"] = aggregations
|
|
414
|
-
if aggs is not None:
|
|
415
|
-
__body["aggs"] = aggs
|
|
416
447
|
if allow_no_indices is not None:
|
|
417
448
|
__query["allow_no_indices"] = allow_no_indices
|
|
418
449
|
if allow_partial_search_results is not None:
|
|
@@ -425,106 +456,54 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
425
456
|
__query["batched_reduce_size"] = batched_reduce_size
|
|
426
457
|
if ccs_minimize_roundtrips is not None:
|
|
427
458
|
__query["ccs_minimize_roundtrips"] = ccs_minimize_roundtrips
|
|
428
|
-
if collapse is not None:
|
|
429
|
-
__body["collapse"] = collapse
|
|
430
459
|
if default_operator is not None:
|
|
431
460
|
__query["default_operator"] = default_operator
|
|
432
461
|
if df is not None:
|
|
433
462
|
__query["df"] = df
|
|
434
|
-
if docvalue_fields is not None:
|
|
435
|
-
__body["docvalue_fields"] = docvalue_fields
|
|
436
463
|
if error_trace is not None:
|
|
437
464
|
__query["error_trace"] = error_trace
|
|
438
465
|
if expand_wildcards is not None:
|
|
439
466
|
__query["expand_wildcards"] = expand_wildcards
|
|
440
|
-
if explain is not None:
|
|
441
|
-
__body["explain"] = explain
|
|
442
|
-
if ext is not None:
|
|
443
|
-
__body["ext"] = ext
|
|
444
|
-
if fields is not None:
|
|
445
|
-
__body["fields"] = fields
|
|
446
467
|
if filter_path is not None:
|
|
447
468
|
__query["filter_path"] = filter_path
|
|
448
|
-
if from_ is not None:
|
|
449
|
-
__body["from"] = from_
|
|
450
|
-
if highlight is not None:
|
|
451
|
-
__body["highlight"] = highlight
|
|
452
469
|
if human is not None:
|
|
453
470
|
__query["human"] = human
|
|
454
471
|
if ignore_throttled is not None:
|
|
455
472
|
__query["ignore_throttled"] = ignore_throttled
|
|
456
473
|
if ignore_unavailable is not None:
|
|
457
474
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
458
|
-
if indices_boost is not None:
|
|
459
|
-
__body["indices_boost"] = indices_boost
|
|
460
475
|
if keep_alive is not None:
|
|
461
476
|
__query["keep_alive"] = keep_alive
|
|
462
477
|
if keep_on_completion is not None:
|
|
463
478
|
__query["keep_on_completion"] = keep_on_completion
|
|
464
|
-
if knn is not None:
|
|
465
|
-
__body["knn"] = knn
|
|
466
479
|
if lenient is not None:
|
|
467
480
|
__query["lenient"] = lenient
|
|
468
481
|
if max_concurrent_shard_requests is not None:
|
|
469
482
|
__query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
|
|
470
483
|
if min_compatible_shard_node is not None:
|
|
471
484
|
__query["min_compatible_shard_node"] = min_compatible_shard_node
|
|
472
|
-
if min_score is not None:
|
|
473
|
-
__body["min_score"] = min_score
|
|
474
|
-
if pit is not None:
|
|
475
|
-
__body["pit"] = pit
|
|
476
|
-
if post_filter is not None:
|
|
477
|
-
__body["post_filter"] = post_filter
|
|
478
485
|
if pre_filter_shard_size is not None:
|
|
479
486
|
__query["pre_filter_shard_size"] = pre_filter_shard_size
|
|
480
487
|
if preference is not None:
|
|
481
488
|
__query["preference"] = preference
|
|
482
489
|
if pretty is not None:
|
|
483
490
|
__query["pretty"] = pretty
|
|
484
|
-
if profile is not None:
|
|
485
|
-
__body["profile"] = profile
|
|
486
491
|
if q is not None:
|
|
487
492
|
__query["q"] = q
|
|
488
|
-
if query is not None:
|
|
489
|
-
__body["query"] = query
|
|
490
493
|
if request_cache is not None:
|
|
491
494
|
__query["request_cache"] = request_cache
|
|
492
|
-
if rescore is not None:
|
|
493
|
-
__body["rescore"] = rescore
|
|
494
495
|
if rest_total_hits_as_int is not None:
|
|
495
496
|
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
|
|
496
497
|
if routing is not None:
|
|
497
498
|
__query["routing"] = routing
|
|
498
|
-
if runtime_mappings is not None:
|
|
499
|
-
__body["runtime_mappings"] = runtime_mappings
|
|
500
|
-
if script_fields is not None:
|
|
501
|
-
__body["script_fields"] = script_fields
|
|
502
499
|
if scroll is not None:
|
|
503
500
|
__query["scroll"] = scroll
|
|
504
|
-
if search_after is not None:
|
|
505
|
-
__body["search_after"] = search_after
|
|
506
501
|
if search_type is not None:
|
|
507
502
|
__query["search_type"] = search_type
|
|
508
|
-
if seq_no_primary_term is not None:
|
|
509
|
-
__body["seq_no_primary_term"] = seq_no_primary_term
|
|
510
|
-
if size is not None:
|
|
511
|
-
__body["size"] = size
|
|
512
|
-
if slice is not None:
|
|
513
|
-
__body["slice"] = slice
|
|
514
|
-
if sort is not None:
|
|
515
|
-
__body["sort"] = sort
|
|
516
|
-
if source is not None:
|
|
517
|
-
__body["_source"] = source
|
|
518
503
|
if source_excludes is not None:
|
|
519
504
|
__query["_source_excludes"] = source_excludes
|
|
520
505
|
if source_includes is not None:
|
|
521
506
|
__query["_source_includes"] = source_includes
|
|
522
|
-
if stats is not None:
|
|
523
|
-
__body["stats"] = stats
|
|
524
|
-
if stored_fields is not None:
|
|
525
|
-
__body["stored_fields"] = stored_fields
|
|
526
|
-
if suggest is not None:
|
|
527
|
-
__body["suggest"] = suggest
|
|
528
507
|
if suggest_field is not None:
|
|
529
508
|
__query["suggest_field"] = suggest_field
|
|
530
509
|
if suggest_mode is not None:
|
|
@@ -533,20 +512,77 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
533
512
|
__query["suggest_size"] = suggest_size
|
|
534
513
|
if suggest_text is not None:
|
|
535
514
|
__query["suggest_text"] = suggest_text
|
|
536
|
-
if terminate_after is not None:
|
|
537
|
-
__body["terminate_after"] = terminate_after
|
|
538
|
-
if timeout is not None:
|
|
539
|
-
__body["timeout"] = timeout
|
|
540
|
-
if track_scores is not None:
|
|
541
|
-
__body["track_scores"] = track_scores
|
|
542
|
-
if track_total_hits is not None:
|
|
543
|
-
__body["track_total_hits"] = track_total_hits
|
|
544
515
|
if typed_keys is not None:
|
|
545
516
|
__query["typed_keys"] = typed_keys
|
|
546
|
-
if version is not None:
|
|
547
|
-
__body["version"] = version
|
|
548
517
|
if wait_for_completion_timeout is not None:
|
|
549
518
|
__query["wait_for_completion_timeout"] = wait_for_completion_timeout
|
|
519
|
+
if not __body:
|
|
520
|
+
if aggregations is not None:
|
|
521
|
+
__body["aggregations"] = aggregations
|
|
522
|
+
if aggs is not None:
|
|
523
|
+
__body["aggs"] = aggs
|
|
524
|
+
if collapse is not None:
|
|
525
|
+
__body["collapse"] = collapse
|
|
526
|
+
if docvalue_fields is not None:
|
|
527
|
+
__body["docvalue_fields"] = docvalue_fields
|
|
528
|
+
if explain is not None:
|
|
529
|
+
__body["explain"] = explain
|
|
530
|
+
if ext is not None:
|
|
531
|
+
__body["ext"] = ext
|
|
532
|
+
if fields is not None:
|
|
533
|
+
__body["fields"] = fields
|
|
534
|
+
if from_ is not None:
|
|
535
|
+
__body["from"] = from_
|
|
536
|
+
if highlight is not None:
|
|
537
|
+
__body["highlight"] = highlight
|
|
538
|
+
if indices_boost is not None:
|
|
539
|
+
__body["indices_boost"] = indices_boost
|
|
540
|
+
if knn is not None:
|
|
541
|
+
__body["knn"] = knn
|
|
542
|
+
if min_score is not None:
|
|
543
|
+
__body["min_score"] = min_score
|
|
544
|
+
if pit is not None:
|
|
545
|
+
__body["pit"] = pit
|
|
546
|
+
if post_filter is not None:
|
|
547
|
+
__body["post_filter"] = post_filter
|
|
548
|
+
if profile is not None:
|
|
549
|
+
__body["profile"] = profile
|
|
550
|
+
if query is not None:
|
|
551
|
+
__body["query"] = query
|
|
552
|
+
if rescore is not None:
|
|
553
|
+
__body["rescore"] = rescore
|
|
554
|
+
if runtime_mappings is not None:
|
|
555
|
+
__body["runtime_mappings"] = runtime_mappings
|
|
556
|
+
if script_fields is not None:
|
|
557
|
+
__body["script_fields"] = script_fields
|
|
558
|
+
if search_after is not None:
|
|
559
|
+
__body["search_after"] = search_after
|
|
560
|
+
if seq_no_primary_term is not None:
|
|
561
|
+
__body["seq_no_primary_term"] = seq_no_primary_term
|
|
562
|
+
if size is not None:
|
|
563
|
+
__body["size"] = size
|
|
564
|
+
if slice is not None:
|
|
565
|
+
__body["slice"] = slice
|
|
566
|
+
if sort is not None:
|
|
567
|
+
__body["sort"] = sort
|
|
568
|
+
if source is not None:
|
|
569
|
+
__body["_source"] = source
|
|
570
|
+
if stats is not None:
|
|
571
|
+
__body["stats"] = stats
|
|
572
|
+
if stored_fields is not None:
|
|
573
|
+
__body["stored_fields"] = stored_fields
|
|
574
|
+
if suggest is not None:
|
|
575
|
+
__body["suggest"] = suggest
|
|
576
|
+
if terminate_after is not None:
|
|
577
|
+
__body["terminate_after"] = terminate_after
|
|
578
|
+
if timeout is not None:
|
|
579
|
+
__body["timeout"] = timeout
|
|
580
|
+
if track_scores is not None:
|
|
581
|
+
__body["track_scores"] = track_scores
|
|
582
|
+
if track_total_hits is not None:
|
|
583
|
+
__body["track_total_hits"] = track_total_hits
|
|
584
|
+
if version is not None:
|
|
585
|
+
__body["version"] = version
|
|
550
586
|
if not __body:
|
|
551
587
|
__body = None # type: ignore[assignment]
|
|
552
588
|
__headers = {"accept": "application/json"}
|
|
@@ -38,7 +38,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
38
38
|
Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
|
|
39
39
|
Direct use is not supported.
|
|
40
40
|
|
|
41
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
41
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-delete-autoscaling-policy.html>`_
|
|
42
42
|
|
|
43
43
|
:param name: the name of the autoscaling policy
|
|
44
44
|
"""
|
|
@@ -72,7 +72,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
72
72
|
Gets the current autoscaling capacity based on the configured autoscaling policy.
|
|
73
73
|
Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
|
|
74
74
|
|
|
75
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
75
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html>`_
|
|
76
76
|
"""
|
|
77
77
|
__path = "/_autoscaling/capacity"
|
|
78
78
|
__query: t.Dict[str, t.Any] = {}
|
|
@@ -103,7 +103,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
103
103
|
Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
|
|
104
104
|
Direct use is not supported.
|
|
105
105
|
|
|
106
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
106
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html>`_
|
|
107
107
|
|
|
108
108
|
:param name: the name of the autoscaling policy
|
|
109
109
|
"""
|
|
@@ -131,7 +131,8 @@ class AutoscalingClient(NamespacedClient):
|
|
|
131
131
|
self,
|
|
132
132
|
*,
|
|
133
133
|
name: str,
|
|
134
|
-
policy: t.Mapping[str, t.Any],
|
|
134
|
+
policy: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
135
|
+
body: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
135
136
|
error_trace: t.Optional[bool] = None,
|
|
136
137
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
137
138
|
human: t.Optional[bool] = None,
|
|
@@ -141,15 +142,19 @@ class AutoscalingClient(NamespacedClient):
|
|
|
141
142
|
Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
|
|
142
143
|
Direct use is not supported.
|
|
143
144
|
|
|
144
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
145
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-put-autoscaling-policy.html>`_
|
|
145
146
|
|
|
146
147
|
:param name: the name of the autoscaling policy
|
|
147
148
|
:param policy:
|
|
148
149
|
"""
|
|
149
150
|
if name in SKIP_IN_PATH:
|
|
150
151
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
151
|
-
if policy is None:
|
|
152
|
-
raise ValueError(
|
|
152
|
+
if policy is None and body is None:
|
|
153
|
+
raise ValueError(
|
|
154
|
+
"Empty value passed for parameters 'policy' and 'body', one of them should be set."
|
|
155
|
+
)
|
|
156
|
+
elif policy is not None and body is not None:
|
|
157
|
+
raise ValueError("Cannot set both 'policy' and 'body'")
|
|
153
158
|
__path = f"/_autoscaling/policy/{_quote(name)}"
|
|
154
159
|
__query: t.Dict[str, t.Any] = {}
|
|
155
160
|
if error_trace is not None:
|
|
@@ -160,7 +165,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
160
165
|
__query["human"] = human
|
|
161
166
|
if pretty is not None:
|
|
162
167
|
__query["pretty"] = pretty
|
|
163
|
-
__body = policy
|
|
168
|
+
__body = policy if policy is not None else body
|
|
164
169
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
165
170
|
return await self.perform_request( # type: ignore[return-value]
|
|
166
171
|
"PUT", __path, params=__query, headers=__headers, body=__body
|
|
@@ -55,7 +55,7 @@ class CatClient(NamespacedClient):
|
|
|
55
55
|
Shows information about currently configured aliases to indices including filter
|
|
56
56
|
and routing infos.
|
|
57
57
|
|
|
58
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
58
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html>`_
|
|
59
59
|
|
|
60
60
|
:param name: A comma-separated list of aliases to retrieve. Supports wildcards
|
|
61
61
|
(`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
|
|
@@ -136,7 +136,7 @@ class CatClient(NamespacedClient):
|
|
|
136
136
|
Provides a snapshot of how many shards are allocated to each data node and how
|
|
137
137
|
much disk space they are using.
|
|
138
138
|
|
|
139
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
139
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html>`_
|
|
140
140
|
|
|
141
141
|
:param node_id: Comma-separated list of node identifiers or names used to limit
|
|
142
142
|
the returned information.
|
|
@@ -212,7 +212,7 @@ class CatClient(NamespacedClient):
|
|
|
212
212
|
"""
|
|
213
213
|
Returns information about existing component_templates templates.
|
|
214
214
|
|
|
215
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
215
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-component-templates.html>`_
|
|
216
216
|
|
|
217
217
|
:param name: The name of the component template. Accepts wildcard expressions.
|
|
218
218
|
If omitted, all component templates are returned.
|
|
@@ -286,7 +286,7 @@ class CatClient(NamespacedClient):
|
|
|
286
286
|
Provides quick access to the document count of the entire cluster, or individual
|
|
287
287
|
indices.
|
|
288
288
|
|
|
289
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
289
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-count.html>`_
|
|
290
290
|
|
|
291
291
|
:param index: Comma-separated list of data streams, indices, and aliases used
|
|
292
292
|
to limit the request. Supports wildcards (`*`). To target all data streams
|
|
@@ -364,7 +364,7 @@ class CatClient(NamespacedClient):
|
|
|
364
364
|
Shows how much heap memory is currently being used by fielddata on every data
|
|
365
365
|
node in the cluster.
|
|
366
366
|
|
|
367
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
367
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-fielddata.html>`_
|
|
368
368
|
|
|
369
369
|
:param fields: Comma-separated list of fields used to limit returned information.
|
|
370
370
|
To retrieve all fields, omit this parameter.
|
|
@@ -443,7 +443,7 @@ class CatClient(NamespacedClient):
|
|
|
443
443
|
"""
|
|
444
444
|
Returns a concise representation of the cluster health.
|
|
445
445
|
|
|
446
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
446
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-health.html>`_
|
|
447
447
|
|
|
448
448
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
449
449
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
@@ -516,7 +516,7 @@ class CatClient(NamespacedClient):
|
|
|
516
516
|
"""
|
|
517
517
|
Returns help for the Cat APIs.
|
|
518
518
|
|
|
519
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
519
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat.html>`_
|
|
520
520
|
|
|
521
521
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
522
522
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
@@ -602,7 +602,7 @@ class CatClient(NamespacedClient):
|
|
|
602
602
|
Returns information about indices: number of primaries and replicas, document
|
|
603
603
|
counts, disk size, ...
|
|
604
604
|
|
|
605
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
605
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-indices.html>`_
|
|
606
606
|
|
|
607
607
|
:param index: Comma-separated list of data streams, indices, and aliases used
|
|
608
608
|
to limit the request. Supports wildcards (`*`). To target all data streams
|
|
@@ -695,7 +695,7 @@ class CatClient(NamespacedClient):
|
|
|
695
695
|
"""
|
|
696
696
|
Returns information about the master node.
|
|
697
697
|
|
|
698
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
698
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-master.html>`_
|
|
699
699
|
|
|
700
700
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
701
701
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
@@ -794,7 +794,7 @@ class CatClient(NamespacedClient):
|
|
|
794
794
|
"""
|
|
795
795
|
Gets configuration and usage information about data frame analytics jobs.
|
|
796
796
|
|
|
797
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
797
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-dfanalytics.html>`_
|
|
798
798
|
|
|
799
799
|
:param id: The ID of the data frame analytics to fetch
|
|
800
800
|
:param allow_no_match: Whether to ignore if a wildcard expression matches no
|
|
@@ -905,7 +905,7 @@ class CatClient(NamespacedClient):
|
|
|
905
905
|
"""
|
|
906
906
|
Gets configuration and usage information about datafeeds.
|
|
907
907
|
|
|
908
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
908
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-datafeeds.html>`_
|
|
909
909
|
|
|
910
910
|
:param datafeed_id: A numerical character string that uniquely identifies the
|
|
911
911
|
datafeed.
|
|
@@ -1022,7 +1022,7 @@ class CatClient(NamespacedClient):
|
|
|
1022
1022
|
"""
|
|
1023
1023
|
Gets configuration and usage information about anomaly detection jobs.
|
|
1024
1024
|
|
|
1025
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1025
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-anomaly-detectors.html>`_
|
|
1026
1026
|
|
|
1027
1027
|
:param job_id: Identifier for the anomaly detection job.
|
|
1028
1028
|
:param allow_no_match: Specifies what to do when the request: * Contains wildcard
|
|
@@ -1142,7 +1142,7 @@ class CatClient(NamespacedClient):
|
|
|
1142
1142
|
"""
|
|
1143
1143
|
Gets configuration and usage information about inference trained models.
|
|
1144
1144
|
|
|
1145
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1145
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-trained-model.html>`_
|
|
1146
1146
|
|
|
1147
1147
|
:param model_id: A unique identifier for the trained model.
|
|
1148
1148
|
:param allow_no_match: Specifies what to do when the request: contains wildcard
|
|
@@ -1230,7 +1230,7 @@ class CatClient(NamespacedClient):
|
|
|
1230
1230
|
"""
|
|
1231
1231
|
Returns information about custom node attributes.
|
|
1232
1232
|
|
|
1233
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1233
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodeattrs.html>`_
|
|
1234
1234
|
|
|
1235
1235
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
1236
1236
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
@@ -1302,7 +1302,7 @@ class CatClient(NamespacedClient):
|
|
|
1302
1302
|
"""
|
|
1303
1303
|
Returns basic statistics about performance of cluster nodes.
|
|
1304
1304
|
|
|
1305
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1305
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-nodes.html>`_
|
|
1306
1306
|
|
|
1307
1307
|
:param bytes: The unit used to display byte values.
|
|
1308
1308
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
@@ -1380,7 +1380,7 @@ class CatClient(NamespacedClient):
|
|
|
1380
1380
|
"""
|
|
1381
1381
|
Returns a concise representation of the cluster pending tasks.
|
|
1382
1382
|
|
|
1383
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1383
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-pending-tasks.html>`_
|
|
1384
1384
|
|
|
1385
1385
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
1386
1386
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
@@ -1447,7 +1447,7 @@ class CatClient(NamespacedClient):
|
|
|
1447
1447
|
"""
|
|
1448
1448
|
Returns information about installed plugins across nodes node.
|
|
1449
1449
|
|
|
1450
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1450
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-plugins.html>`_
|
|
1451
1451
|
|
|
1452
1452
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
1453
1453
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
@@ -1520,7 +1520,7 @@ class CatClient(NamespacedClient):
|
|
|
1520
1520
|
"""
|
|
1521
1521
|
Returns information about index shard recoveries, both on-going completed.
|
|
1522
1522
|
|
|
1523
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1523
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-recovery.html>`_
|
|
1524
1524
|
|
|
1525
1525
|
:param index: A comma-separated list of data streams, indices, and aliases used
|
|
1526
1526
|
to limit the request. Supports wildcards (`*`). To target all data streams
|
|
@@ -1603,7 +1603,7 @@ class CatClient(NamespacedClient):
|
|
|
1603
1603
|
"""
|
|
1604
1604
|
Returns information about snapshot repositories registered in the cluster.
|
|
1605
1605
|
|
|
1606
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1606
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-repositories.html>`_
|
|
1607
1607
|
|
|
1608
1608
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
1609
1609
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
@@ -1674,7 +1674,7 @@ class CatClient(NamespacedClient):
|
|
|
1674
1674
|
"""
|
|
1675
1675
|
Provides low-level information about the segments in the shards of an index.
|
|
1676
1676
|
|
|
1677
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1677
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-segments.html>`_
|
|
1678
1678
|
|
|
1679
1679
|
:param index: A comma-separated list of data streams, indices, and aliases used
|
|
1680
1680
|
to limit the request. Supports wildcards (`*`). To target all data streams
|
|
@@ -1754,7 +1754,7 @@ class CatClient(NamespacedClient):
|
|
|
1754
1754
|
"""
|
|
1755
1755
|
Provides a detailed view of shard allocation on nodes.
|
|
1756
1756
|
|
|
1757
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1757
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-shards.html>`_
|
|
1758
1758
|
|
|
1759
1759
|
:param index: A comma-separated list of data streams, indices, and aliases used
|
|
1760
1760
|
to limit the request. Supports wildcards (`*`). To target all data streams
|
|
@@ -1832,7 +1832,7 @@ class CatClient(NamespacedClient):
|
|
|
1832
1832
|
"""
|
|
1833
1833
|
Returns all snapshots in a specific repository.
|
|
1834
1834
|
|
|
1835
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1835
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-snapshots.html>`_
|
|
1836
1836
|
|
|
1837
1837
|
:param repository: A comma-separated list of snapshot repositories used to limit
|
|
1838
1838
|
the request. Accepts wildcard expressions. `_all` returns all repositories.
|
|
@@ -1914,7 +1914,7 @@ class CatClient(NamespacedClient):
|
|
|
1914
1914
|
Returns information about the tasks currently executing on one or more nodes
|
|
1915
1915
|
in the cluster.
|
|
1916
1916
|
|
|
1917
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1917
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/tasks.html>`_
|
|
1918
1918
|
|
|
1919
1919
|
:param actions: The task action names, which are used to limit the response.
|
|
1920
1920
|
:param detailed: If `true`, the response includes detailed information about
|
|
@@ -1996,7 +1996,7 @@ class CatClient(NamespacedClient):
|
|
|
1996
1996
|
"""
|
|
1997
1997
|
Returns information about existing templates.
|
|
1998
1998
|
|
|
1999
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1999
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-templates.html>`_
|
|
2000
2000
|
|
|
2001
2001
|
:param name: The name of the template to return. Accepts wildcard expressions.
|
|
2002
2002
|
If omitted, all templates are returned.
|
|
@@ -2073,7 +2073,7 @@ class CatClient(NamespacedClient):
|
|
|
2073
2073
|
Returns cluster-wide thread pool statistics per node. By default the active,
|
|
2074
2074
|
queue and rejected statistics are returned for all thread pools.
|
|
2075
2075
|
|
|
2076
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2076
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-thread-pool.html>`_
|
|
2077
2077
|
|
|
2078
2078
|
:param thread_pool_patterns: A comma-separated list of thread pool names used
|
|
2079
2079
|
to limit the request. Accepts wildcard expressions.
|
|
@@ -2183,7 +2183,7 @@ class CatClient(NamespacedClient):
|
|
|
2183
2183
|
"""
|
|
2184
2184
|
Gets configuration and usage information about transforms.
|
|
2185
2185
|
|
|
2186
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2186
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-transforms.html>`_
|
|
2187
2187
|
|
|
2188
2188
|
:param transform_id: A transform identifier or a wildcard expression. If you
|
|
2189
2189
|
do not specify one of these options, the API returns information for all
|