elasticsearch 8.15.1__py3-none-any.whl → 8.17.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 +237 -120
- elasticsearch/_async/client/async_search.py +33 -43
- elasticsearch/_async/client/autoscaling.py +59 -11
- elasticsearch/_async/client/cat.py +75 -66
- elasticsearch/_async/client/ccr.py +85 -35
- elasticsearch/_async/client/cluster.py +165 -70
- elasticsearch/_async/client/connector.py +112 -51
- elasticsearch/_async/client/dangling_indices.py +27 -12
- elasticsearch/_async/client/enrich.py +11 -11
- elasticsearch/_async/client/eql.py +13 -11
- elasticsearch/_async/client/esql.py +44 -5
- elasticsearch/_async/client/features.py +29 -6
- elasticsearch/_async/client/fleet.py +10 -2
- elasticsearch/_async/client/graph.py +9 -3
- elasticsearch/_async/client/ilm.py +74 -35
- elasticsearch/_async/client/indices.py +422 -152
- elasticsearch/_async/client/inference.py +4 -4
- elasticsearch/_async/client/ingest.py +47 -26
- elasticsearch/_async/client/license.py +38 -22
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +346 -291
- elasticsearch/_async/client/monitoring.py +1 -1
- elasticsearch/_async/client/nodes.py +43 -21
- elasticsearch/_async/client/query_rules.py +69 -15
- elasticsearch/_async/client/rollup.py +23 -9
- elasticsearch/_async/client/search_application.py +35 -16
- elasticsearch/_async/client/searchable_snapshots.py +13 -5
- elasticsearch/_async/client/security.py +378 -180
- elasticsearch/_async/client/slm.py +9 -9
- elasticsearch/_async/client/snapshot.py +97 -12
- elasticsearch/_async/client/sql.py +21 -16
- elasticsearch/_async/client/ssl.py +18 -3
- elasticsearch/_async/client/synonyms.py +17 -14
- elasticsearch/_async/client/tasks.py +19 -9
- elasticsearch/_async/client/text_structure.py +2 -2
- elasticsearch/_async/client/transform.py +78 -72
- elasticsearch/_async/client/utils.py +4 -0
- elasticsearch/_async/client/watcher.py +11 -11
- elasticsearch/_async/client/xpack.py +5 -3
- elasticsearch/_async/helpers.py +19 -10
- elasticsearch/_otel.py +2 -2
- elasticsearch/_sync/client/__init__.py +237 -120
- elasticsearch/_sync/client/async_search.py +33 -43
- elasticsearch/_sync/client/autoscaling.py +59 -11
- elasticsearch/_sync/client/cat.py +75 -66
- elasticsearch/_sync/client/ccr.py +85 -35
- elasticsearch/_sync/client/cluster.py +165 -70
- elasticsearch/_sync/client/connector.py +112 -51
- elasticsearch/_sync/client/dangling_indices.py +27 -12
- elasticsearch/_sync/client/enrich.py +11 -11
- elasticsearch/_sync/client/eql.py +13 -11
- elasticsearch/_sync/client/esql.py +44 -5
- elasticsearch/_sync/client/features.py +29 -6
- elasticsearch/_sync/client/fleet.py +10 -2
- elasticsearch/_sync/client/graph.py +9 -3
- elasticsearch/_sync/client/ilm.py +74 -35
- elasticsearch/_sync/client/indices.py +422 -152
- elasticsearch/_sync/client/inference.py +4 -4
- elasticsearch/_sync/client/ingest.py +47 -26
- elasticsearch/_sync/client/license.py +38 -22
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +346 -291
- elasticsearch/_sync/client/monitoring.py +1 -1
- elasticsearch/_sync/client/nodes.py +43 -21
- elasticsearch/_sync/client/query_rules.py +69 -15
- elasticsearch/_sync/client/rollup.py +23 -9
- elasticsearch/_sync/client/search_application.py +35 -16
- elasticsearch/_sync/client/searchable_snapshots.py +13 -5
- elasticsearch/_sync/client/security.py +378 -180
- elasticsearch/_sync/client/slm.py +9 -9
- elasticsearch/_sync/client/snapshot.py +97 -12
- elasticsearch/_sync/client/sql.py +21 -16
- elasticsearch/_sync/client/ssl.py +18 -3
- elasticsearch/_sync/client/synonyms.py +17 -14
- elasticsearch/_sync/client/tasks.py +19 -9
- elasticsearch/_sync/client/text_structure.py +2 -2
- elasticsearch/_sync/client/transform.py +78 -72
- elasticsearch/_sync/client/utils.py +40 -0
- elasticsearch/_sync/client/watcher.py +11 -11
- elasticsearch/_sync/client/xpack.py +5 -3
- elasticsearch/_version.py +1 -1
- elasticsearch/exceptions.py +4 -0
- elasticsearch/helpers/actions.py +19 -10
- elasticsearch/helpers/errors.py +12 -4
- elasticsearch/helpers/vectorstore/_async/strategies.py +30 -9
- elasticsearch/helpers/vectorstore/_sync/strategies.py +30 -9
- {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/METADATA +4 -3
- elasticsearch-8.17.0.dist-info/RECORD +117 -0
- {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/WHEEL +1 -1
- elasticsearch-8.15.1.dist-info/RECORD +0 -117
- {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -36,13 +36,13 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
Delete an async search. If the asynchronous search is still running, it is cancelled.
|
|
40
|
+
Otherwise, the saved search results are deleted. If the Elasticsearch security
|
|
41
|
+
features are enabled, the deletion of a specific async search is restricted to:
|
|
42
|
+
the authenticated user that submitted the original search request; users that
|
|
43
|
+
have the `cancel_task` cluster privilege.
|
|
44
44
|
|
|
45
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
45
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
|
|
46
46
|
|
|
47
47
|
:param id: A unique identifier for the async search.
|
|
48
48
|
"""
|
|
@@ -85,12 +85,12 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
85
85
|
] = None,
|
|
86
86
|
) -> ObjectApiResponse[t.Any]:
|
|
87
87
|
"""
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
results of a specific async search is restricted to the user or API key that
|
|
88
|
+
Get async search results. Retrieve the results of a previously submitted asynchronous
|
|
89
|
+
search request. If the Elasticsearch security features are enabled, access to
|
|
90
|
+
the results of a specific async search is restricted to the user or API key that
|
|
91
91
|
submitted it.
|
|
92
92
|
|
|
93
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
93
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
|
|
94
94
|
|
|
95
95
|
:param id: A unique identifier for the async search.
|
|
96
96
|
:param keep_alive: Specifies how long the async search should be available in
|
|
@@ -145,17 +145,21 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
145
145
|
error_trace: t.Optional[bool] = None,
|
|
146
146
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
147
147
|
human: t.Optional[bool] = None,
|
|
148
|
+
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
148
149
|
pretty: t.Optional[bool] = None,
|
|
149
150
|
) -> ObjectApiResponse[t.Any]:
|
|
150
151
|
"""
|
|
151
|
-
Get async search status
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
Get the async search status. Get the status of a previously submitted async search
|
|
153
|
+
request given its identifier, without retrieving search results. If the Elasticsearch
|
|
154
|
+
security features are enabled, use of this API is restricted to the `monitoring_user`
|
|
155
|
+
role.
|
|
155
156
|
|
|
156
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
157
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
|
|
157
158
|
|
|
158
159
|
:param id: A unique identifier for the async search.
|
|
160
|
+
:param keep_alive: Specifies how long the async search needs to be available.
|
|
161
|
+
Ongoing async searches and any saved search results are deleted after this
|
|
162
|
+
period.
|
|
159
163
|
"""
|
|
160
164
|
if id in SKIP_IN_PATH:
|
|
161
165
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -168,6 +172,8 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
168
172
|
__query["filter_path"] = filter_path
|
|
169
173
|
if human is not None:
|
|
170
174
|
__query["human"] = human
|
|
175
|
+
if keep_alive is not None:
|
|
176
|
+
__query["keep_alive"] = keep_alive
|
|
171
177
|
if pretty is not None:
|
|
172
178
|
__query["pretty"] = pretty
|
|
173
179
|
__headers = {"accept": "application/json"}
|
|
@@ -258,7 +264,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
258
264
|
ignore_throttled: t.Optional[bool] = None,
|
|
259
265
|
ignore_unavailable: t.Optional[bool] = None,
|
|
260
266
|
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
|
|
261
|
-
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
262
267
|
keep_on_completion: t.Optional[bool] = None,
|
|
263
268
|
knn: t.Optional[
|
|
264
269
|
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
@@ -269,7 +274,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
269
274
|
min_score: t.Optional[float] = None,
|
|
270
275
|
pit: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
271
276
|
post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
272
|
-
pre_filter_shard_size: t.Optional[int] = None,
|
|
273
277
|
preference: t.Optional[str] = None,
|
|
274
278
|
pretty: t.Optional[bool] = None,
|
|
275
279
|
profile: t.Optional[bool] = None,
|
|
@@ -283,7 +287,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
283
287
|
routing: t.Optional[str] = None,
|
|
284
288
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
285
289
|
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
286
|
-
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
287
290
|
search_after: t.Optional[
|
|
288
291
|
t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
|
|
289
292
|
] = None,
|
|
@@ -323,17 +326,17 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
323
326
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
324
327
|
) -> ObjectApiResponse[t.Any]:
|
|
325
328
|
"""
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
329
|
+
Run an async search. When the primary sort of the results is an indexed field,
|
|
330
|
+
shards get sorted based on minimum and maximum value that they hold for that
|
|
331
|
+
field. Partial results become available following the sort criteria that was
|
|
332
|
+
requested. Warning: Asynchronous search does not support scroll or search requests
|
|
333
|
+
that include only the suggest section. By default, Elasticsearch does not allow
|
|
334
|
+
you to store an async search response larger than 10Mb and an attempt to do this
|
|
335
|
+
results in an error. The maximum allowed size for a stored async search response
|
|
336
|
+
can be set by changing the `search.max_async_search_response_size` cluster level
|
|
337
|
+
setting.
|
|
335
338
|
|
|
336
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
339
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/async-search.html>`_
|
|
337
340
|
|
|
338
341
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
339
342
|
empty string to perform the operation on all indices
|
|
@@ -376,9 +379,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
376
379
|
:param ignore_unavailable: Whether specified concrete indices should be ignored
|
|
377
380
|
when unavailable (missing or closed)
|
|
378
381
|
:param indices_boost: Boosts the _score of documents from specified indices.
|
|
379
|
-
:param keep_alive: Specifies how long the async search needs to be available.
|
|
380
|
-
Ongoing async searches and any saved search results are deleted after this
|
|
381
|
-
period.
|
|
382
382
|
:param keep_on_completion: If `true`, results are stored for later retrieval
|
|
383
383
|
when the search completes within the `wait_for_completion_timeout`.
|
|
384
384
|
:param knn: Defines the approximate kNN search to run.
|
|
@@ -394,10 +394,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
394
394
|
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
|
|
395
395
|
you cannot specify an <index> in the request path.
|
|
396
396
|
:param post_filter:
|
|
397
|
-
:param pre_filter_shard_size: The default value cannot be changed, which enforces
|
|
398
|
-
the execution of a pre-filter roundtrip to retrieve statistics from each
|
|
399
|
-
shard so that the ones that surely don’t hold any document matching the query
|
|
400
|
-
get skipped.
|
|
401
397
|
:param preference: Specify the node or shard the operation should be performed
|
|
402
398
|
on (default: random)
|
|
403
399
|
:param profile:
|
|
@@ -406,13 +402,13 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
406
402
|
:param request_cache: Specify if request cache should be used for this request
|
|
407
403
|
or not, defaults to true
|
|
408
404
|
:param rescore:
|
|
409
|
-
:param rest_total_hits_as_int:
|
|
405
|
+
:param rest_total_hits_as_int: Indicates whether hits.total should be rendered
|
|
406
|
+
as an integer or an object in the rest search response
|
|
410
407
|
:param routing: A comma-separated list of specific routing values
|
|
411
408
|
:param runtime_mappings: Defines one or more runtime fields in the search request.
|
|
412
409
|
These fields take precedence over mapped fields with the same name.
|
|
413
410
|
:param script_fields: Retrieve a script evaluation (based on different fields)
|
|
414
411
|
for each hit.
|
|
415
|
-
:param scroll:
|
|
416
412
|
:param search_after:
|
|
417
413
|
:param search_type: Search operation type
|
|
418
414
|
:param seq_no_primary_term: If true, returns sequence number and primary term
|
|
@@ -509,8 +505,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
509
505
|
__query["ignore_throttled"] = ignore_throttled
|
|
510
506
|
if ignore_unavailable is not None:
|
|
511
507
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
512
|
-
if keep_alive is not None:
|
|
513
|
-
__query["keep_alive"] = keep_alive
|
|
514
508
|
if keep_on_completion is not None:
|
|
515
509
|
__query["keep_on_completion"] = keep_on_completion
|
|
516
510
|
if lenient is not None:
|
|
@@ -519,8 +513,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
519
513
|
__query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
|
|
520
514
|
if min_compatible_shard_node is not None:
|
|
521
515
|
__query["min_compatible_shard_node"] = min_compatible_shard_node
|
|
522
|
-
if pre_filter_shard_size is not None:
|
|
523
|
-
__query["pre_filter_shard_size"] = pre_filter_shard_size
|
|
524
516
|
if preference is not None:
|
|
525
517
|
__query["preference"] = preference
|
|
526
518
|
if pretty is not None:
|
|
@@ -533,8 +525,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
533
525
|
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
|
|
534
526
|
if routing is not None:
|
|
535
527
|
__query["routing"] = routing
|
|
536
|
-
if scroll is not None:
|
|
537
|
-
__query["scroll"] = scroll
|
|
538
528
|
if search_type is not None:
|
|
539
529
|
__query["search_type"] = search_type
|
|
540
530
|
if source_excludes is not None:
|
|
@@ -33,15 +33,23 @@ class AutoscalingClient(NamespacedClient):
|
|
|
33
33
|
error_trace: t.Optional[bool] = None,
|
|
34
34
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
35
35
|
human: t.Optional[bool] = None,
|
|
36
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
36
37
|
pretty: t.Optional[bool] = None,
|
|
38
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
37
39
|
) -> ObjectApiResponse[t.Any]:
|
|
38
40
|
"""
|
|
39
|
-
|
|
41
|
+
Delete an autoscaling policy. NOTE: This feature is designed for indirect use
|
|
42
|
+
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
|
|
40
43
|
Direct use is not supported.
|
|
41
44
|
|
|
42
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
45
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-delete-autoscaling-policy.html>`_
|
|
43
46
|
|
|
44
47
|
:param name: the name of the autoscaling policy
|
|
48
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
49
|
+
no response is received before the timeout expires, the request fails and
|
|
50
|
+
returns an error.
|
|
51
|
+
:param timeout: Period to wait for a response. If no response is received before
|
|
52
|
+
the timeout expires, the request fails and returns an error.
|
|
45
53
|
"""
|
|
46
54
|
if name in SKIP_IN_PATH:
|
|
47
55
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -54,8 +62,12 @@ class AutoscalingClient(NamespacedClient):
|
|
|
54
62
|
__query["filter_path"] = filter_path
|
|
55
63
|
if human is not None:
|
|
56
64
|
__query["human"] = human
|
|
65
|
+
if master_timeout is not None:
|
|
66
|
+
__query["master_timeout"] = master_timeout
|
|
57
67
|
if pretty is not None:
|
|
58
68
|
__query["pretty"] = pretty
|
|
69
|
+
if timeout is not None:
|
|
70
|
+
__query["timeout"] = timeout
|
|
59
71
|
__headers = {"accept": "application/json"}
|
|
60
72
|
return await self.perform_request( # type: ignore[return-value]
|
|
61
73
|
"DELETE",
|
|
@@ -73,13 +85,28 @@ class AutoscalingClient(NamespacedClient):
|
|
|
73
85
|
error_trace: t.Optional[bool] = None,
|
|
74
86
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
75
87
|
human: t.Optional[bool] = None,
|
|
88
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
76
89
|
pretty: t.Optional[bool] = None,
|
|
77
90
|
) -> ObjectApiResponse[t.Any]:
|
|
78
91
|
"""
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
Get the autoscaling capacity. NOTE: This feature is designed for indirect use
|
|
93
|
+
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
|
|
94
|
+
Direct use is not supported. This API gets the current autoscaling capacity based
|
|
95
|
+
on the configured autoscaling policy. It will return information to size the
|
|
96
|
+
cluster appropriately to the current workload. The `required_capacity` is calculated
|
|
97
|
+
as the maximum of the `required_capacity` result of all individual deciders that
|
|
98
|
+
are enabled for the policy. The operator should verify that the `current_nodes`
|
|
99
|
+
match the operator’s knowledge of the cluster to avoid making autoscaling decisions
|
|
100
|
+
based on stale or incomplete information. The response contains decider-specific
|
|
101
|
+
information you can use to diagnose how and why autoscaling determined a certain
|
|
102
|
+
capacity was required. This information is provided for diagnosis only. Do not
|
|
103
|
+
use this information to make autoscaling decisions.
|
|
104
|
+
|
|
105
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
|
|
106
|
+
|
|
107
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
108
|
+
no response is received before the timeout expires, the request fails and
|
|
109
|
+
returns an error.
|
|
83
110
|
"""
|
|
84
111
|
__path_parts: t.Dict[str, str] = {}
|
|
85
112
|
__path = "/_autoscaling/capacity"
|
|
@@ -90,6 +117,8 @@ class AutoscalingClient(NamespacedClient):
|
|
|
90
117
|
__query["filter_path"] = filter_path
|
|
91
118
|
if human is not None:
|
|
92
119
|
__query["human"] = human
|
|
120
|
+
if master_timeout is not None:
|
|
121
|
+
__query["master_timeout"] = master_timeout
|
|
93
122
|
if pretty is not None:
|
|
94
123
|
__query["pretty"] = pretty
|
|
95
124
|
__headers = {"accept": "application/json"}
|
|
@@ -110,15 +139,20 @@ class AutoscalingClient(NamespacedClient):
|
|
|
110
139
|
error_trace: t.Optional[bool] = None,
|
|
111
140
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
112
141
|
human: t.Optional[bool] = None,
|
|
142
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
113
143
|
pretty: t.Optional[bool] = None,
|
|
114
144
|
) -> ObjectApiResponse[t.Any]:
|
|
115
145
|
"""
|
|
116
|
-
|
|
146
|
+
Get an autoscaling policy. NOTE: This feature is designed for indirect use by
|
|
147
|
+
Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
|
|
117
148
|
Direct use is not supported.
|
|
118
149
|
|
|
119
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
150
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-get-autoscaling-capacity.html>`_
|
|
120
151
|
|
|
121
152
|
:param name: the name of the autoscaling policy
|
|
153
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
154
|
+
no response is received before the timeout expires, the request fails and
|
|
155
|
+
returns an error.
|
|
122
156
|
"""
|
|
123
157
|
if name in SKIP_IN_PATH:
|
|
124
158
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -131,6 +165,8 @@ class AutoscalingClient(NamespacedClient):
|
|
|
131
165
|
__query["filter_path"] = filter_path
|
|
132
166
|
if human is not None:
|
|
133
167
|
__query["human"] = human
|
|
168
|
+
if master_timeout is not None:
|
|
169
|
+
__query["master_timeout"] = master_timeout
|
|
134
170
|
if pretty is not None:
|
|
135
171
|
__query["pretty"] = pretty
|
|
136
172
|
__headers = {"accept": "application/json"}
|
|
@@ -155,16 +191,24 @@ class AutoscalingClient(NamespacedClient):
|
|
|
155
191
|
error_trace: t.Optional[bool] = None,
|
|
156
192
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
157
193
|
human: t.Optional[bool] = None,
|
|
194
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
158
195
|
pretty: t.Optional[bool] = None,
|
|
196
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
159
197
|
) -> ObjectApiResponse[t.Any]:
|
|
160
198
|
"""
|
|
161
|
-
|
|
162
|
-
|
|
199
|
+
Create or update an autoscaling policy. NOTE: This feature is designed for indirect
|
|
200
|
+
use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on
|
|
201
|
+
Kubernetes. Direct use is not supported.
|
|
163
202
|
|
|
164
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
203
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/autoscaling-put-autoscaling-policy.html>`_
|
|
165
204
|
|
|
166
205
|
:param name: the name of the autoscaling policy
|
|
167
206
|
:param policy:
|
|
207
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
208
|
+
no response is received before the timeout expires, the request fails and
|
|
209
|
+
returns an error.
|
|
210
|
+
:param timeout: Period to wait for a response. If no response is received before
|
|
211
|
+
the timeout expires, the request fails and returns an error.
|
|
168
212
|
"""
|
|
169
213
|
if name in SKIP_IN_PATH:
|
|
170
214
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -183,8 +227,12 @@ class AutoscalingClient(NamespacedClient):
|
|
|
183
227
|
__query["filter_path"] = filter_path
|
|
184
228
|
if human is not None:
|
|
185
229
|
__query["human"] = human
|
|
230
|
+
if master_timeout is not None:
|
|
231
|
+
__query["master_timeout"] = master_timeout
|
|
186
232
|
if pretty is not None:
|
|
187
233
|
__query["pretty"] = pretty
|
|
234
|
+
if timeout is not None:
|
|
235
|
+
__query["timeout"] = timeout
|
|
188
236
|
__body = policy if policy is not None else body
|
|
189
237
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
190
238
|
return await self.perform_request( # type: ignore[return-value]
|