elasticsearch 8.16.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 +234 -96
- elasticsearch/_async/client/async_search.py +12 -22
- elasticsearch/_async/client/autoscaling.py +39 -4
- elasticsearch/_async/client/cat.py +90 -221
- elasticsearch/_async/client/ccr.py +85 -35
- elasticsearch/_async/client/cluster.py +160 -68
- elasticsearch/_async/client/connector.py +362 -25
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +6 -6
- elasticsearch/_async/client/eql.py +13 -11
- elasticsearch/_async/client/esql.py +3 -2
- elasticsearch/_async/client/features.py +27 -5
- elasticsearch/_async/client/fleet.py +1 -1
- elasticsearch/_async/client/graph.py +9 -3
- elasticsearch/_async/client/ilm.py +74 -39
- elasticsearch/_async/client/indices.py +633 -152
- elasticsearch/_async/client/inference.py +99 -16
- elasticsearch/_async/client/ingest.py +201 -23
- elasticsearch/_async/client/license.py +38 -22
- elasticsearch/_async/client/logstash.py +12 -9
- elasticsearch/_async/client/migration.py +17 -8
- elasticsearch/_async/client/ml.py +137 -79
- elasticsearch/_async/client/monitoring.py +3 -2
- elasticsearch/_async/client/nodes.py +37 -23
- elasticsearch/_async/client/query_rules.py +47 -25
- elasticsearch/_async/client/rollup.py +96 -21
- elasticsearch/_async/client/search_application.py +138 -9
- elasticsearch/_async/client/searchable_snapshots.py +33 -24
- elasticsearch/_async/client/security.py +751 -123
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +147 -28
- elasticsearch/_async/client/snapshot.py +309 -25
- elasticsearch/_async/client/sql.py +79 -58
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +52 -29
- elasticsearch/_async/client/tasks.py +71 -31
- elasticsearch/_async/client/text_structure.py +468 -48
- elasticsearch/_async/client/transform.py +21 -14
- elasticsearch/_async/client/watcher.py +226 -60
- elasticsearch/_async/client/xpack.py +13 -8
- elasticsearch/_sync/client/__init__.py +234 -96
- elasticsearch/_sync/client/async_search.py +12 -22
- elasticsearch/_sync/client/autoscaling.py +39 -4
- elasticsearch/_sync/client/cat.py +90 -221
- elasticsearch/_sync/client/ccr.py +85 -35
- elasticsearch/_sync/client/cluster.py +160 -68
- elasticsearch/_sync/client/connector.py +362 -25
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +6 -6
- elasticsearch/_sync/client/eql.py +13 -11
- elasticsearch/_sync/client/esql.py +3 -2
- elasticsearch/_sync/client/features.py +27 -5
- elasticsearch/_sync/client/fleet.py +1 -1
- elasticsearch/_sync/client/graph.py +9 -3
- elasticsearch/_sync/client/ilm.py +74 -39
- elasticsearch/_sync/client/indices.py +633 -152
- elasticsearch/_sync/client/inference.py +99 -16
- elasticsearch/_sync/client/ingest.py +201 -23
- elasticsearch/_sync/client/license.py +38 -22
- elasticsearch/_sync/client/logstash.py +12 -9
- elasticsearch/_sync/client/migration.py +17 -8
- elasticsearch/_sync/client/ml.py +137 -79
- elasticsearch/_sync/client/monitoring.py +3 -2
- elasticsearch/_sync/client/nodes.py +37 -23
- elasticsearch/_sync/client/query_rules.py +47 -25
- elasticsearch/_sync/client/rollup.py +96 -21
- elasticsearch/_sync/client/search_application.py +138 -9
- elasticsearch/_sync/client/searchable_snapshots.py +33 -24
- elasticsearch/_sync/client/security.py +751 -123
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +147 -28
- elasticsearch/_sync/client/snapshot.py +309 -25
- elasticsearch/_sync/client/sql.py +79 -58
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +52 -29
- elasticsearch/_sync/client/tasks.py +71 -31
- elasticsearch/_sync/client/text_structure.py +468 -48
- elasticsearch/_sync/client/transform.py +21 -14
- elasticsearch/_sync/client/watcher.py +226 -60
- elasticsearch/_sync/client/xpack.py +13 -8
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.16.0.dist-info/RECORD +0 -117
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
elasticsearch/_sync/client/ml.py
CHANGED
|
@@ -42,7 +42,7 @@ class MlClient(NamespacedClient):
|
|
|
42
42
|
may be cached on that individual node. Calling this API clears the caches without
|
|
43
43
|
restarting the deployment.
|
|
44
44
|
|
|
45
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
45
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-trained-model-deployment-cache.html>`_
|
|
46
46
|
|
|
47
47
|
:param model_id: The unique identifier of the trained model.
|
|
48
48
|
"""
|
|
@@ -102,7 +102,7 @@ class MlClient(NamespacedClient):
|
|
|
102
102
|
force parameters as the close job request. When a datafeed that has a specified
|
|
103
103
|
end date stops, it automatically closes its associated job.
|
|
104
104
|
|
|
105
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
105
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-close-job.html>`_
|
|
106
106
|
|
|
107
107
|
:param job_id: Identifier for the anomaly detection job. It can be a job identifier,
|
|
108
108
|
a group name, or a wildcard expression. You can close multiple anomaly detection
|
|
@@ -164,7 +164,7 @@ class MlClient(NamespacedClient):
|
|
|
164
164
|
Delete a calendar. Removes all scheduled events from a calendar, then deletes
|
|
165
165
|
it.
|
|
166
166
|
|
|
167
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
167
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-calendar.html>`_
|
|
168
168
|
|
|
169
169
|
:param calendar_id: A string that uniquely identifies a calendar.
|
|
170
170
|
"""
|
|
@@ -205,7 +205,7 @@ class MlClient(NamespacedClient):
|
|
|
205
205
|
"""
|
|
206
206
|
Delete events from a calendar.
|
|
207
207
|
|
|
208
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
208
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-calendar-event.html>`_
|
|
209
209
|
|
|
210
210
|
:param calendar_id: A string that uniquely identifies a calendar.
|
|
211
211
|
:param event_id: Identifier for the scheduled event. You can obtain this identifier
|
|
@@ -253,7 +253,7 @@ class MlClient(NamespacedClient):
|
|
|
253
253
|
"""
|
|
254
254
|
Delete anomaly jobs from a calendar.
|
|
255
255
|
|
|
256
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
256
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-calendar-job.html>`_
|
|
257
257
|
|
|
258
258
|
:param calendar_id: A string that uniquely identifies a calendar.
|
|
259
259
|
:param job_id: An identifier for the anomaly detection jobs. It can be a job
|
|
@@ -302,7 +302,7 @@ class MlClient(NamespacedClient):
|
|
|
302
302
|
"""
|
|
303
303
|
Delete a data frame analytics job.
|
|
304
304
|
|
|
305
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
305
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-dfanalytics.html>`_
|
|
306
306
|
|
|
307
307
|
:param id: Identifier for the data frame analytics job.
|
|
308
308
|
:param force: If `true`, it deletes a job that is not stopped; this method is
|
|
@@ -350,7 +350,7 @@ class MlClient(NamespacedClient):
|
|
|
350
350
|
"""
|
|
351
351
|
Delete a datafeed.
|
|
352
352
|
|
|
353
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
353
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-datafeed.html>`_
|
|
354
354
|
|
|
355
355
|
:param datafeed_id: A numerical character string that uniquely identifies the
|
|
356
356
|
datafeed. This identifier can contain lowercase alphanumeric characters (a-z
|
|
@@ -408,7 +408,7 @@ class MlClient(NamespacedClient):
|
|
|
408
408
|
expired data for all anomaly detection jobs by using _all, by specifying * as
|
|
409
409
|
the <job_id>, or by omitting the <job_id>.
|
|
410
410
|
|
|
411
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
411
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-expired-data.html>`_
|
|
412
412
|
|
|
413
413
|
:param job_id: Identifier for an anomaly detection job. It can be a job identifier,
|
|
414
414
|
a group name, or a wildcard expression.
|
|
@@ -469,7 +469,7 @@ class MlClient(NamespacedClient):
|
|
|
469
469
|
delete the filter. You must update or delete the job before you can delete the
|
|
470
470
|
filter.
|
|
471
471
|
|
|
472
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
472
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-filter.html>`_
|
|
473
473
|
|
|
474
474
|
:param filter_id: A string that uniquely identifies a filter.
|
|
475
475
|
"""
|
|
@@ -515,7 +515,7 @@ class MlClient(NamespacedClient):
|
|
|
515
515
|
in the forecast jobs API. The delete forecast API enables you to delete one or
|
|
516
516
|
more forecasts before they expire.
|
|
517
517
|
|
|
518
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
518
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-forecast.html>`_
|
|
519
519
|
|
|
520
520
|
:param job_id: Identifier for the anomaly detection job.
|
|
521
521
|
:param forecast_id: A comma-separated list of forecast identifiers. If you do
|
|
@@ -587,7 +587,7 @@ class MlClient(NamespacedClient):
|
|
|
587
587
|
delete datafeed API with the same timeout and force parameters as the delete
|
|
588
588
|
job request.
|
|
589
589
|
|
|
590
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
590
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-job.html>`_
|
|
591
591
|
|
|
592
592
|
:param job_id: Identifier for the anomaly detection job.
|
|
593
593
|
:param delete_user_annotations: Specifies whether annotations that have been
|
|
@@ -643,7 +643,7 @@ class MlClient(NamespacedClient):
|
|
|
643
643
|
that snapshot, first revert to a different one. To identify the active model
|
|
644
644
|
snapshot, refer to the `model_snapshot_id` in the results from the get jobs API.
|
|
645
645
|
|
|
646
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
646
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-delete-snapshot.html>`_
|
|
647
647
|
|
|
648
648
|
:param job_id: Identifier for the anomaly detection job.
|
|
649
649
|
:param snapshot_id: Identifier for the model snapshot.
|
|
@@ -691,7 +691,7 @@ class MlClient(NamespacedClient):
|
|
|
691
691
|
Delete an unreferenced trained model. The request deletes a trained inference
|
|
692
692
|
model that is not referenced by an ingest pipeline.
|
|
693
693
|
|
|
694
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
694
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-trained-models.html>`_
|
|
695
695
|
|
|
696
696
|
:param model_id: The unique identifier of the trained model.
|
|
697
697
|
:param force: Forcefully deletes a trained model that is referenced by ingest
|
|
@@ -738,7 +738,7 @@ class MlClient(NamespacedClient):
|
|
|
738
738
|
to a trained model. If the model alias is missing or refers to a model other
|
|
739
739
|
than the one identified by the `model_id`, this API returns an error.
|
|
740
740
|
|
|
741
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
741
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-trained-models-aliases.html>`_
|
|
742
742
|
|
|
743
743
|
:param model_id: The trained model ID to which the model alias refers.
|
|
744
744
|
:param model_alias: The model alias to delete.
|
|
@@ -795,7 +795,7 @@ class MlClient(NamespacedClient):
|
|
|
795
795
|
an anomaly detection job model. It is based on analysis configuration details
|
|
796
796
|
for the job and cardinality estimates for the fields it references.
|
|
797
797
|
|
|
798
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
798
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-apis.html>`_
|
|
799
799
|
|
|
800
800
|
:param analysis_config: For a list of the properties that you can specify in
|
|
801
801
|
the `analysis_config` component of the body of this API.
|
|
@@ -863,7 +863,7 @@ class MlClient(NamespacedClient):
|
|
|
863
863
|
for use on indexes created by data frame analytics. Evaluation requires both
|
|
864
864
|
a ground truth field and an analytics result field to be present.
|
|
865
865
|
|
|
866
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
866
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/evaluate-dfanalytics.html>`_
|
|
867
867
|
|
|
868
868
|
:param evaluation: Defines the type of evaluation you want to perform.
|
|
869
869
|
:param index: Defines the `index` in which the evaluation will be performed.
|
|
@@ -943,7 +943,7 @@ class MlClient(NamespacedClient):
|
|
|
943
943
|
setting later on. If you have object fields or fields that are excluded via source
|
|
944
944
|
filtering, they are not included in the explanation.
|
|
945
945
|
|
|
946
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
946
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/explain-dfanalytics.html>`_
|
|
947
947
|
|
|
948
948
|
:param id: Identifier for the data frame analytics job. This identifier can contain
|
|
949
949
|
lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
|
@@ -1050,7 +1050,7 @@ class MlClient(NamespacedClient):
|
|
|
1050
1050
|
and persists the model state to disk and the job must be opened again before
|
|
1051
1051
|
analyzing further data.
|
|
1052
1052
|
|
|
1053
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1053
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-flush-job.html>`_
|
|
1054
1054
|
|
|
1055
1055
|
:param job_id: Identifier for the anomaly detection job.
|
|
1056
1056
|
:param advance_time: Refer to the description for the `advance_time` query parameter.
|
|
@@ -1121,7 +1121,7 @@ class MlClient(NamespacedClient):
|
|
|
1121
1121
|
for a job that has an `over_field_name` in its configuration. Forcasts predict
|
|
1122
1122
|
future behavior based on historical data.
|
|
1123
1123
|
|
|
1124
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1124
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-forecast.html>`_
|
|
1125
1125
|
|
|
1126
1126
|
:param job_id: Identifier for the anomaly detection job. The job must be open
|
|
1127
1127
|
when you create a forecast; otherwise, an error occurs.
|
|
@@ -1204,7 +1204,7 @@ class MlClient(NamespacedClient):
|
|
|
1204
1204
|
Get anomaly detection job results for buckets. The API presents a chronological
|
|
1205
1205
|
view of the records, grouped by bucket.
|
|
1206
1206
|
|
|
1207
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1207
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-bucket.html>`_
|
|
1208
1208
|
|
|
1209
1209
|
:param job_id: Identifier for the anomaly detection job.
|
|
1210
1210
|
:param timestamp: The timestamp of a single bucket result. If you do not specify
|
|
@@ -1299,7 +1299,7 @@ class MlClient(NamespacedClient):
|
|
|
1299
1299
|
"""
|
|
1300
1300
|
Get info about events in calendars.
|
|
1301
1301
|
|
|
1302
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1302
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-calendar-event.html>`_
|
|
1303
1303
|
|
|
1304
1304
|
:param calendar_id: A string that uniquely identifies a calendar. You can get
|
|
1305
1305
|
information for multiple calendars by using a comma-separated list of ids
|
|
@@ -1365,7 +1365,7 @@ class MlClient(NamespacedClient):
|
|
|
1365
1365
|
"""
|
|
1366
1366
|
Get calendar configuration info.
|
|
1367
1367
|
|
|
1368
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1368
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-calendar.html>`_
|
|
1369
1369
|
|
|
1370
1370
|
:param calendar_id: A string that uniquely identifies a calendar. You can get
|
|
1371
1371
|
information for multiple calendars by using a comma-separated list of ids
|
|
@@ -1438,7 +1438,7 @@ class MlClient(NamespacedClient):
|
|
|
1438
1438
|
"""
|
|
1439
1439
|
Get anomaly detection job results for categories.
|
|
1440
1440
|
|
|
1441
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1441
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-category.html>`_
|
|
1442
1442
|
|
|
1443
1443
|
:param job_id: Identifier for the anomaly detection job.
|
|
1444
1444
|
:param category_id: Identifier for the category, which is unique in the job.
|
|
@@ -1522,7 +1522,7 @@ class MlClient(NamespacedClient):
|
|
|
1522
1522
|
multiple data frame analytics jobs in a single API request by using a comma-separated
|
|
1523
1523
|
list of data frame analytics jobs or a wildcard expression.
|
|
1524
1524
|
|
|
1525
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1525
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-dfanalytics.html>`_
|
|
1526
1526
|
|
|
1527
1527
|
:param id: Identifier for the data frame analytics job. If you do not specify
|
|
1528
1528
|
this option, the API returns information for the first hundred data frame
|
|
@@ -1594,7 +1594,7 @@ class MlClient(NamespacedClient):
|
|
|
1594
1594
|
"""
|
|
1595
1595
|
Get data frame analytics jobs usage info.
|
|
1596
1596
|
|
|
1597
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1597
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-dfanalytics-stats.html>`_
|
|
1598
1598
|
|
|
1599
1599
|
:param id: Identifier for the data frame analytics job. If you do not specify
|
|
1600
1600
|
this option, the API returns information for the first hundred data frame
|
|
@@ -1664,7 +1664,7 @@ class MlClient(NamespacedClient):
|
|
|
1664
1664
|
the only information you receive is the `datafeed_id` and the `state`. This API
|
|
1665
1665
|
returns a maximum of 10,000 datafeeds.
|
|
1666
1666
|
|
|
1667
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1667
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-datafeed-stats.html>`_
|
|
1668
1668
|
|
|
1669
1669
|
:param datafeed_id: Identifier for the datafeed. It can be a datafeed identifier
|
|
1670
1670
|
or a wildcard expression. If you do not specify one of these options, the
|
|
@@ -1724,7 +1724,7 @@ class MlClient(NamespacedClient):
|
|
|
1724
1724
|
`*` as the `<feed_id>`, or by omitting the `<feed_id>`. This API returns a maximum
|
|
1725
1725
|
of 10,000 datafeeds.
|
|
1726
1726
|
|
|
1727
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1727
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-datafeed.html>`_
|
|
1728
1728
|
|
|
1729
1729
|
:param datafeed_id: Identifier for the datafeed. It can be a datafeed identifier
|
|
1730
1730
|
or a wildcard expression. If you do not specify one of these options, the
|
|
@@ -1787,7 +1787,7 @@ class MlClient(NamespacedClient):
|
|
|
1787
1787
|
"""
|
|
1788
1788
|
Get filters. You can get a single filter or all filters.
|
|
1789
1789
|
|
|
1790
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1790
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-filter.html>`_
|
|
1791
1791
|
|
|
1792
1792
|
:param filter_id: A string that uniquely identifies a filter.
|
|
1793
1793
|
:param from_: Skips the specified number of filters.
|
|
@@ -1851,7 +1851,7 @@ class MlClient(NamespacedClient):
|
|
|
1851
1851
|
that have contributed to, or are to blame for, the anomalies. Influencer results
|
|
1852
1852
|
are available only if an `influencer_field_name` is specified in the job configuration.
|
|
1853
1853
|
|
|
1854
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1854
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-influencer.html>`_
|
|
1855
1855
|
|
|
1856
1856
|
:param job_id: Identifier for the anomaly detection job.
|
|
1857
1857
|
:param desc: If true, the results are sorted in descending order.
|
|
@@ -1932,7 +1932,7 @@ class MlClient(NamespacedClient):
|
|
|
1932
1932
|
"""
|
|
1933
1933
|
Get anomaly detection jobs usage info.
|
|
1934
1934
|
|
|
1935
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1935
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-job-stats.html>`_
|
|
1936
1936
|
|
|
1937
1937
|
:param job_id: Identifier for the anomaly detection job. It can be a job identifier,
|
|
1938
1938
|
a group name, a comma-separated list of jobs, or a wildcard expression. If
|
|
@@ -1993,7 +1993,7 @@ class MlClient(NamespacedClient):
|
|
|
1993
1993
|
detection jobs by using `_all`, by specifying `*` as the `<job_id>`, or by omitting
|
|
1994
1994
|
the `<job_id>`.
|
|
1995
1995
|
|
|
1996
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1996
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-job.html>`_
|
|
1997
1997
|
|
|
1998
1998
|
:param job_id: Identifier for the anomaly detection job. It can be a job identifier,
|
|
1999
1999
|
a group name, or a wildcard expression. If you do not specify one of these
|
|
@@ -2056,7 +2056,7 @@ class MlClient(NamespacedClient):
|
|
|
2056
2056
|
jobs and trained models are using memory, on each node, both within the JVM heap,
|
|
2057
2057
|
and natively, outside of the JVM.
|
|
2058
2058
|
|
|
2059
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2059
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ml-memory.html>`_
|
|
2060
2060
|
|
|
2061
2061
|
:param node_id: The names of particular nodes in the cluster to target. For example,
|
|
2062
2062
|
`nodeId1,nodeId2` or `ml:true`
|
|
@@ -2111,7 +2111,7 @@ class MlClient(NamespacedClient):
|
|
|
2111
2111
|
"""
|
|
2112
2112
|
Get anomaly detection job model snapshot upgrade usage info.
|
|
2113
2113
|
|
|
2114
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2114
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-job-model-snapshot-upgrade-stats.html>`_
|
|
2115
2115
|
|
|
2116
2116
|
:param job_id: Identifier for the anomaly detection job.
|
|
2117
2117
|
:param snapshot_id: A numerical character string that uniquely identifies the
|
|
@@ -2182,7 +2182,7 @@ class MlClient(NamespacedClient):
|
|
|
2182
2182
|
"""
|
|
2183
2183
|
Get model snapshots info.
|
|
2184
2184
|
|
|
2185
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2185
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-snapshot.html>`_
|
|
2186
2186
|
|
|
2187
2187
|
:param job_id: Identifier for the anomaly detection job.
|
|
2188
2188
|
:param snapshot_id: A numerical character string that uniquely identifies the
|
|
@@ -2295,7 +2295,7 @@ class MlClient(NamespacedClient):
|
|
|
2295
2295
|
its default), the `overall_score` is the maximum `overall_score` of the overall
|
|
2296
2296
|
buckets that have a span equal to the jobs' largest bucket span.
|
|
2297
2297
|
|
|
2298
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2298
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-overall-buckets.html>`_
|
|
2299
2299
|
|
|
2300
2300
|
:param job_id: Identifier for the anomaly detection job. It can be a job identifier,
|
|
2301
2301
|
a group name, a comma-separated list of jobs or groups, or a wildcard expression.
|
|
@@ -2400,7 +2400,7 @@ class MlClient(NamespacedClient):
|
|
|
2400
2400
|
found in each bucket, which relates to the number of time series being modeled
|
|
2401
2401
|
and the number of detectors.
|
|
2402
2402
|
|
|
2403
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2403
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-get-record.html>`_
|
|
2404
2404
|
|
|
2405
2405
|
:param job_id: Identifier for the anomaly detection job.
|
|
2406
2406
|
:param desc: Refer to the description for the `desc` query parameter.
|
|
@@ -2488,6 +2488,7 @@ class MlClient(NamespacedClient):
|
|
|
2488
2488
|
],
|
|
2489
2489
|
]
|
|
2490
2490
|
] = None,
|
|
2491
|
+
include_model_definition: t.Optional[bool] = None,
|
|
2491
2492
|
pretty: t.Optional[bool] = None,
|
|
2492
2493
|
size: t.Optional[int] = None,
|
|
2493
2494
|
tags: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -2495,7 +2496,7 @@ class MlClient(NamespacedClient):
|
|
|
2495
2496
|
"""
|
|
2496
2497
|
Get trained model configuration info.
|
|
2497
2498
|
|
|
2498
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2499
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-trained-models.html>`_
|
|
2499
2500
|
|
|
2500
2501
|
:param model_id: The unique identifier of the trained model or a model alias.
|
|
2501
2502
|
You can get information for multiple trained models in a single API request
|
|
@@ -2514,6 +2515,8 @@ class MlClient(NamespacedClient):
|
|
|
2514
2515
|
:param from_: Skips the specified number of models.
|
|
2515
2516
|
:param include: A comma delimited string of optional fields to include in the
|
|
2516
2517
|
response body.
|
|
2518
|
+
:param include_model_definition: parameter is deprecated! Use [include=definition]
|
|
2519
|
+
instead
|
|
2517
2520
|
:param size: Specifies the maximum number of models to obtain.
|
|
2518
2521
|
:param tags: A comma delimited string of tags. A trained model can have many
|
|
2519
2522
|
tags, or none. When supplied, only trained models that contain all the supplied
|
|
@@ -2543,6 +2546,8 @@ class MlClient(NamespacedClient):
|
|
|
2543
2546
|
__query["human"] = human
|
|
2544
2547
|
if include is not None:
|
|
2545
2548
|
__query["include"] = include
|
|
2549
|
+
if include_model_definition is not None:
|
|
2550
|
+
__query["include_model_definition"] = include_model_definition
|
|
2546
2551
|
if pretty is not None:
|
|
2547
2552
|
__query["pretty"] = pretty
|
|
2548
2553
|
if size is not None:
|
|
@@ -2579,7 +2584,7 @@ class MlClient(NamespacedClient):
|
|
|
2579
2584
|
models in a single API request by using a comma-separated list of model IDs or
|
|
2580
2585
|
a wildcard expression.
|
|
2581
2586
|
|
|
2582
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2587
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-trained-models-stats.html>`_
|
|
2583
2588
|
|
|
2584
2589
|
:param model_id: The unique identifier of the trained model or a model alias.
|
|
2585
2590
|
It can be a comma-separated list or a wildcard expression.
|
|
@@ -2642,7 +2647,7 @@ class MlClient(NamespacedClient):
|
|
|
2642
2647
|
"""
|
|
2643
2648
|
Evaluate a trained model.
|
|
2644
2649
|
|
|
2645
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2650
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/infer-trained-model.html>`_
|
|
2646
2651
|
|
|
2647
2652
|
:param model_id: The unique identifier of the trained model.
|
|
2648
2653
|
:param docs: An array of objects to pass to the model for inference. The objects
|
|
@@ -2697,14 +2702,14 @@ class MlClient(NamespacedClient):
|
|
|
2697
2702
|
pretty: t.Optional[bool] = None,
|
|
2698
2703
|
) -> ObjectApiResponse[t.Any]:
|
|
2699
2704
|
"""
|
|
2700
|
-
|
|
2705
|
+
Get machine learning information. Get defaults and limits used by machine learning.
|
|
2701
2706
|
This endpoint is designed to be used by a user interface that needs to fully
|
|
2702
2707
|
understand machine learning configurations where some options are not specified,
|
|
2703
2708
|
meaning that the defaults should be used. This endpoint may be used to find out
|
|
2704
2709
|
what those defaults are. It also provides information about the maximum size
|
|
2705
2710
|
of machine learning jobs that could run in the current cluster configuration.
|
|
2706
2711
|
|
|
2707
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2712
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-ml-info.html>`_
|
|
2708
2713
|
"""
|
|
2709
2714
|
__path_parts: t.Dict[str, str] = {}
|
|
2710
2715
|
__path = "/_ml/info"
|
|
@@ -2749,7 +2754,7 @@ class MlClient(NamespacedClient):
|
|
|
2749
2754
|
job is ready to resume its analysis from where it left off, once new data is
|
|
2750
2755
|
received.
|
|
2751
2756
|
|
|
2752
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2757
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-open-job.html>`_
|
|
2753
2758
|
|
|
2754
2759
|
:param job_id: Identifier for the anomaly detection job.
|
|
2755
2760
|
:param timeout: Refer to the description for the `timeout` query parameter.
|
|
@@ -2803,7 +2808,7 @@ class MlClient(NamespacedClient):
|
|
|
2803
2808
|
"""
|
|
2804
2809
|
Add scheduled events to the calendar.
|
|
2805
2810
|
|
|
2806
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2811
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-post-calendar-event.html>`_
|
|
2807
2812
|
|
|
2808
2813
|
:param calendar_id: A string that uniquely identifies a calendar.
|
|
2809
2814
|
:param events: A list of one of more scheduled events. The event’s start and
|
|
@@ -2861,7 +2866,7 @@ class MlClient(NamespacedClient):
|
|
|
2861
2866
|
data can be accepted from only a single connection at a time. It is not currently
|
|
2862
2867
|
possible to post data to multiple jobs using wildcards or a comma-separated list.
|
|
2863
2868
|
|
|
2864
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2869
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-post-data.html>`_
|
|
2865
2870
|
|
|
2866
2871
|
:param job_id: Identifier for the anomaly detection job. The job must have a
|
|
2867
2872
|
state of open to receive and process the data.
|
|
@@ -2925,7 +2930,7 @@ class MlClient(NamespacedClient):
|
|
|
2925
2930
|
Preview features used by data frame analytics. Previews the extracted features
|
|
2926
2931
|
used by a data frame analytics config.
|
|
2927
2932
|
|
|
2928
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2933
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/preview-dfanalytics.html>`_
|
|
2929
2934
|
|
|
2930
2935
|
:param id: Identifier for the data frame analytics job.
|
|
2931
2936
|
:param config: A data frame analytics config as described in create data frame
|
|
@@ -2995,7 +3000,7 @@ class MlClient(NamespacedClient):
|
|
|
2995
3000
|
that accurately reflects the behavior of the datafeed, use the appropriate credentials.
|
|
2996
3001
|
You can also use secondary authorization headers to supply the credentials.
|
|
2997
3002
|
|
|
2998
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3003
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-preview-datafeed.html>`_
|
|
2999
3004
|
|
|
3000
3005
|
:param datafeed_id: A numerical character string that uniquely identifies the
|
|
3001
3006
|
datafeed. This identifier can contain lowercase alphanumeric characters (a-z
|
|
@@ -3071,7 +3076,7 @@ class MlClient(NamespacedClient):
|
|
|
3071
3076
|
"""
|
|
3072
3077
|
Create a calendar.
|
|
3073
3078
|
|
|
3074
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3079
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-calendar.html>`_
|
|
3075
3080
|
|
|
3076
3081
|
:param calendar_id: A string that uniquely identifies a calendar.
|
|
3077
3082
|
:param description: A description of the calendar.
|
|
@@ -3125,7 +3130,7 @@ class MlClient(NamespacedClient):
|
|
|
3125
3130
|
"""
|
|
3126
3131
|
Add anomaly detection job to calendar.
|
|
3127
3132
|
|
|
3128
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3133
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-calendar-job.html>`_
|
|
3129
3134
|
|
|
3130
3135
|
:param calendar_id: A string that uniquely identifies a calendar.
|
|
3131
3136
|
:param job_id: An identifier for the anomaly detection jobs. It can be a job
|
|
@@ -3169,9 +3174,11 @@ class MlClient(NamespacedClient):
|
|
|
3169
3174
|
"description",
|
|
3170
3175
|
"headers",
|
|
3171
3176
|
"max_num_threads",
|
|
3177
|
+
"meta",
|
|
3172
3178
|
"model_memory_limit",
|
|
3173
3179
|
"version",
|
|
3174
3180
|
),
|
|
3181
|
+
parameter_aliases={"_meta": "meta"},
|
|
3175
3182
|
ignore_deprecated_options={"headers"},
|
|
3176
3183
|
)
|
|
3177
3184
|
def put_data_frame_analytics(
|
|
@@ -3189,6 +3196,7 @@ class MlClient(NamespacedClient):
|
|
|
3189
3196
|
headers: t.Optional[t.Mapping[str, t.Union[str, t.Sequence[str]]]] = None,
|
|
3190
3197
|
human: t.Optional[bool] = None,
|
|
3191
3198
|
max_num_threads: t.Optional[int] = None,
|
|
3199
|
+
meta: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3192
3200
|
model_memory_limit: t.Optional[str] = None,
|
|
3193
3201
|
pretty: t.Optional[bool] = None,
|
|
3194
3202
|
version: t.Optional[str] = None,
|
|
@@ -3197,9 +3205,13 @@ class MlClient(NamespacedClient):
|
|
|
3197
3205
|
"""
|
|
3198
3206
|
Create a data frame analytics job. This API creates a data frame analytics job
|
|
3199
3207
|
that performs an analysis on the source indices and stores the outcome in a destination
|
|
3200
|
-
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.
|
|
3201
3213
|
|
|
3202
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3214
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-dfanalytics.html>`_
|
|
3203
3215
|
|
|
3204
3216
|
:param id: Identifier for the data frame analytics job. This identifier can contain
|
|
3205
3217
|
lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
|
@@ -3249,6 +3261,7 @@ class MlClient(NamespacedClient):
|
|
|
3249
3261
|
Using more threads may decrease the time necessary to complete the analysis
|
|
3250
3262
|
at the cost of using more CPU. Note that the process may use additional threads
|
|
3251
3263
|
for operational functionality other than the analysis itself.
|
|
3264
|
+
:param meta:
|
|
3252
3265
|
:param model_memory_limit: The approximate maximum amount of memory resources
|
|
3253
3266
|
that are permitted for analytical processing. If your `elasticsearch.yml`
|
|
3254
3267
|
file contains an `xpack.ml.max_model_memory_limit` setting, an error occurs
|
|
@@ -3293,6 +3306,8 @@ class MlClient(NamespacedClient):
|
|
|
3293
3306
|
__body["headers"] = headers
|
|
3294
3307
|
if max_num_threads is not None:
|
|
3295
3308
|
__body["max_num_threads"] = max_num_threads
|
|
3309
|
+
if meta is not None:
|
|
3310
|
+
__body["_meta"] = meta
|
|
3296
3311
|
if model_memory_limit is not None:
|
|
3297
3312
|
__body["model_memory_limit"] = model_memory_limit
|
|
3298
3313
|
if version is not None:
|
|
@@ -3311,6 +3326,7 @@ class MlClient(NamespacedClient):
|
|
|
3311
3326
|
@_rewrite_parameters(
|
|
3312
3327
|
body_fields=(
|
|
3313
3328
|
"aggregations",
|
|
3329
|
+
"aggs",
|
|
3314
3330
|
"chunking_config",
|
|
3315
3331
|
"delayed_data_check_config",
|
|
3316
3332
|
"frequency",
|
|
@@ -3333,6 +3349,7 @@ class MlClient(NamespacedClient):
|
|
|
3333
3349
|
*,
|
|
3334
3350
|
datafeed_id: str,
|
|
3335
3351
|
aggregations: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
3352
|
+
aggs: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
3336
3353
|
allow_no_indices: t.Optional[bool] = None,
|
|
3337
3354
|
chunking_config: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3338
3355
|
delayed_data_check_config: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
@@ -3369,7 +3386,8 @@ class MlClient(NamespacedClient):
|
|
|
3369
3386
|
an anomaly detection job. You can associate only one datafeed with each anomaly
|
|
3370
3387
|
detection job. The datafeed contains a query that runs at a defined interval
|
|
3371
3388
|
(`frequency`). If you are concerned about delayed data, you can add a delay (`query_delay')
|
|
3372
|
-
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
|
|
3373
3391
|
remembers which roles the user who created it had at the time of creation and
|
|
3374
3392
|
runs the query using those same roles. If you provide secondary authorization
|
|
3375
3393
|
headers, those credentials are used instead. You must use Kibana, this API, or
|
|
@@ -3377,7 +3395,7 @@ class MlClient(NamespacedClient):
|
|
|
3377
3395
|
directly to the `.ml-config` index. Do not give users `write` privileges on the
|
|
3378
3396
|
`.ml-config` index.
|
|
3379
3397
|
|
|
3380
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3398
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-datafeed.html>`_
|
|
3381
3399
|
|
|
3382
3400
|
:param datafeed_id: A numerical character string that uniquely identifies the
|
|
3383
3401
|
datafeed. This identifier can contain lowercase alphanumeric characters (a-z
|
|
@@ -3386,6 +3404,8 @@ class MlClient(NamespacedClient):
|
|
|
3386
3404
|
:param aggregations: If set, the datafeed performs aggregation searches. Support
|
|
3387
3405
|
for aggregations is limited and should be used only with low cardinality
|
|
3388
3406
|
data.
|
|
3407
|
+
:param aggs: If set, the datafeed performs aggregation searches. Support for
|
|
3408
|
+
aggregations is limited and should be used only with low cardinality data.
|
|
3389
3409
|
:param allow_no_indices: If true, wildcard indices expressions that resolve into
|
|
3390
3410
|
no concrete indices are ignored. This includes the `_all` string or when
|
|
3391
3411
|
no indices are specified.
|
|
@@ -3473,6 +3493,8 @@ class MlClient(NamespacedClient):
|
|
|
3473
3493
|
if not __body:
|
|
3474
3494
|
if aggregations is not None:
|
|
3475
3495
|
__body["aggregations"] = aggregations
|
|
3496
|
+
if aggs is not None:
|
|
3497
|
+
__body["aggs"] = aggs
|
|
3476
3498
|
if chunking_config is not None:
|
|
3477
3499
|
__body["chunking_config"] = chunking_config
|
|
3478
3500
|
if delayed_data_check_config is not None:
|
|
@@ -3532,7 +3554,7 @@ class MlClient(NamespacedClient):
|
|
|
3532
3554
|
more anomaly detection jobs. Specifically, filters are referenced in the `custom_rules`
|
|
3533
3555
|
property of detector configuration objects.
|
|
3534
3556
|
|
|
3535
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3557
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-filter.html>`_
|
|
3536
3558
|
|
|
3537
3559
|
:param filter_id: A string that uniquely identifies a filter.
|
|
3538
3560
|
:param description: A description of the filter.
|
|
@@ -3595,6 +3617,7 @@ class MlClient(NamespacedClient):
|
|
|
3595
3617
|
analysis_config: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3596
3618
|
data_description: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3597
3619
|
allow_lazy_open: t.Optional[bool] = None,
|
|
3620
|
+
allow_no_indices: t.Optional[bool] = None,
|
|
3598
3621
|
analysis_limits: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3599
3622
|
background_persist_interval: t.Optional[
|
|
3600
3623
|
t.Union[str, t.Literal[-1], t.Literal[0]]
|
|
@@ -3604,9 +3627,19 @@ class MlClient(NamespacedClient):
|
|
|
3604
3627
|
datafeed_config: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3605
3628
|
description: t.Optional[str] = None,
|
|
3606
3629
|
error_trace: t.Optional[bool] = None,
|
|
3630
|
+
expand_wildcards: t.Optional[
|
|
3631
|
+
t.Union[
|
|
3632
|
+
t.Sequence[
|
|
3633
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3634
|
+
],
|
|
3635
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3636
|
+
]
|
|
3637
|
+
] = None,
|
|
3607
3638
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3608
3639
|
groups: t.Optional[t.Sequence[str]] = None,
|
|
3609
3640
|
human: t.Optional[bool] = None,
|
|
3641
|
+
ignore_throttled: t.Optional[bool] = None,
|
|
3642
|
+
ignore_unavailable: t.Optional[bool] = None,
|
|
3610
3643
|
model_plot_config: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3611
3644
|
model_snapshot_retention_days: t.Optional[int] = None,
|
|
3612
3645
|
pretty: t.Optional[bool] = None,
|
|
@@ -3617,9 +3650,10 @@ class MlClient(NamespacedClient):
|
|
|
3617
3650
|
) -> ObjectApiResponse[t.Any]:
|
|
3618
3651
|
"""
|
|
3619
3652
|
Create an anomaly detection job. If you include a `datafeed_config`, you must
|
|
3620
|
-
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}}`.
|
|
3621
3655
|
|
|
3622
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3656
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-put-job.html>`_
|
|
3623
3657
|
|
|
3624
3658
|
:param job_id: The identifier for the anomaly detection job. This identifier
|
|
3625
3659
|
can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and
|
|
@@ -3641,6 +3675,9 @@ class MlClient(NamespacedClient):
|
|
|
3641
3675
|
to true, the open anomaly detection jobs API does not return an error and
|
|
3642
3676
|
the job waits in the opening state until sufficient machine learning node
|
|
3643
3677
|
capacity is available.
|
|
3678
|
+
:param allow_no_indices: If `true`, wildcard indices expressions that resolve
|
|
3679
|
+
into no concrete indices are ignored. This includes the `_all` string or
|
|
3680
|
+
when no indices are specified.
|
|
3644
3681
|
:param analysis_limits: Limits can be applied for the resources required to hold
|
|
3645
3682
|
the mathematical models in memory. These limits are approximate and can be
|
|
3646
3683
|
set per job. They do not control the memory used by other processes, for
|
|
@@ -3664,7 +3701,20 @@ class MlClient(NamespacedClient):
|
|
|
3664
3701
|
using those same roles. If you provide secondary authorization headers, those
|
|
3665
3702
|
credentials are used instead.
|
|
3666
3703
|
:param description: A description of the job.
|
|
3704
|
+
:param expand_wildcards: Type of index that wildcard patterns can match. If the
|
|
3705
|
+
request can target data streams, this argument determines whether wildcard
|
|
3706
|
+
expressions match hidden data streams. Supports comma-separated values. Valid
|
|
3707
|
+
values are: * `all`: Match any data stream or index, including hidden ones.
|
|
3708
|
+
* `closed`: Match closed, non-hidden indices. Also matches any non-hidden
|
|
3709
|
+
data stream. Data streams cannot be closed. * `hidden`: Match hidden data
|
|
3710
|
+
streams and hidden indices. Must be combined with `open`, `closed`, or both.
|
|
3711
|
+
* `none`: Wildcard patterns are not accepted. * `open`: Match open, non-hidden
|
|
3712
|
+
indices. Also matches any non-hidden data stream.
|
|
3667
3713
|
:param groups: A list of job groups. A job can belong to no groups or many.
|
|
3714
|
+
:param ignore_throttled: If `true`, concrete, expanded or aliased indices are
|
|
3715
|
+
ignored when frozen.
|
|
3716
|
+
:param ignore_unavailable: If `true`, unavailable indices (missing or closed)
|
|
3717
|
+
are ignored.
|
|
3668
3718
|
:param model_plot_config: This advanced configuration option stores model information
|
|
3669
3719
|
along with the results. It provides a more detailed view into anomaly detection.
|
|
3670
3720
|
If you enable model plot it can add considerable overhead to the performance
|
|
@@ -3704,12 +3754,20 @@ class MlClient(NamespacedClient):
|
|
|
3704
3754
|
__path = f'/_ml/anomaly_detectors/{__path_parts["job_id"]}'
|
|
3705
3755
|
__query: t.Dict[str, t.Any] = {}
|
|
3706
3756
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
3757
|
+
if allow_no_indices is not None:
|
|
3758
|
+
__query["allow_no_indices"] = allow_no_indices
|
|
3707
3759
|
if error_trace is not None:
|
|
3708
3760
|
__query["error_trace"] = error_trace
|
|
3761
|
+
if expand_wildcards is not None:
|
|
3762
|
+
__query["expand_wildcards"] = expand_wildcards
|
|
3709
3763
|
if filter_path is not None:
|
|
3710
3764
|
__query["filter_path"] = filter_path
|
|
3711
3765
|
if human is not None:
|
|
3712
3766
|
__query["human"] = human
|
|
3767
|
+
if ignore_throttled is not None:
|
|
3768
|
+
__query["ignore_throttled"] = ignore_throttled
|
|
3769
|
+
if ignore_unavailable is not None:
|
|
3770
|
+
__query["ignore_unavailable"] = ignore_unavailable
|
|
3713
3771
|
if pretty is not None:
|
|
3714
3772
|
__query["pretty"] = pretty
|
|
3715
3773
|
if not __body:
|
|
@@ -3800,7 +3858,7 @@ class MlClient(NamespacedClient):
|
|
|
3800
3858
|
Create a trained model. Enable you to supply a trained model that is not created
|
|
3801
3859
|
by data frame analytics.
|
|
3802
3860
|
|
|
3803
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3861
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-models.html>`_
|
|
3804
3862
|
|
|
3805
3863
|
:param model_id: The unique identifier of the trained model.
|
|
3806
3864
|
:param compressed_definition: The compressed (GZipped and Base64 encoded) inference
|
|
@@ -3914,7 +3972,7 @@ class MlClient(NamespacedClient):
|
|
|
3914
3972
|
common between the old and new trained models for the model alias, the API returns
|
|
3915
3973
|
a warning.
|
|
3916
3974
|
|
|
3917
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3975
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-models-aliases.html>`_
|
|
3918
3976
|
|
|
3919
3977
|
:param model_id: The identifier for the trained model that the alias refers to.
|
|
3920
3978
|
:param model_alias: The alias to create or update. This value cannot end in numbers.
|
|
@@ -3972,7 +4030,7 @@ class MlClient(NamespacedClient):
|
|
|
3972
4030
|
"""
|
|
3973
4031
|
Create part of a trained model definition.
|
|
3974
4032
|
|
|
3975
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4033
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-model-definition-part.html>`_
|
|
3976
4034
|
|
|
3977
4035
|
:param model_id: The unique identifier of the trained model.
|
|
3978
4036
|
:param part: The definition part number. When the definition is loaded for inference
|
|
@@ -4051,7 +4109,7 @@ class MlClient(NamespacedClient):
|
|
|
4051
4109
|
processing (NLP) models. The vocabulary is stored in the index as described in
|
|
4052
4110
|
`inference_config.*.vocabulary` of the trained model definition.
|
|
4053
4111
|
|
|
4054
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4112
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-trained-model-vocabulary.html>`_
|
|
4055
4113
|
|
|
4056
4114
|
:param model_id: The unique identifier of the trained model.
|
|
4057
4115
|
:param vocabulary: The model vocabulary, which must not be empty.
|
|
@@ -4109,7 +4167,7 @@ class MlClient(NamespacedClient):
|
|
|
4109
4167
|
job is ready to start over as if it had just been created. It is not currently
|
|
4110
4168
|
possible to reset multiple jobs using wildcards or a comma separated list.
|
|
4111
4169
|
|
|
4112
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4170
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-reset-job.html>`_
|
|
4113
4171
|
|
|
4114
4172
|
:param job_id: The ID of the job to reset.
|
|
4115
4173
|
:param delete_user_annotations: Specifies whether annotations that have been
|
|
@@ -4169,7 +4227,7 @@ class MlClient(NamespacedClient):
|
|
|
4169
4227
|
For example, you might consider reverting to a saved snapshot after Black Friday
|
|
4170
4228
|
or a critical system failure.
|
|
4171
4229
|
|
|
4172
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4230
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-revert-snapshot.html>`_
|
|
4173
4231
|
|
|
4174
4232
|
:param job_id: Identifier for the anomaly detection job.
|
|
4175
4233
|
:param snapshot_id: You can specify `empty` as the <snapshot_id>. Reverting to
|
|
@@ -4239,7 +4297,7 @@ class MlClient(NamespacedClient):
|
|
|
4239
4297
|
the current value for the upgrade_mode setting by using the get machine learning
|
|
4240
4298
|
info API.
|
|
4241
4299
|
|
|
4242
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4300
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-set-upgrade-mode.html>`_
|
|
4243
4301
|
|
|
4244
4302
|
:param enabled: When `true`, it enables `upgrade_mode` which temporarily halts
|
|
4245
4303
|
all job and datafeed tasks and prohibits new job and datafeed tasks from
|
|
@@ -4294,7 +4352,7 @@ class MlClient(NamespacedClient):
|
|
|
4294
4352
|
exists, it is used as is. You can therefore set up the destination index in advance
|
|
4295
4353
|
with custom settings and mappings.
|
|
4296
4354
|
|
|
4297
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4355
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-dfanalytics.html>`_
|
|
4298
4356
|
|
|
4299
4357
|
:param id: Identifier for the data frame analytics job. This identifier can contain
|
|
4300
4358
|
lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
|
@@ -4356,7 +4414,7 @@ class MlClient(NamespacedClient):
|
|
|
4356
4414
|
headers when you created or updated the datafeed, those credentials are used
|
|
4357
4415
|
instead.
|
|
4358
4416
|
|
|
4359
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4417
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-start-datafeed.html>`_
|
|
4360
4418
|
|
|
4361
4419
|
:param datafeed_id: A numerical character string that uniquely identifies the
|
|
4362
4420
|
datafeed. This identifier can contain lowercase alphanumeric characters (a-z
|
|
@@ -4426,7 +4484,7 @@ class MlClient(NamespacedClient):
|
|
|
4426
4484
|
Start a trained model deployment. It allocates the model to every machine learning
|
|
4427
4485
|
node.
|
|
4428
4486
|
|
|
4429
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4487
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-trained-model-deployment.html>`_
|
|
4430
4488
|
|
|
4431
4489
|
:param model_id: The unique identifier of the trained model. Currently, only
|
|
4432
4490
|
PyTorch models are supported.
|
|
@@ -4510,7 +4568,7 @@ class MlClient(NamespacedClient):
|
|
|
4510
4568
|
Stop data frame analytics jobs. A data frame analytics job can be started and
|
|
4511
4569
|
stopped multiple times throughout its lifecycle.
|
|
4512
4570
|
|
|
4513
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4571
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/stop-dfanalytics.html>`_
|
|
4514
4572
|
|
|
4515
4573
|
:param id: Identifier for the data frame analytics job. This identifier can contain
|
|
4516
4574
|
lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
|
@@ -4576,7 +4634,7 @@ class MlClient(NamespacedClient):
|
|
|
4576
4634
|
Stop datafeeds. A datafeed that is stopped ceases to retrieve data from Elasticsearch.
|
|
4577
4635
|
A datafeed can be started and stopped multiple times throughout its lifecycle.
|
|
4578
4636
|
|
|
4579
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4637
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-stop-datafeed.html>`_
|
|
4580
4638
|
|
|
4581
4639
|
:param datafeed_id: Identifier for the datafeed. You can stop multiple datafeeds
|
|
4582
4640
|
in a single API request by using a comma-separated list of datafeeds or a
|
|
@@ -4638,7 +4696,7 @@ class MlClient(NamespacedClient):
|
|
|
4638
4696
|
"""
|
|
4639
4697
|
Stop a trained model deployment.
|
|
4640
4698
|
|
|
4641
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4699
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/stop-trained-model-deployment.html>`_
|
|
4642
4700
|
|
|
4643
4701
|
:param model_id: The unique identifier of the trained model.
|
|
4644
4702
|
:param allow_no_match: Specifies what to do when the request: contains wildcard
|
|
@@ -4703,7 +4761,7 @@ class MlClient(NamespacedClient):
|
|
|
4703
4761
|
"""
|
|
4704
4762
|
Update a data frame analytics job.
|
|
4705
4763
|
|
|
4706
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4764
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-dfanalytics.html>`_
|
|
4707
4765
|
|
|
4708
4766
|
:param id: Identifier for the data frame analytics job. This identifier can contain
|
|
4709
4767
|
lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
|
|
@@ -4815,7 +4873,7 @@ class MlClient(NamespacedClient):
|
|
|
4815
4873
|
query using those same roles. If you provide secondary authorization headers,
|
|
4816
4874
|
those credentials are used instead.
|
|
4817
4875
|
|
|
4818
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4876
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-datafeed.html>`_
|
|
4819
4877
|
|
|
4820
4878
|
:param datafeed_id: A numerical character string that uniquely identifies the
|
|
4821
4879
|
datafeed. This identifier can contain lowercase alphanumeric characters (a-z
|
|
@@ -4979,7 +5037,7 @@ class MlClient(NamespacedClient):
|
|
|
4979
5037
|
Update a filter. Updates the description of a filter, adds items, or removes
|
|
4980
5038
|
items from the list.
|
|
4981
5039
|
|
|
4982
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5040
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-filter.html>`_
|
|
4983
5041
|
|
|
4984
5042
|
:param filter_id: A string that uniquely identifies a filter.
|
|
4985
5043
|
:param add_items: The items to add to the filter.
|
|
@@ -5070,7 +5128,7 @@ class MlClient(NamespacedClient):
|
|
|
5070
5128
|
Update an anomaly detection job. Updates certain properties of an anomaly detection
|
|
5071
5129
|
job.
|
|
5072
5130
|
|
|
5073
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5131
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-job.html>`_
|
|
5074
5132
|
|
|
5075
5133
|
:param job_id: Identifier for the job.
|
|
5076
5134
|
:param allow_lazy_open: Advanced configuration option. Specifies whether this
|
|
@@ -5198,7 +5256,7 @@ class MlClient(NamespacedClient):
|
|
|
5198
5256
|
"""
|
|
5199
5257
|
Update a snapshot. Updates certain properties of a snapshot.
|
|
5200
5258
|
|
|
5201
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5259
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-update-snapshot.html>`_
|
|
5202
5260
|
|
|
5203
5261
|
:param job_id: Identifier for the anomaly detection job.
|
|
5204
5262
|
:param snapshot_id: Identifier for the model snapshot.
|
|
@@ -5259,7 +5317,7 @@ class MlClient(NamespacedClient):
|
|
|
5259
5317
|
"""
|
|
5260
5318
|
Update a trained model deployment.
|
|
5261
5319
|
|
|
5262
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5320
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-trained-model-deployment.html>`_
|
|
5263
5321
|
|
|
5264
5322
|
:param model_id: The unique identifier of the trained model. Currently, only
|
|
5265
5323
|
PyTorch models are supported.
|
|
@@ -5325,7 +5383,7 @@ class MlClient(NamespacedClient):
|
|
|
5325
5383
|
a time and the upgraded snapshot cannot be the current snapshot of the anomaly
|
|
5326
5384
|
detection job.
|
|
5327
5385
|
|
|
5328
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5386
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ml-upgrade-job-model-snapshot.html>`_
|
|
5329
5387
|
|
|
5330
5388
|
:param job_id: Identifier for the anomaly detection job.
|
|
5331
5389
|
:param snapshot_id: A numerical character string that uniquely identifies the
|
|
@@ -5399,9 +5457,9 @@ class MlClient(NamespacedClient):
|
|
|
5399
5457
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
5400
5458
|
) -> ObjectApiResponse[t.Any]:
|
|
5401
5459
|
"""
|
|
5402
|
-
|
|
5460
|
+
Validate an anomaly detection job.
|
|
5403
5461
|
|
|
5404
|
-
`<https://www.elastic.co/guide/en/machine-learning/8.
|
|
5462
|
+
`<https://www.elastic.co/guide/en/machine-learning/8.17/ml-jobs.html>`_
|
|
5405
5463
|
|
|
5406
5464
|
:param analysis_config:
|
|
5407
5465
|
:param analysis_limits:
|
|
@@ -5469,9 +5527,9 @@ class MlClient(NamespacedClient):
|
|
|
5469
5527
|
pretty: t.Optional[bool] = None,
|
|
5470
5528
|
) -> ObjectApiResponse[t.Any]:
|
|
5471
5529
|
"""
|
|
5472
|
-
|
|
5530
|
+
Validate an anomaly detection job.
|
|
5473
5531
|
|
|
5474
|
-
`<https://www.elastic.co/guide/en/machine-learning/8.
|
|
5532
|
+
`<https://www.elastic.co/guide/en/machine-learning/8.17/ml-jobs.html>`_
|
|
5475
5533
|
|
|
5476
5534
|
:param detector:
|
|
5477
5535
|
"""
|