Update a snapshot Generally available; Added in 5.4.0
POST /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update
Console
POST _ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update { "description": "Snapshot 1", "retain": true }
resp = client.ml.update_model_snapshot( job_id="it_ops_new_logs", snapshot_id="1491852978", description="Snapshot 1", retain=True, )
const response = await client.ml.updateModelSnapshot({ job_id: "it_ops_new_logs", snapshot_id: 1491852978, description: "Snapshot 1", retain: true, });
response = client.ml.update_model_snapshot( job_id: "it_ops_new_logs", snapshot_id: "1491852978", body: { "description": "Snapshot 1", "retain": true } )
$resp = $client->ml()->updateModelSnapshot([ "job_id" => "it_ops_new_logs", "snapshot_id" => "1491852978", "body" => [ "description" => "Snapshot 1", "retain" => true, ], ]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"description":"Snapshot 1","retain":true}' "$ELASTICSEARCH_URL/_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update"
Request example
An example body for a `POST` request.
_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update { "description": "Snapshot 1", "retain": true }