原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/ml-update-snapshot.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/ml-update-snapshot.html
本地英文版地址: ../en/ml-update-snapshot.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Update model snapshots APIedit
Updates certain properties of a snapshot.
Requestedit
POST _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>/_update
Prerequisitesedit
-
If the Elasticsearch security features are enabled, you must have
manage_mlormanagecluster privileges to use this API. See Security privileges.
Path parametersedit
-
<job_id> - (Required, string) Identifier for the anomaly detection job.
-
<snapshot_id> - (Required, string) A numerical character string that uniquely identifies the model snapshot.
Request bodyedit
The following properties can be updated after the model snapshot is created:
-
description - (Optional, string) A description of the model snapshot.
-
retain -
(Optional, boolean)
If
true, this snapshot will not be deleted during automatic cleanup of snapshots older thanmodel_snapshot_retention_days. However, this snapshot will be deleted when the job is deleted. The default value isfalse.
Examplesedit
POST
_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update
{
"description": "Snapshot 1",
"retain": true
}
When the snapshot is updated, you receive the following results:
{
"acknowledged": true,
"model": {
"job_id": "it_ops_new_logs",
"timestamp": 1491852978000,
"description": "Snapshot 1",
...
"retain": true
}
}