elasticsearch 8.17.0__py3-none-any.whl → 8.17.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +153 -51
- elasticsearch/_async/client/cat.py +64 -195
- elasticsearch/_async/client/cluster.py +19 -19
- elasticsearch/_async/client/connector.py +337 -0
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/ilm.py +6 -6
- elasticsearch/_async/client/indices.py +360 -81
- elasticsearch/_async/client/inference.py +94 -1
- elasticsearch/_async/client/ingest.py +175 -2
- elasticsearch/_async/client/logstash.py +9 -6
- elasticsearch/_async/client/migration.py +16 -7
- elasticsearch/_async/client/ml.py +12 -6
- elasticsearch/_async/client/monitoring.py +2 -1
- elasticsearch/_async/client/nodes.py +3 -3
- elasticsearch/_async/client/query_rules.py +33 -12
- elasticsearch/_async/client/rollup.py +88 -13
- elasticsearch/_async/client/search_application.py +130 -1
- elasticsearch/_async/client/searchable_snapshots.py +32 -23
- elasticsearch/_async/client/security.py +676 -55
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +138 -19
- elasticsearch/_async/client/snapshot.py +307 -23
- elasticsearch/_async/client/sql.py +66 -46
- elasticsearch/_async/client/synonyms.py +39 -19
- elasticsearch/_async/client/tasks.py +68 -28
- elasticsearch/_async/client/text_structure.py +466 -46
- elasticsearch/_async/client/transform.py +9 -2
- elasticsearch/_async/client/watcher.py +207 -41
- elasticsearch/_async/client/xpack.py +11 -6
- elasticsearch/_sync/client/__init__.py +153 -51
- elasticsearch/_sync/client/cat.py +64 -195
- elasticsearch/_sync/client/cluster.py +19 -19
- elasticsearch/_sync/client/connector.py +337 -0
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/ilm.py +6 -6
- elasticsearch/_sync/client/indices.py +360 -81
- elasticsearch/_sync/client/inference.py +94 -1
- elasticsearch/_sync/client/ingest.py +175 -2
- elasticsearch/_sync/client/logstash.py +9 -6
- elasticsearch/_sync/client/migration.py +16 -7
- elasticsearch/_sync/client/ml.py +12 -6
- elasticsearch/_sync/client/monitoring.py +2 -1
- elasticsearch/_sync/client/nodes.py +3 -3
- elasticsearch/_sync/client/query_rules.py +33 -12
- elasticsearch/_sync/client/rollup.py +88 -13
- elasticsearch/_sync/client/search_application.py +130 -1
- elasticsearch/_sync/client/searchable_snapshots.py +32 -23
- elasticsearch/_sync/client/security.py +676 -55
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +138 -19
- elasticsearch/_sync/client/snapshot.py +307 -23
- elasticsearch/_sync/client/sql.py +66 -46
- elasticsearch/_sync/client/synonyms.py +39 -19
- elasticsearch/_sync/client/tasks.py +68 -28
- elasticsearch/_sync/client/text_structure.py +466 -46
- elasticsearch/_sync/client/transform.py +9 -2
- elasticsearch/_sync/client/watcher.py +207 -41
- elasticsearch/_sync/client/xpack.py +11 -6
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +1 -1
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- elasticsearch-8.17.0.dist-info/RECORD +0 -117
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -255,7 +255,21 @@ class InferenceClient(NamespacedClient):
|
|
|
255
255
|
pretty: t.Optional[bool] = None,
|
|
256
256
|
) -> ObjectApiResponse[t.Any]:
|
|
257
257
|
"""
|
|
258
|
-
Create an inference endpoint
|
|
258
|
+
Create an inference endpoint. When you create an inference endpoint, the associated
|
|
259
|
+
machine learning model is automatically deployed if it is not already running.
|
|
260
|
+
After creating the endpoint, wait for the model deployment to complete before
|
|
261
|
+
using it. To verify the deployment status, use the get trained model statistics
|
|
262
|
+
API. Look for `"state": "fully_allocated"` in the response and ensure that the
|
|
263
|
+
`"allocation_count"` matches the `"target_allocation_count"`. Avoid creating
|
|
264
|
+
multiple endpoints for the same model unless required, as each endpoint consumes
|
|
265
|
+
significant resources. IMPORTANT: The inference APIs enable you to use certain
|
|
266
|
+
services, such as built-in machine learning models (ELSER, E5), models uploaded
|
|
267
|
+
through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google
|
|
268
|
+
Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models
|
|
269
|
+
uploaded through Eland, the inference APIs offer an alternative way to use and
|
|
270
|
+
manage trained models. However, if you do not plan to use the inference APIs
|
|
271
|
+
to use these models or if you want to use non-NLP models, use the machine learning
|
|
272
|
+
trained model APIs.
|
|
259
273
|
|
|
260
274
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-inference-api.html>`_
|
|
261
275
|
|
|
@@ -303,3 +317,82 @@ class InferenceClient(NamespacedClient):
|
|
|
303
317
|
endpoint_id="inference.put",
|
|
304
318
|
path_parts=__path_parts,
|
|
305
319
|
)
|
|
320
|
+
|
|
321
|
+
@_rewrite_parameters(
|
|
322
|
+
body_name="inference_config",
|
|
323
|
+
)
|
|
324
|
+
async def update(
|
|
325
|
+
self,
|
|
326
|
+
*,
|
|
327
|
+
inference_id: str,
|
|
328
|
+
inference_config: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
329
|
+
body: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
330
|
+
task_type: t.Optional[
|
|
331
|
+
t.Union[
|
|
332
|
+
str,
|
|
333
|
+
t.Literal["completion", "rerank", "sparse_embedding", "text_embedding"],
|
|
334
|
+
]
|
|
335
|
+
] = None,
|
|
336
|
+
error_trace: t.Optional[bool] = None,
|
|
337
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
338
|
+
human: t.Optional[bool] = None,
|
|
339
|
+
pretty: t.Optional[bool] = None,
|
|
340
|
+
) -> ObjectApiResponse[t.Any]:
|
|
341
|
+
"""
|
|
342
|
+
Update an inference endpoint. Modify `task_settings`, secrets (within `service_settings`),
|
|
343
|
+
or `num_allocations` for an inference endpoint, depending on the specific endpoint
|
|
344
|
+
service and `task_type`. IMPORTANT: The inference APIs enable you to use certain
|
|
345
|
+
services, such as built-in machine learning models (ELSER, E5), models uploaded
|
|
346
|
+
through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic,
|
|
347
|
+
Watsonx.ai, or Hugging Face. For built-in models and models uploaded through
|
|
348
|
+
Eland, the inference APIs offer an alternative way to use and manage trained
|
|
349
|
+
models. However, if you do not plan to use the inference APIs to use these models
|
|
350
|
+
or if you want to use non-NLP models, use the machine learning trained model
|
|
351
|
+
APIs.
|
|
352
|
+
|
|
353
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-inference-api.html>`_
|
|
354
|
+
|
|
355
|
+
:param inference_id: The unique identifier of the inference endpoint.
|
|
356
|
+
:param inference_config:
|
|
357
|
+
:param task_type: The type of inference task that the model performs.
|
|
358
|
+
"""
|
|
359
|
+
if inference_id in SKIP_IN_PATH:
|
|
360
|
+
raise ValueError("Empty value passed for parameter 'inference_id'")
|
|
361
|
+
if inference_config is None and body is None:
|
|
362
|
+
raise ValueError(
|
|
363
|
+
"Empty value passed for parameters 'inference_config' and 'body', one of them should be set."
|
|
364
|
+
)
|
|
365
|
+
elif inference_config is not None and body is not None:
|
|
366
|
+
raise ValueError("Cannot set both 'inference_config' and 'body'")
|
|
367
|
+
__path_parts: t.Dict[str, str]
|
|
368
|
+
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
|
|
369
|
+
__path_parts = {
|
|
370
|
+
"task_type": _quote(task_type),
|
|
371
|
+
"inference_id": _quote(inference_id),
|
|
372
|
+
}
|
|
373
|
+
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}/_update'
|
|
374
|
+
elif inference_id not in SKIP_IN_PATH:
|
|
375
|
+
__path_parts = {"inference_id": _quote(inference_id)}
|
|
376
|
+
__path = f'/_inference/{__path_parts["inference_id"]}/_update'
|
|
377
|
+
else:
|
|
378
|
+
raise ValueError("Couldn't find a path for the given parameters")
|
|
379
|
+
__query: t.Dict[str, t.Any] = {}
|
|
380
|
+
if error_trace is not None:
|
|
381
|
+
__query["error_trace"] = error_trace
|
|
382
|
+
if filter_path is not None:
|
|
383
|
+
__query["filter_path"] = filter_path
|
|
384
|
+
if human is not None:
|
|
385
|
+
__query["human"] = human
|
|
386
|
+
if pretty is not None:
|
|
387
|
+
__query["pretty"] = pretty
|
|
388
|
+
__body = inference_config if inference_config is not None else body
|
|
389
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
390
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
391
|
+
"POST",
|
|
392
|
+
__path,
|
|
393
|
+
params=__query,
|
|
394
|
+
headers=__headers,
|
|
395
|
+
body=__body,
|
|
396
|
+
endpoint_id="inference.update",
|
|
397
|
+
path_parts=__path_parts,
|
|
398
|
+
)
|
|
@@ -77,6 +77,59 @@ class IngestClient(NamespacedClient):
|
|
|
77
77
|
path_parts=__path_parts,
|
|
78
78
|
)
|
|
79
79
|
|
|
80
|
+
@_rewrite_parameters()
|
|
81
|
+
async def delete_ip_location_database(
|
|
82
|
+
self,
|
|
83
|
+
*,
|
|
84
|
+
id: t.Union[str, t.Sequence[str]],
|
|
85
|
+
error_trace: t.Optional[bool] = None,
|
|
86
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
87
|
+
human: t.Optional[bool] = None,
|
|
88
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
89
|
+
pretty: t.Optional[bool] = None,
|
|
90
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
91
|
+
) -> ObjectApiResponse[t.Any]:
|
|
92
|
+
"""
|
|
93
|
+
Delete IP geolocation database configurations.
|
|
94
|
+
|
|
95
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-ip-location-database-api.html>`_
|
|
96
|
+
|
|
97
|
+
:param id: A comma-separated list of IP location database configurations.
|
|
98
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
99
|
+
If no response is received before the timeout expires, the request fails
|
|
100
|
+
and returns an error. A value of `-1` indicates that the request should never
|
|
101
|
+
time out.
|
|
102
|
+
:param timeout: The period to wait for a response. If no response is received
|
|
103
|
+
before the timeout expires, the request fails and returns an error. A value
|
|
104
|
+
of `-1` indicates that the request should never time out.
|
|
105
|
+
"""
|
|
106
|
+
if id in SKIP_IN_PATH:
|
|
107
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
108
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
109
|
+
__path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
|
|
110
|
+
__query: t.Dict[str, t.Any] = {}
|
|
111
|
+
if error_trace is not None:
|
|
112
|
+
__query["error_trace"] = error_trace
|
|
113
|
+
if filter_path is not None:
|
|
114
|
+
__query["filter_path"] = filter_path
|
|
115
|
+
if human is not None:
|
|
116
|
+
__query["human"] = human
|
|
117
|
+
if master_timeout is not None:
|
|
118
|
+
__query["master_timeout"] = master_timeout
|
|
119
|
+
if pretty is not None:
|
|
120
|
+
__query["pretty"] = pretty
|
|
121
|
+
if timeout is not None:
|
|
122
|
+
__query["timeout"] = timeout
|
|
123
|
+
__headers = {"accept": "application/json"}
|
|
124
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
125
|
+
"DELETE",
|
|
126
|
+
__path,
|
|
127
|
+
params=__query,
|
|
128
|
+
headers=__headers,
|
|
129
|
+
endpoint_id="ingest.delete_ip_location_database",
|
|
130
|
+
path_parts=__path_parts,
|
|
131
|
+
)
|
|
132
|
+
|
|
80
133
|
@_rewrite_parameters()
|
|
81
134
|
async def delete_pipeline(
|
|
82
135
|
self,
|
|
@@ -217,6 +270,58 @@ class IngestClient(NamespacedClient):
|
|
|
217
270
|
path_parts=__path_parts,
|
|
218
271
|
)
|
|
219
272
|
|
|
273
|
+
@_rewrite_parameters()
|
|
274
|
+
async def get_ip_location_database(
|
|
275
|
+
self,
|
|
276
|
+
*,
|
|
277
|
+
id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
278
|
+
error_trace: t.Optional[bool] = None,
|
|
279
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
280
|
+
human: t.Optional[bool] = None,
|
|
281
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
282
|
+
pretty: t.Optional[bool] = None,
|
|
283
|
+
) -> ObjectApiResponse[t.Any]:
|
|
284
|
+
"""
|
|
285
|
+
Get IP geolocation database configurations.
|
|
286
|
+
|
|
287
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ip-location-database-api.html>`_
|
|
288
|
+
|
|
289
|
+
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
|
|
290
|
+
(`*`) expressions are supported. To get all database configurations, omit
|
|
291
|
+
this parameter or use `*`.
|
|
292
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
293
|
+
If no response is received before the timeout expires, the request fails
|
|
294
|
+
and returns an error. A value of `-1` indicates that the request should never
|
|
295
|
+
time out.
|
|
296
|
+
"""
|
|
297
|
+
__path_parts: t.Dict[str, str]
|
|
298
|
+
if id not in SKIP_IN_PATH:
|
|
299
|
+
__path_parts = {"id": _quote(id)}
|
|
300
|
+
__path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
|
|
301
|
+
else:
|
|
302
|
+
__path_parts = {}
|
|
303
|
+
__path = "/_ingest/ip_location/database"
|
|
304
|
+
__query: t.Dict[str, t.Any] = {}
|
|
305
|
+
if error_trace is not None:
|
|
306
|
+
__query["error_trace"] = error_trace
|
|
307
|
+
if filter_path is not None:
|
|
308
|
+
__query["filter_path"] = filter_path
|
|
309
|
+
if human is not None:
|
|
310
|
+
__query["human"] = human
|
|
311
|
+
if master_timeout is not None:
|
|
312
|
+
__query["master_timeout"] = master_timeout
|
|
313
|
+
if pretty is not None:
|
|
314
|
+
__query["pretty"] = pretty
|
|
315
|
+
__headers = {"accept": "application/json"}
|
|
316
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
317
|
+
"GET",
|
|
318
|
+
__path,
|
|
319
|
+
params=__query,
|
|
320
|
+
headers=__headers,
|
|
321
|
+
endpoint_id="ingest.get_ip_location_database",
|
|
322
|
+
path_parts=__path_parts,
|
|
323
|
+
)
|
|
324
|
+
|
|
220
325
|
@_rewrite_parameters()
|
|
221
326
|
async def get_pipeline(
|
|
222
327
|
self,
|
|
@@ -328,8 +433,8 @@ class IngestClient(NamespacedClient):
|
|
|
328
433
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
329
434
|
) -> ObjectApiResponse[t.Any]:
|
|
330
435
|
"""
|
|
331
|
-
Create or update GeoIP database
|
|
332
|
-
database
|
|
436
|
+
Create or update a GeoIP database configuration. Refer to the create or update
|
|
437
|
+
IP geolocation database configuration API.
|
|
333
438
|
|
|
334
439
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-geoip-database-api.html>`_
|
|
335
440
|
|
|
@@ -384,6 +489,74 @@ class IngestClient(NamespacedClient):
|
|
|
384
489
|
path_parts=__path_parts,
|
|
385
490
|
)
|
|
386
491
|
|
|
492
|
+
@_rewrite_parameters(
|
|
493
|
+
body_name="configuration",
|
|
494
|
+
)
|
|
495
|
+
async def put_ip_location_database(
|
|
496
|
+
self,
|
|
497
|
+
*,
|
|
498
|
+
id: str,
|
|
499
|
+
configuration: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
500
|
+
body: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
501
|
+
error_trace: t.Optional[bool] = None,
|
|
502
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
503
|
+
human: t.Optional[bool] = None,
|
|
504
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
505
|
+
pretty: t.Optional[bool] = None,
|
|
506
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
507
|
+
) -> ObjectApiResponse[t.Any]:
|
|
508
|
+
"""
|
|
509
|
+
Create or update an IP geolocation database configuration.
|
|
510
|
+
|
|
511
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-ip-location-database-api.html>`_
|
|
512
|
+
|
|
513
|
+
:param id: The database configuration identifier.
|
|
514
|
+
:param configuration:
|
|
515
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
516
|
+
If no response is received before the timeout expires, the request fails
|
|
517
|
+
and returns an error. A value of `-1` indicates that the request should never
|
|
518
|
+
time out.
|
|
519
|
+
:param timeout: The period to wait for a response from all relevant nodes in
|
|
520
|
+
the cluster after updating the cluster metadata. If no response is received
|
|
521
|
+
before the timeout expires, the cluster metadata update still applies but
|
|
522
|
+
the response indicates that it was not completely acknowledged. A value of
|
|
523
|
+
`-1` indicates that the request should never time out.
|
|
524
|
+
"""
|
|
525
|
+
if id in SKIP_IN_PATH:
|
|
526
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
527
|
+
if configuration is None and body is None:
|
|
528
|
+
raise ValueError(
|
|
529
|
+
"Empty value passed for parameters 'configuration' and 'body', one of them should be set."
|
|
530
|
+
)
|
|
531
|
+
elif configuration is not None and body is not None:
|
|
532
|
+
raise ValueError("Cannot set both 'configuration' and 'body'")
|
|
533
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
534
|
+
__path = f'/_ingest/ip_location/database/{__path_parts["id"]}'
|
|
535
|
+
__query: t.Dict[str, t.Any] = {}
|
|
536
|
+
if error_trace is not None:
|
|
537
|
+
__query["error_trace"] = error_trace
|
|
538
|
+
if filter_path is not None:
|
|
539
|
+
__query["filter_path"] = filter_path
|
|
540
|
+
if human is not None:
|
|
541
|
+
__query["human"] = human
|
|
542
|
+
if master_timeout is not None:
|
|
543
|
+
__query["master_timeout"] = master_timeout
|
|
544
|
+
if pretty is not None:
|
|
545
|
+
__query["pretty"] = pretty
|
|
546
|
+
if timeout is not None:
|
|
547
|
+
__query["timeout"] = timeout
|
|
548
|
+
__body = configuration if configuration is not None else body
|
|
549
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
550
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
551
|
+
"PUT",
|
|
552
|
+
__path,
|
|
553
|
+
params=__query,
|
|
554
|
+
headers=__headers,
|
|
555
|
+
body=__body,
|
|
556
|
+
endpoint_id="ingest.put_ip_location_database",
|
|
557
|
+
path_parts=__path_parts,
|
|
558
|
+
)
|
|
559
|
+
|
|
387
560
|
@_rewrite_parameters(
|
|
388
561
|
body_fields=(
|
|
389
562
|
"deprecated",
|
|
@@ -36,11 +36,13 @@ class LogstashClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
39
|
+
Delete a Logstash pipeline. Delete a pipeline that is used for Logstash Central
|
|
40
|
+
Management. If the request succeeds, you receive an empty response with an appropriate
|
|
41
|
+
status code.
|
|
40
42
|
|
|
41
43
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-delete-pipeline.html>`_
|
|
42
44
|
|
|
43
|
-
:param id:
|
|
45
|
+
:param id: An identifier for the pipeline.
|
|
44
46
|
"""
|
|
45
47
|
if id in SKIP_IN_PATH:
|
|
46
48
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -76,11 +78,11 @@ class LogstashClient(NamespacedClient):
|
|
|
76
78
|
pretty: t.Optional[bool] = None,
|
|
77
79
|
) -> ObjectApiResponse[t.Any]:
|
|
78
80
|
"""
|
|
79
|
-
|
|
81
|
+
Get Logstash pipelines. Get pipelines that are used for Logstash Central Management.
|
|
80
82
|
|
|
81
83
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-get-pipeline.html>`_
|
|
82
84
|
|
|
83
|
-
:param id:
|
|
85
|
+
:param id: A comma-separated list of pipeline identifiers.
|
|
84
86
|
"""
|
|
85
87
|
__path_parts: t.Dict[str, str]
|
|
86
88
|
if id not in SKIP_IN_PATH:
|
|
@@ -123,11 +125,12 @@ class LogstashClient(NamespacedClient):
|
|
|
123
125
|
pretty: t.Optional[bool] = None,
|
|
124
126
|
) -> ObjectApiResponse[t.Any]:
|
|
125
127
|
"""
|
|
126
|
-
|
|
128
|
+
Create or update a Logstash pipeline. Create a pipeline that is used for Logstash
|
|
129
|
+
Central Management. If the specified pipeline exists, it is replaced.
|
|
127
130
|
|
|
128
131
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-put-pipeline.html>`_
|
|
129
132
|
|
|
130
|
-
:param id:
|
|
133
|
+
:param id: An identifier for the pipeline.
|
|
131
134
|
:param pipeline:
|
|
132
135
|
"""
|
|
133
136
|
if id in SKIP_IN_PATH:
|
|
@@ -36,9 +36,10 @@ class MigrationClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
40
|
-
that use deprecated features that will be removed or changed
|
|
41
|
-
version.
|
|
39
|
+
Get deprecation information. Get information about different cluster, node, and
|
|
40
|
+
index level settings that use deprecated features that will be removed or changed
|
|
41
|
+
in the next major version. TIP: This APIs is designed for indirect use by the
|
|
42
|
+
Upgrade Assistant. You are strongly recommended to use the Upgrade Assistant.
|
|
42
43
|
|
|
43
44
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/migration-api-deprecation.html>`_
|
|
44
45
|
|
|
@@ -81,9 +82,13 @@ class MigrationClient(NamespacedClient):
|
|
|
81
82
|
pretty: t.Optional[bool] = None,
|
|
82
83
|
) -> ObjectApiResponse[t.Any]:
|
|
83
84
|
"""
|
|
84
|
-
|
|
85
|
+
Get feature migration information. Version upgrades sometimes require changes
|
|
86
|
+
to how features store configuration information and data in system indices. Check
|
|
87
|
+
which features need to be migrated and the status of any migrations that are
|
|
88
|
+
in progress. TIP: This API is designed for indirect use by the Upgrade Assistant.
|
|
89
|
+
You are strongly recommended to use the Upgrade Assistant.
|
|
85
90
|
|
|
86
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/migration-api
|
|
91
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/feature-migration-api.html>`_
|
|
87
92
|
"""
|
|
88
93
|
__path_parts: t.Dict[str, str] = {}
|
|
89
94
|
__path = "/_migration/system_features"
|
|
@@ -116,9 +121,13 @@ class MigrationClient(NamespacedClient):
|
|
|
116
121
|
pretty: t.Optional[bool] = None,
|
|
117
122
|
) -> ObjectApiResponse[t.Any]:
|
|
118
123
|
"""
|
|
119
|
-
|
|
124
|
+
Start the feature migration. Version upgrades sometimes require changes to how
|
|
125
|
+
features store configuration information and data in system indices. This API
|
|
126
|
+
starts the automatic migration process. Some functionality might be temporarily
|
|
127
|
+
unavailable during the migration process. TIP: The API is designed for indirect
|
|
128
|
+
use by the Upgrade Assistant. We strongly recommend you use the Upgrade Assistant.
|
|
120
129
|
|
|
121
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/migration-api
|
|
130
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/feature-migration-api.html>`_
|
|
122
131
|
"""
|
|
123
132
|
__path_parts: t.Dict[str, str] = {}
|
|
124
133
|
__path = "/_migration/system_features"
|
|
@@ -2702,7 +2702,7 @@ class MlClient(NamespacedClient):
|
|
|
2702
2702
|
pretty: t.Optional[bool] = None,
|
|
2703
2703
|
) -> ObjectApiResponse[t.Any]:
|
|
2704
2704
|
"""
|
|
2705
|
-
|
|
2705
|
+
Get machine learning information. Get defaults and limits used by machine learning.
|
|
2706
2706
|
This endpoint is designed to be used by a user interface that needs to fully
|
|
2707
2707
|
understand machine learning configurations where some options are not specified,
|
|
2708
2708
|
meaning that the defaults should be used. This endpoint may be used to find out
|
|
@@ -3205,7 +3205,11 @@ class MlClient(NamespacedClient):
|
|
|
3205
3205
|
"""
|
|
3206
3206
|
Create a data frame analytics job. This API creates a data frame analytics job
|
|
3207
3207
|
that performs an analysis on the source indices and stores the outcome in a destination
|
|
3208
|
-
index.
|
|
3208
|
+
index. By default, the query used in the source configuration is `{"match_all":
|
|
3209
|
+
{}}`. If the destination index does not exist, it is created automatically when
|
|
3210
|
+
you start the job. If you supply only a subset of the regression or classification
|
|
3211
|
+
parameters, hyperparameter optimization occurs. It determines a value for each
|
|
3212
|
+
of the undefined parameters.
|
|
3209
3213
|
|
|
3210
3214
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-dfanalytics.html>`_
|
|
3211
3215
|
|
|
@@ -3382,7 +3386,8 @@ class MlClient(NamespacedClient):
|
|
|
3382
3386
|
an anomaly detection job. You can associate only one datafeed with each anomaly
|
|
3383
3387
|
detection job. The datafeed contains a query that runs at a defined interval
|
|
3384
3388
|
(`frequency`). If you are concerned about delayed data, you can add a delay (`query_delay')
|
|
3385
|
-
at each interval.
|
|
3389
|
+
at each interval. By default, the datafeed uses the following query: `{"match_all":
|
|
3390
|
+
{"boost": 1}}`. When Elasticsearch security features are enabled, your datafeed
|
|
3386
3391
|
remembers which roles the user who created it had at the time of creation and
|
|
3387
3392
|
runs the query using those same roles. If you provide secondary authorization
|
|
3388
3393
|
headers, those credentials are used instead. You must use Kibana, this API, or
|
|
@@ -3645,7 +3650,8 @@ class MlClient(NamespacedClient):
|
|
|
3645
3650
|
) -> ObjectApiResponse[t.Any]:
|
|
3646
3651
|
"""
|
|
3647
3652
|
Create an anomaly detection job. If you include a `datafeed_config`, you must
|
|
3648
|
-
have read index privileges on the source index.
|
|
3653
|
+
have read index privileges on the source index. If you include a `datafeed_config`
|
|
3654
|
+
but do not provide a query, the datafeed uses `{"match_all": {"boost": 1}}`.
|
|
3649
3655
|
|
|
3650
3656
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-job.html>`_
|
|
3651
3657
|
|
|
@@ -5451,7 +5457,7 @@ class MlClient(NamespacedClient):
|
|
|
5451
5457
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
5452
5458
|
) -> ObjectApiResponse[t.Any]:
|
|
5453
5459
|
"""
|
|
5454
|
-
|
|
5460
|
+
Validate an anomaly detection job.
|
|
5455
5461
|
|
|
5456
5462
|
`<https://www.elastic.co/guide/en/machine-learning/8.17/ml-jobs.html>`_
|
|
5457
5463
|
|
|
@@ -5521,7 +5527,7 @@ class MlClient(NamespacedClient):
|
|
|
5521
5527
|
pretty: t.Optional[bool] = None,
|
|
5522
5528
|
) -> ObjectApiResponse[t.Any]:
|
|
5523
5529
|
"""
|
|
5524
|
-
|
|
5530
|
+
Validate an anomaly detection job.
|
|
5525
5531
|
|
|
5526
5532
|
`<https://www.elastic.co/guide/en/machine-learning/8.17/ml-jobs.html>`_
|
|
5527
5533
|
|
|
@@ -42,7 +42,8 @@ class MonitoringClient(NamespacedClient):
|
|
|
42
42
|
pretty: t.Optional[bool] = None,
|
|
43
43
|
) -> ObjectApiResponse[t.Any]:
|
|
44
44
|
"""
|
|
45
|
-
|
|
45
|
+
Send monitoring data. This API is used by the monitoring features to send monitoring
|
|
46
|
+
data.
|
|
46
47
|
|
|
47
48
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/monitor-elasticsearch-cluster.html>`_
|
|
48
49
|
|
|
@@ -50,9 +50,9 @@ class NodesClient(NamespacedClient):
|
|
|
50
50
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-repositories-metering-archive-api.html>`_
|
|
51
51
|
|
|
52
52
|
:param node_id: Comma-separated list of node IDs or names used to limit returned
|
|
53
|
-
information.
|
|
54
|
-
:param max_archive_version: Specifies the maximum
|
|
55
|
-
|
|
53
|
+
information.
|
|
54
|
+
:param max_archive_version: Specifies the maximum `archive_version` to be cleared
|
|
55
|
+
from the archive.
|
|
56
56
|
"""
|
|
57
57
|
if node_id in SKIP_IN_PATH:
|
|
58
58
|
raise ValueError("Empty value passed for parameter 'node_id'")
|
|
@@ -37,7 +37,9 @@ class QueryRulesClient(NamespacedClient):
|
|
|
37
37
|
pretty: t.Optional[bool] = None,
|
|
38
38
|
) -> ObjectApiResponse[t.Any]:
|
|
39
39
|
"""
|
|
40
|
-
Delete a query rule. Delete a query rule within a query ruleset.
|
|
40
|
+
Delete a query rule. Delete a query rule within a query ruleset. This is a destructive
|
|
41
|
+
action that is only recoverable by re-adding the same rule with the create or
|
|
42
|
+
update query rule API.
|
|
41
43
|
|
|
42
44
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-query-rule.html>`_
|
|
43
45
|
|
|
@@ -85,7 +87,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
85
87
|
pretty: t.Optional[bool] = None,
|
|
86
88
|
) -> ObjectApiResponse[t.Any]:
|
|
87
89
|
"""
|
|
88
|
-
Delete a query ruleset.
|
|
90
|
+
Delete a query ruleset. Remove a query ruleset and its associated data. This
|
|
91
|
+
is a destructive action that is not recoverable.
|
|
89
92
|
|
|
90
93
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-query-ruleset.html>`_
|
|
91
94
|
|
|
@@ -221,8 +224,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
221
224
|
|
|
222
225
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-query-rulesets.html>`_
|
|
223
226
|
|
|
224
|
-
:param from_:
|
|
225
|
-
:param size:
|
|
227
|
+
:param from_: The offset from the first result to fetch.
|
|
228
|
+
:param size: The maximum number of results to retrieve.
|
|
226
229
|
"""
|
|
227
230
|
__path_parts: t.Dict[str, str] = {}
|
|
228
231
|
__path = "/_query_rules"
|
|
@@ -271,16 +274,25 @@ class QueryRulesClient(NamespacedClient):
|
|
|
271
274
|
) -> ObjectApiResponse[t.Any]:
|
|
272
275
|
"""
|
|
273
276
|
Create or update a query rule. Create or update a query rule within a query ruleset.
|
|
277
|
+
IMPORTANT: Due to limitations within pinned queries, you can only pin documents
|
|
278
|
+
using ids or docs, but cannot use both in single rule. It is advised to use one
|
|
279
|
+
or the other in query rulesets, to avoid errors. Additionally, pinned queries
|
|
280
|
+
have a maximum limit of 100 pinned hits. If multiple matching rules pin more
|
|
281
|
+
than 100 documents, only the first 100 documents are pinned in the order they
|
|
282
|
+
are specified in the ruleset.
|
|
274
283
|
|
|
275
284
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-query-rule.html>`_
|
|
276
285
|
|
|
277
286
|
:param ruleset_id: The unique identifier of the query ruleset containing the
|
|
278
|
-
rule to be created or updated
|
|
287
|
+
rule to be created or updated.
|
|
279
288
|
:param rule_id: The unique identifier of the query rule within the specified
|
|
280
|
-
ruleset to be created or updated
|
|
281
|
-
:param actions:
|
|
282
|
-
|
|
283
|
-
:param
|
|
289
|
+
ruleset to be created or updated.
|
|
290
|
+
:param actions: The actions to take when the rule is matched. The format of this
|
|
291
|
+
action depends on the rule type.
|
|
292
|
+
:param criteria: The criteria that must be met for the rule to be applied. If
|
|
293
|
+
multiple criteria are specified for a rule, all criteria must be met for
|
|
294
|
+
the rule to be applied.
|
|
295
|
+
:param type: The type of rule.
|
|
284
296
|
:param priority:
|
|
285
297
|
"""
|
|
286
298
|
if ruleset_id in SKIP_IN_PATH:
|
|
@@ -345,12 +357,19 @@ class QueryRulesClient(NamespacedClient):
|
|
|
345
357
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
346
358
|
) -> ObjectApiResponse[t.Any]:
|
|
347
359
|
"""
|
|
348
|
-
Create or update a query ruleset.
|
|
360
|
+
Create or update a query ruleset. There is a limit of 100 rules per ruleset.
|
|
361
|
+
This limit can be increased by using the `xpack.applications.rules.max_rules_per_ruleset`
|
|
362
|
+
cluster setting. IMPORTANT: Due to limitations within pinned queries, you can
|
|
363
|
+
only select documents using `ids` or `docs`, but cannot use both in single rule.
|
|
364
|
+
It is advised to use one or the other in query rulesets, to avoid errors. Additionally,
|
|
365
|
+
pinned queries have a maximum limit of 100 pinned hits. If multiple matching
|
|
366
|
+
rules pin more than 100 documents, only the first 100 documents are pinned in
|
|
367
|
+
the order they are specified in the ruleset.
|
|
349
368
|
|
|
350
369
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-query-ruleset.html>`_
|
|
351
370
|
|
|
352
371
|
:param ruleset_id: The unique identifier of the query ruleset to be created or
|
|
353
|
-
updated
|
|
372
|
+
updated.
|
|
354
373
|
:param rules:
|
|
355
374
|
"""
|
|
356
375
|
if ruleset_id in SKIP_IN_PATH:
|
|
@@ -405,7 +424,9 @@ class QueryRulesClient(NamespacedClient):
|
|
|
405
424
|
|
|
406
425
|
:param ruleset_id: The unique identifier of the query ruleset to be created or
|
|
407
426
|
updated
|
|
408
|
-
:param match_criteria:
|
|
427
|
+
:param match_criteria: The match criteria to apply to rules in the given query
|
|
428
|
+
ruleset. Match criteria should match the keys defined in the `criteria.metadata`
|
|
429
|
+
field of the rule.
|
|
409
430
|
"""
|
|
410
431
|
if ruleset_id in SKIP_IN_PATH:
|
|
411
432
|
raise ValueError("Empty value passed for parameter 'ruleset_id'")
|