Delete a trained model alias
Generally available; Added in 7.13.0
This API deletes an existing model alias that refers to a trained model. If
the model alias is missing or refers to a model other than the one identified
by the model_id
, this API returns an error.
highlight#highlightFromAnchor" href="#topic-required-authorization"> Required authorization
- Cluster privileges:
manage_ml
DELETE
/_ml/trained_models/{model_id}/model_aliases/{model_alias}
dropdown#toggle click@window->dropdown#hide touchend@window->dropdown#hide"
data-dropdown-target="button"
data-scrollable="false"
data-headings="false"
aria-expanded="false"
aria-haspopup="true"
role="menu"
tabindex="0">
Console
DELETE _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model
resp = client.ml.delete_trained_model_alias(
model_id="flight-delay-prediction-1574775339910",
model_alias="flight_delay_model",
)
const response = await client.ml.deleteTrainedModelAlias({
model_id: "flight-delay-prediction-1574775339910",
model_alias: "flight_delay_model",
});
response = client.ml.delete_trained_model_alias(
model_id: "flight-delay-prediction-1574775339910",
model_alias: "flight_delay_model"
)
$resp = $client->ml()->deleteTrainedModelAlias([
"model_id" => "flight-delay-prediction-1574775339910",
"model_alias" => "flight_delay_model",
]);
curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model"
client.ml().deleteTrainedModelAlias(d -> d
.modelAlias("flight_delay_model")
.modelId("flight-delay-prediction-1574775339910")
);
Response examples (200)
A successful response when deleting a trained model alias.
{
"acknowledged": true
}