elasticsearch 9.2.0__py3-none-any.whl → 9.3.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 +108 -85
- elasticsearch/_async/client/async_search.py +7 -6
- elasticsearch/_async/client/autoscaling.py +15 -4
- elasticsearch/_async/client/cat.py +203 -10
- elasticsearch/_async/client/ccr.py +10 -10
- elasticsearch/_async/client/cluster.py +98 -66
- elasticsearch/_async/client/connector.py +42 -41
- elasticsearch/_async/client/dangling_indices.py +8 -12
- elasticsearch/_async/client/enrich.py +10 -10
- elasticsearch/_async/client/eql.py +17 -16
- elasticsearch/_async/client/esql.py +173 -24
- elasticsearch/_async/client/features.py +6 -6
- elasticsearch/_async/client/fleet.py +8 -8
- elasticsearch/_async/client/graph.py +3 -3
- elasticsearch/_async/client/ilm.py +18 -18
- elasticsearch/_async/client/indices.py +564 -149
- elasticsearch/_async/client/inference.py +374 -64
- elasticsearch/_async/client/ingest.py +9 -9
- elasticsearch/_async/client/license.py +5 -7
- elasticsearch/_async/client/logstash.py +4 -4
- elasticsearch/_async/client/migration.py +6 -6
- elasticsearch/_async/client/ml.py +132 -88
- elasticsearch/_async/client/monitoring.py +4 -3
- elasticsearch/_async/client/nodes.py +182 -20
- elasticsearch/_async/client/project.py +13 -4
- elasticsearch/_async/client/query_rules.py +16 -16
- elasticsearch/_async/client/rollup.py +21 -21
- elasticsearch/_async/client/search_application.py +19 -19
- elasticsearch/_async/client/searchable_snapshots.py +10 -10
- elasticsearch/_async/client/security.py +34 -10
- elasticsearch/_async/client/shutdown.py +15 -4
- elasticsearch/_async/client/simulate.py +4 -4
- elasticsearch/_async/client/slm.py +17 -17
- elasticsearch/_async/client/snapshot.py +21 -21
- elasticsearch/_async/client/sql.py +17 -16
- elasticsearch/_async/client/streams.py +6 -7
- elasticsearch/_async/client/synonyms.py +10 -10
- elasticsearch/_async/client/tasks.py +8 -8
- elasticsearch/_async/client/text_structure.py +16 -12
- elasticsearch/_async/client/transform.py +51 -12
- elasticsearch/_async/client/utils.py +4 -2
- elasticsearch/_async/client/watcher.py +26 -26
- elasticsearch/_async/client/xpack.py +6 -5
- elasticsearch/_sync/client/__init__.py +110 -85
- elasticsearch/_sync/client/async_search.py +7 -6
- elasticsearch/_sync/client/autoscaling.py +15 -4
- elasticsearch/_sync/client/cat.py +203 -10
- elasticsearch/_sync/client/ccr.py +10 -10
- elasticsearch/_sync/client/cluster.py +98 -66
- elasticsearch/_sync/client/connector.py +42 -41
- elasticsearch/_sync/client/dangling_indices.py +8 -12
- elasticsearch/_sync/client/enrich.py +10 -10
- elasticsearch/_sync/client/eql.py +17 -16
- elasticsearch/_sync/client/esql.py +173 -24
- elasticsearch/_sync/client/features.py +6 -6
- elasticsearch/_sync/client/fleet.py +8 -8
- elasticsearch/_sync/client/graph.py +3 -3
- elasticsearch/_sync/client/ilm.py +18 -18
- elasticsearch/_sync/client/indices.py +564 -149
- elasticsearch/_sync/client/inference.py +374 -64
- elasticsearch/_sync/client/ingest.py +9 -9
- elasticsearch/_sync/client/license.py +5 -7
- elasticsearch/_sync/client/logstash.py +4 -4
- elasticsearch/_sync/client/migration.py +6 -6
- elasticsearch/_sync/client/ml.py +132 -88
- elasticsearch/_sync/client/monitoring.py +4 -3
- elasticsearch/_sync/client/nodes.py +182 -20
- elasticsearch/_sync/client/project.py +13 -4
- elasticsearch/_sync/client/project_routing.py +264 -0
- elasticsearch/_sync/client/query_rules.py +16 -16
- elasticsearch/_sync/client/rollup.py +21 -21
- elasticsearch/_sync/client/search_application.py +19 -19
- elasticsearch/_sync/client/searchable_snapshots.py +10 -10
- elasticsearch/_sync/client/security.py +34 -10
- elasticsearch/_sync/client/shutdown.py +15 -4
- elasticsearch/_sync/client/simulate.py +4 -4
- elasticsearch/_sync/client/slm.py +17 -17
- elasticsearch/_sync/client/snapshot.py +21 -21
- elasticsearch/_sync/client/sql.py +17 -16
- elasticsearch/_sync/client/streams.py +6 -7
- elasticsearch/_sync/client/synonyms.py +10 -10
- elasticsearch/_sync/client/tasks.py +8 -8
- elasticsearch/_sync/client/text_structure.py +16 -12
- elasticsearch/_sync/client/transform.py +51 -12
- elasticsearch/_sync/client/utils.py +16 -2
- elasticsearch/_sync/client/watcher.py +26 -26
- elasticsearch/_sync/client/xpack.py +6 -5
- elasticsearch/_version.py +2 -2
- elasticsearch/dsl/__init__.py +4 -0
- elasticsearch/dsl/_async/document.py +4 -5
- elasticsearch/dsl/_async/index.py +1 -1
- elasticsearch/dsl/_async/search.py +2 -3
- elasticsearch/dsl/_sync/document.py +4 -5
- elasticsearch/dsl/_sync/index.py +1 -1
- elasticsearch/dsl/_sync/search.py +2 -3
- elasticsearch/dsl/aggs.py +9 -9
- elasticsearch/dsl/async_connections.py +1 -2
- elasticsearch/dsl/connections.py +1 -2
- elasticsearch/dsl/document_base.py +1 -1
- elasticsearch/dsl/field.py +90 -6
- elasticsearch/dsl/pydantic.py +1 -1
- elasticsearch/dsl/query.py +25 -2
- elasticsearch/dsl/response/__init__.py +2 -0
- elasticsearch/dsl/serializer.py +1 -2
- elasticsearch/dsl/types.py +63 -8
- elasticsearch/dsl/utils.py +12 -4
- elasticsearch/esql/esql.py +1 -1
- elasticsearch/esql/functions.py +926 -252
- elasticsearch/helpers/__init__.py +2 -0
- elasticsearch/helpers/actions.py +21 -0
- elasticsearch/helpers/vectorstore/__init__.py +7 -7
- elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +8 -5
- elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +8 -5
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/METADATA +2 -1
- elasticsearch-9.3.0.dist-info/RECORD +169 -0
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/WHEEL +1 -1
- elasticsearch-9.2.0.dist-info/RECORD +0 -168
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -213,6 +213,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
213
213
|
"pit",
|
|
214
214
|
"post_filter",
|
|
215
215
|
"profile",
|
|
216
|
+
"project_routing",
|
|
216
217
|
"query",
|
|
217
218
|
"rescore",
|
|
218
219
|
"runtime_mappings",
|
|
@@ -295,7 +296,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
295
296
|
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
296
297
|
] = None,
|
|
297
298
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
298
|
-
routing: t.Optional[str] = None,
|
|
299
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
299
300
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
300
301
|
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
301
302
|
search_after: t.Optional[
|
|
@@ -358,7 +359,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
358
359
|
:param allow_partial_search_results: Indicate if an error should be returned
|
|
359
360
|
if there is a partial search failure or timeout
|
|
360
361
|
:param analyze_wildcard: Specify whether wildcard and prefix queries should be
|
|
361
|
-
analyzed
|
|
362
|
+
analyzed
|
|
362
363
|
:param analyzer: The analyzer to use for the query string
|
|
363
364
|
:param batched_reduce_size: Affects how often partial results become available,
|
|
364
365
|
which happens whenever shard results are reduced. A partial reduction is
|
|
@@ -374,7 +375,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
374
375
|
values for field names matching these patterns in the hits.fields property
|
|
375
376
|
of the response.
|
|
376
377
|
:param expand_wildcards: Whether to expand wildcard expression to concrete indices
|
|
377
|
-
that are open, closed or both
|
|
378
|
+
that are open, closed or both
|
|
378
379
|
:param explain: If true, returns detailed information about score computation
|
|
379
380
|
as part of a hit.
|
|
380
381
|
:param ext: Configuration of search extensions defined by Elasticsearch plugins.
|
|
@@ -407,7 +408,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
407
408
|
you cannot specify an <index> in the request path.
|
|
408
409
|
:param post_filter:
|
|
409
410
|
:param preference: Specify the node or shard the operation should be performed
|
|
410
|
-
on
|
|
411
|
+
on
|
|
411
412
|
:param profile:
|
|
412
413
|
:param project_routing: Specifies a subset of projects to target for the search
|
|
413
414
|
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
@@ -533,8 +534,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
533
534
|
__query["preference"] = preference
|
|
534
535
|
if pretty is not None:
|
|
535
536
|
__query["pretty"] = pretty
|
|
536
|
-
if project_routing is not None:
|
|
537
|
-
__query["project_routing"] = project_routing
|
|
538
537
|
if q is not None:
|
|
539
538
|
__query["q"] = q
|
|
540
539
|
if request_cache is not None:
|
|
@@ -592,6 +591,8 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
592
591
|
__body["post_filter"] = post_filter
|
|
593
592
|
if profile is not None:
|
|
594
593
|
__body["profile"] = profile
|
|
594
|
+
if project_routing is not None:
|
|
595
|
+
__body["project_routing"] = project_routing
|
|
595
596
|
if query is not None:
|
|
596
597
|
__body["query"] = query
|
|
597
598
|
if rescore is not None:
|
|
@@ -20,12 +20,20 @@ import typing as t
|
|
|
20
20
|
from elastic_transport import ObjectApiResponse
|
|
21
21
|
|
|
22
22
|
from ._base import NamespacedClient
|
|
23
|
-
from .utils import
|
|
23
|
+
from .utils import (
|
|
24
|
+
SKIP_IN_PATH,
|
|
25
|
+
Stability,
|
|
26
|
+
Visibility,
|
|
27
|
+
_availability_warning,
|
|
28
|
+
_quote,
|
|
29
|
+
_rewrite_parameters,
|
|
30
|
+
)
|
|
24
31
|
|
|
25
32
|
|
|
26
33
|
class AutoscalingClient(NamespacedClient):
|
|
27
34
|
|
|
28
35
|
@_rewrite_parameters()
|
|
36
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
29
37
|
async def delete_autoscaling_policy(
|
|
30
38
|
self,
|
|
31
39
|
*,
|
|
@@ -46,7 +54,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
46
54
|
|
|
47
55
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy>`_
|
|
48
56
|
|
|
49
|
-
:param name:
|
|
57
|
+
:param name: Name of the autoscaling policy
|
|
50
58
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
51
59
|
no response is received before the timeout expires, the request fails and
|
|
52
60
|
returns an error.
|
|
@@ -81,6 +89,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
81
89
|
)
|
|
82
90
|
|
|
83
91
|
@_rewrite_parameters()
|
|
92
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
84
93
|
async def get_autoscaling_capacity(
|
|
85
94
|
self,
|
|
86
95
|
*,
|
|
@@ -134,6 +143,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
134
143
|
)
|
|
135
144
|
|
|
136
145
|
@_rewrite_parameters()
|
|
146
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
137
147
|
async def get_autoscaling_policy(
|
|
138
148
|
self,
|
|
139
149
|
*,
|
|
@@ -153,7 +163,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
153
163
|
|
|
154
164
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity>`_
|
|
155
165
|
|
|
156
|
-
:param name:
|
|
166
|
+
:param name: Name of the autoscaling policy
|
|
157
167
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
158
168
|
no response is received before the timeout expires, the request fails and
|
|
159
169
|
returns an error.
|
|
@@ -186,6 +196,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
186
196
|
@_rewrite_parameters(
|
|
187
197
|
body_name="policy",
|
|
188
198
|
)
|
|
199
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
189
200
|
async def put_autoscaling_policy(
|
|
190
201
|
self,
|
|
191
202
|
*,
|
|
@@ -208,7 +219,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
208
219
|
|
|
209
220
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy>`_
|
|
210
221
|
|
|
211
|
-
:param name:
|
|
222
|
+
:param name: Name of the autoscaling policy
|
|
212
223
|
:param policy:
|
|
213
224
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
214
225
|
no response is received before the timeout expires, the request fails and
|
|
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -328,6 +328,149 @@ class CatClient(NamespacedClient):
|
|
|
328
328
|
path_parts=__path_parts,
|
|
329
329
|
)
|
|
330
330
|
|
|
331
|
+
@_rewrite_parameters()
|
|
332
|
+
async def circuit_breaker(
|
|
333
|
+
self,
|
|
334
|
+
*,
|
|
335
|
+
circuit_breaker_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
336
|
+
bytes: t.Optional[
|
|
337
|
+
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
|
|
338
|
+
] = None,
|
|
339
|
+
error_trace: t.Optional[bool] = None,
|
|
340
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
341
|
+
format: t.Optional[str] = None,
|
|
342
|
+
h: t.Optional[
|
|
343
|
+
t.Union[
|
|
344
|
+
t.Sequence[
|
|
345
|
+
t.Union[
|
|
346
|
+
str,
|
|
347
|
+
t.Literal[
|
|
348
|
+
"breaker",
|
|
349
|
+
"estimated",
|
|
350
|
+
"estimated_bytes",
|
|
351
|
+
"limit",
|
|
352
|
+
"limit_bytes",
|
|
353
|
+
"node_id",
|
|
354
|
+
"node_name",
|
|
355
|
+
"overhead",
|
|
356
|
+
"tripped",
|
|
357
|
+
],
|
|
358
|
+
]
|
|
359
|
+
],
|
|
360
|
+
t.Union[
|
|
361
|
+
str,
|
|
362
|
+
t.Literal[
|
|
363
|
+
"breaker",
|
|
364
|
+
"estimated",
|
|
365
|
+
"estimated_bytes",
|
|
366
|
+
"limit",
|
|
367
|
+
"limit_bytes",
|
|
368
|
+
"node_id",
|
|
369
|
+
"node_name",
|
|
370
|
+
"overhead",
|
|
371
|
+
"tripped",
|
|
372
|
+
],
|
|
373
|
+
],
|
|
374
|
+
]
|
|
375
|
+
] = None,
|
|
376
|
+
help: t.Optional[bool] = None,
|
|
377
|
+
human: t.Optional[bool] = None,
|
|
378
|
+
local: t.Optional[bool] = None,
|
|
379
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
380
|
+
pretty: t.Optional[bool] = None,
|
|
381
|
+
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
382
|
+
time: t.Optional[
|
|
383
|
+
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
384
|
+
] = None,
|
|
385
|
+
v: t.Optional[bool] = None,
|
|
386
|
+
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
|
|
387
|
+
"""
|
|
388
|
+
.. raw:: html
|
|
389
|
+
|
|
390
|
+
<p>Get circuit breakers statistics.</p>
|
|
391
|
+
<p>IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.</p>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
|
|
395
|
+
|
|
396
|
+
:param circuit_breaker_patterns: A comma-separated list of regular-expressions
|
|
397
|
+
to filter the circuit breakers in the output
|
|
398
|
+
:param bytes: Sets the units for columns that contain a byte-size value. Note
|
|
399
|
+
that byte-size value units work in terms of powers of 1024. For instance
|
|
400
|
+
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
|
|
401
|
+
rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
|
|
402
|
+
numeric value of the column is as small as possible whilst still being at
|
|
403
|
+
least `1.0`. If given, byte-size values are rendered as an integer with no
|
|
404
|
+
suffix, representing the value of the column in the chosen unit. Values that
|
|
405
|
+
are not an exact multiple of the chosen unit are rounded down.
|
|
406
|
+
:param format: Specifies the format to return the columnar data in, can be set
|
|
407
|
+
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
408
|
+
:param h: A comma-separated list of columns names to display. It supports simple
|
|
409
|
+
wildcards.
|
|
410
|
+
:param help: When set to `true` will output available columns. This option can't
|
|
411
|
+
be combined with any other query string option.
|
|
412
|
+
:param local: If `true`, the request computes the list of selected nodes from
|
|
413
|
+
the local cluster state. If `false` the list of selected nodes are computed
|
|
414
|
+
from the cluster state of the master node. In both cases the coordinating
|
|
415
|
+
node will send requests for further information to each selected node.
|
|
416
|
+
:param master_timeout: Period to wait for a connection to the master node.
|
|
417
|
+
:param s: List of columns that determine how the table should be sorted. Sorting
|
|
418
|
+
defaults to ascending and can be changed by setting `:asc` or `:desc` as
|
|
419
|
+
a suffix to the column name.
|
|
420
|
+
:param time: Sets the units for columns that contain a time duration. If omitted,
|
|
421
|
+
time duration values are rendered with a suffix such as `ms`, `s`, `m` or
|
|
422
|
+
`h`, chosen such that the numeric value of the column is as small as possible
|
|
423
|
+
whilst still being at least `1.0`. If given, time duration values are rendered
|
|
424
|
+
as an integer with no suffix. Values that are not an exact multiple of the
|
|
425
|
+
chosen unit are rounded down.
|
|
426
|
+
:param v: When set to `true` will enable verbose output.
|
|
427
|
+
"""
|
|
428
|
+
__path_parts: t.Dict[str, str]
|
|
429
|
+
if circuit_breaker_patterns not in SKIP_IN_PATH:
|
|
430
|
+
__path_parts = {
|
|
431
|
+
"circuit_breaker_patterns": _quote(circuit_breaker_patterns)
|
|
432
|
+
}
|
|
433
|
+
__path = f'/_cat/circuit_breaker/{__path_parts["circuit_breaker_patterns"]}'
|
|
434
|
+
else:
|
|
435
|
+
__path_parts = {}
|
|
436
|
+
__path = "/_cat/circuit_breaker"
|
|
437
|
+
__query: t.Dict[str, t.Any] = {}
|
|
438
|
+
if bytes is not None:
|
|
439
|
+
__query["bytes"] = bytes
|
|
440
|
+
if error_trace is not None:
|
|
441
|
+
__query["error_trace"] = error_trace
|
|
442
|
+
if filter_path is not None:
|
|
443
|
+
__query["filter_path"] = filter_path
|
|
444
|
+
if format is not None:
|
|
445
|
+
__query["format"] = format
|
|
446
|
+
if h is not None:
|
|
447
|
+
__query["h"] = h
|
|
448
|
+
if help is not None:
|
|
449
|
+
__query["help"] = help
|
|
450
|
+
if human is not None:
|
|
451
|
+
__query["human"] = human
|
|
452
|
+
if local is not None:
|
|
453
|
+
__query["local"] = local
|
|
454
|
+
if master_timeout is not None:
|
|
455
|
+
__query["master_timeout"] = master_timeout
|
|
456
|
+
if pretty is not None:
|
|
457
|
+
__query["pretty"] = pretty
|
|
458
|
+
if s is not None:
|
|
459
|
+
__query["s"] = s
|
|
460
|
+
if time is not None:
|
|
461
|
+
__query["time"] = time
|
|
462
|
+
if v is not None:
|
|
463
|
+
__query["v"] = v
|
|
464
|
+
__headers = {"accept": "text/plain,application/json"}
|
|
465
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
466
|
+
"GET",
|
|
467
|
+
__path,
|
|
468
|
+
params=__query,
|
|
469
|
+
headers=__headers,
|
|
470
|
+
endpoint_id="cat.circuit_breaker",
|
|
471
|
+
path_parts=__path_parts,
|
|
472
|
+
)
|
|
473
|
+
|
|
331
474
|
@_rewrite_parameters()
|
|
332
475
|
async def component_templates(
|
|
333
476
|
self,
|
|
@@ -468,7 +611,9 @@ class CatClient(NamespacedClient):
|
|
|
468
611
|
path_parts=__path_parts,
|
|
469
612
|
)
|
|
470
613
|
|
|
471
|
-
@_rewrite_parameters(
|
|
614
|
+
@_rewrite_parameters(
|
|
615
|
+
body_fields=("project_routing",),
|
|
616
|
+
)
|
|
472
617
|
async def count(
|
|
473
618
|
self,
|
|
474
619
|
*,
|
|
@@ -494,6 +639,7 @@ class CatClient(NamespacedClient):
|
|
|
494
639
|
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
495
640
|
] = None,
|
|
496
641
|
v: t.Optional[bool] = None,
|
|
642
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
497
643
|
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
|
|
498
644
|
"""
|
|
499
645
|
.. raw:: html
|
|
@@ -524,10 +670,10 @@ class CatClient(NamespacedClient):
|
|
|
524
670
|
wildcards.
|
|
525
671
|
:param help: When set to `true` will output available columns. This option can't
|
|
526
672
|
be combined with any other query string option.
|
|
527
|
-
:param project_routing: Specifies a subset of projects to target
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
_alias:
|
|
673
|
+
:param project_routing: Specifies a subset of projects to target using project
|
|
674
|
+
metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
|
|
675
|
+
the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
|
|
676
|
+
_alias:_origin _alias:*pr* Supported in serverless only.
|
|
531
677
|
:param s: List of columns that determine how the table should be sorted. Sorting
|
|
532
678
|
defaults to ascending and can be changed by setting `:asc` or `:desc` as
|
|
533
679
|
a suffix to the column name.
|
|
@@ -547,6 +693,7 @@ class CatClient(NamespacedClient):
|
|
|
547
693
|
__path_parts = {}
|
|
548
694
|
__path = "/_cat/count"
|
|
549
695
|
__query: t.Dict[str, t.Any] = {}
|
|
696
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
550
697
|
if bytes is not None:
|
|
551
698
|
__query["bytes"] = bytes
|
|
552
699
|
if error_trace is not None:
|
|
@@ -563,20 +710,26 @@ class CatClient(NamespacedClient):
|
|
|
563
710
|
__query["human"] = human
|
|
564
711
|
if pretty is not None:
|
|
565
712
|
__query["pretty"] = pretty
|
|
566
|
-
if project_routing is not None:
|
|
567
|
-
__query["project_routing"] = project_routing
|
|
568
713
|
if s is not None:
|
|
569
714
|
__query["s"] = s
|
|
570
715
|
if time is not None:
|
|
571
716
|
__query["time"] = time
|
|
572
717
|
if v is not None:
|
|
573
718
|
__query["v"] = v
|
|
719
|
+
if not __body:
|
|
720
|
+
if project_routing is not None:
|
|
721
|
+
__body["project_routing"] = project_routing
|
|
722
|
+
if not __body:
|
|
723
|
+
__body = None # type: ignore[assignment]
|
|
574
724
|
__headers = {"accept": "text/plain,application/json"}
|
|
725
|
+
if __body is not None:
|
|
726
|
+
__headers["content-type"] = "application/json"
|
|
575
727
|
return await self.perform_request( # type: ignore[return-value]
|
|
576
|
-
"
|
|
728
|
+
"POST",
|
|
577
729
|
__path,
|
|
578
730
|
params=__query,
|
|
579
731
|
headers=__headers,
|
|
732
|
+
body=__body,
|
|
580
733
|
endpoint_id="cat.count",
|
|
581
734
|
path_parts=__path_parts,
|
|
582
735
|
)
|
|
@@ -2516,6 +2669,7 @@ class CatClient(NamespacedClient):
|
|
|
2516
2669
|
t.Union[
|
|
2517
2670
|
str,
|
|
2518
2671
|
t.Literal[
|
|
2672
|
+
"available_processors",
|
|
2519
2673
|
"build",
|
|
2520
2674
|
"completion.size",
|
|
2521
2675
|
"cpu",
|
|
@@ -2611,6 +2765,7 @@ class CatClient(NamespacedClient):
|
|
|
2611
2765
|
t.Union[
|
|
2612
2766
|
str,
|
|
2613
2767
|
t.Literal[
|
|
2768
|
+
"available_processors",
|
|
2614
2769
|
"build",
|
|
2615
2770
|
"completion.size",
|
|
2616
2771
|
"cpu",
|
|
@@ -3308,10 +3463,20 @@ class CatClient(NamespacedClient):
|
|
|
3308
3463
|
self,
|
|
3309
3464
|
*,
|
|
3310
3465
|
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3466
|
+
allow_closed: t.Optional[bool] = None,
|
|
3467
|
+
allow_no_indices: t.Optional[bool] = None,
|
|
3311
3468
|
bytes: t.Optional[
|
|
3312
3469
|
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
|
|
3313
3470
|
] = None,
|
|
3314
3471
|
error_trace: t.Optional[bool] = None,
|
|
3472
|
+
expand_wildcards: t.Optional[
|
|
3473
|
+
t.Union[
|
|
3474
|
+
t.Sequence[
|
|
3475
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3476
|
+
],
|
|
3477
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3478
|
+
]
|
|
3479
|
+
] = None,
|
|
3315
3480
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3316
3481
|
format: t.Optional[str] = None,
|
|
3317
3482
|
h: t.Optional[
|
|
@@ -3362,6 +3527,8 @@ class CatClient(NamespacedClient):
|
|
|
3362
3527
|
] = None,
|
|
3363
3528
|
help: t.Optional[bool] = None,
|
|
3364
3529
|
human: t.Optional[bool] = None,
|
|
3530
|
+
ignore_throttled: t.Optional[bool] = None,
|
|
3531
|
+
ignore_unavailable: t.Optional[bool] = None,
|
|
3365
3532
|
local: t.Optional[bool] = None,
|
|
3366
3533
|
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3367
3534
|
pretty: t.Optional[bool] = None,
|
|
@@ -3385,6 +3552,14 @@ class CatClient(NamespacedClient):
|
|
|
3385
3552
|
:param index: A comma-separated list of data streams, indices, and aliases used
|
|
3386
3553
|
to limit the request. Supports wildcards (`*`). To target all data streams
|
|
3387
3554
|
and indices, omit this parameter or use `*` or `_all`.
|
|
3555
|
+
:param allow_closed: If true, allow closed indices to be returned in the response
|
|
3556
|
+
otherwise if false, keep the legacy behaviour of throwing an exception if
|
|
3557
|
+
index pattern matches closed indices
|
|
3558
|
+
:param allow_no_indices: If false, the request returns an error if any wildcard
|
|
3559
|
+
expression, index alias, or _all value targets only missing or closed indices.
|
|
3560
|
+
This behavior applies even if the request targets other open indices. For
|
|
3561
|
+
example, a request targeting foo*,bar* returns an error if an index starts
|
|
3562
|
+
with foo but no index starts with bar.
|
|
3388
3563
|
:param bytes: Sets the units for columns that contain a byte-size value. Note
|
|
3389
3564
|
that byte-size value units work in terms of powers of 1024. For instance
|
|
3390
3565
|
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
|
|
@@ -3393,12 +3568,20 @@ class CatClient(NamespacedClient):
|
|
|
3393
3568
|
least `1.0`. If given, byte-size values are rendered as an integer with no
|
|
3394
3569
|
suffix, representing the value of the column in the chosen unit. Values that
|
|
3395
3570
|
are not an exact multiple of the chosen unit are rounded down.
|
|
3571
|
+
:param expand_wildcards: Type of index that wildcard expressions can match. If
|
|
3572
|
+
the request can target data streams, this argument determines whether wildcard
|
|
3573
|
+
expressions match hidden data streams. Supports comma-separated values, such
|
|
3574
|
+
as open,hidden.
|
|
3396
3575
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
3397
3576
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
3398
3577
|
:param h: A comma-separated list of columns names to display. It supports simple
|
|
3399
3578
|
wildcards.
|
|
3400
3579
|
:param help: When set to `true` will output available columns. This option can't
|
|
3401
3580
|
be combined with any other query string option.
|
|
3581
|
+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
|
|
3582
|
+
when frozen.
|
|
3583
|
+
:param ignore_unavailable: If true, missing or closed indices are not included
|
|
3584
|
+
in the response.
|
|
3402
3585
|
:param local: If `true`, the request computes the list of selected nodes from
|
|
3403
3586
|
the local cluster state. If `false` the list of selected nodes are computed
|
|
3404
3587
|
from the cluster state of the master node. In both cases the coordinating
|
|
@@ -3423,10 +3606,16 @@ class CatClient(NamespacedClient):
|
|
|
3423
3606
|
__path_parts = {}
|
|
3424
3607
|
__path = "/_cat/segments"
|
|
3425
3608
|
__query: t.Dict[str, t.Any] = {}
|
|
3609
|
+
if allow_closed is not None:
|
|
3610
|
+
__query["allow_closed"] = allow_closed
|
|
3611
|
+
if allow_no_indices is not None:
|
|
3612
|
+
__query["allow_no_indices"] = allow_no_indices
|
|
3426
3613
|
if bytes is not None:
|
|
3427
3614
|
__query["bytes"] = bytes
|
|
3428
3615
|
if error_trace is not None:
|
|
3429
3616
|
__query["error_trace"] = error_trace
|
|
3617
|
+
if expand_wildcards is not None:
|
|
3618
|
+
__query["expand_wildcards"] = expand_wildcards
|
|
3430
3619
|
if filter_path is not None:
|
|
3431
3620
|
__query["filter_path"] = filter_path
|
|
3432
3621
|
if format is not None:
|
|
@@ -3437,6 +3626,10 @@ class CatClient(NamespacedClient):
|
|
|
3437
3626
|
__query["help"] = help
|
|
3438
3627
|
if human is not None:
|
|
3439
3628
|
__query["human"] = human
|
|
3629
|
+
if ignore_throttled is not None:
|
|
3630
|
+
__query["ignore_throttled"] = ignore_throttled
|
|
3631
|
+
if ignore_unavailable is not None:
|
|
3632
|
+
__query["ignore_unavailable"] = ignore_unavailable
|
|
3440
3633
|
if local is not None:
|
|
3441
3634
|
__query["local"] = local
|
|
3442
3635
|
if master_timeout is not None:
|
|
@@ -3868,7 +4061,7 @@ class CatClient(NamespacedClient):
|
|
|
3868
4061
|
)
|
|
3869
4062
|
|
|
3870
4063
|
@_rewrite_parameters()
|
|
3871
|
-
@
|
|
4064
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
3872
4065
|
async def tasks(
|
|
3873
4066
|
self,
|
|
3874
4067
|
*,
|
|
@@ -125,8 +125,8 @@ class CcrClient(NamespacedClient):
|
|
|
125
125
|
"""
|
|
126
126
|
.. raw:: html
|
|
127
127
|
|
|
128
|
-
<p>Create a follower
|
|
129
|
-
Create a cross-cluster replication follower index that follows a specific leader index.
|
|
128
|
+
<p>Create a follower.</p>
|
|
129
|
+
<p>Create a cross-cluster replication follower index that follows a specific leader index.
|
|
130
130
|
When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.</p>
|
|
131
131
|
|
|
132
132
|
|
|
@@ -368,8 +368,8 @@ class CcrClient(NamespacedClient):
|
|
|
368
368
|
"""
|
|
369
369
|
.. raw:: html
|
|
370
370
|
|
|
371
|
-
<p>Forget a follower
|
|
372
|
-
Remove the cross-cluster replication follower retention leases from the leader.</p>
|
|
371
|
+
<p>Forget a follower.</p>
|
|
372
|
+
<p>Remove the cross-cluster replication follower retention leases from the leader.</p>
|
|
373
373
|
<p>A following index takes out retention leases on its leader index.
|
|
374
374
|
These leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication.
|
|
375
375
|
When a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed.
|
|
@@ -382,7 +382,7 @@ class CcrClient(NamespacedClient):
|
|
|
382
382
|
|
|
383
383
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower>`_
|
|
384
384
|
|
|
385
|
-
:param index:
|
|
385
|
+
:param index: Name of the leader index for which specified follower retention
|
|
386
386
|
leases should be removed
|
|
387
387
|
:param follower_cluster:
|
|
388
388
|
:param follower_index:
|
|
@@ -640,8 +640,8 @@ class CcrClient(NamespacedClient):
|
|
|
640
640
|
"""
|
|
641
641
|
.. raw:: html
|
|
642
642
|
|
|
643
|
-
<p>Create or update auto-follow patterns
|
|
644
|
-
Create a collection of cross-cluster replication auto-follow patterns for a remote cluster.
|
|
643
|
+
<p>Create or update auto-follow patterns.</p>
|
|
644
|
+
<p>Create a collection of cross-cluster replication auto-follow patterns for a remote cluster.
|
|
645
645
|
Newly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices.
|
|
646
646
|
Indices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern.</p>
|
|
647
647
|
<p>This API can also be used to update auto-follow patterns.
|
|
@@ -853,8 +853,8 @@ class CcrClient(NamespacedClient):
|
|
|
853
853
|
"""
|
|
854
854
|
.. raw:: html
|
|
855
855
|
|
|
856
|
-
<p>Resume a follower
|
|
857
|
-
Resume a cross-cluster replication follower index that was paused.
|
|
856
|
+
<p>Resume a follower.</p>
|
|
857
|
+
<p>Resume a cross-cluster replication follower index that was paused.
|
|
858
858
|
The follower index could have been paused with the pause follower API.
|
|
859
859
|
Alternatively it could be paused due to replication that cannot be retried due to failures during following tasks.
|
|
860
860
|
When this API returns, the follower index will resume fetching operations from the leader index.</p>
|
|
@@ -862,7 +862,7 @@ class CcrClient(NamespacedClient):
|
|
|
862
862
|
|
|
863
863
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow>`_
|
|
864
864
|
|
|
865
|
-
:param index:
|
|
865
|
+
:param index: Name of the follow index to resume following
|
|
866
866
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
867
867
|
:param max_outstanding_read_requests:
|
|
868
868
|
:param max_outstanding_write_requests:
|