IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Delete trained model aliases API
editDelete trained model aliases API
editDeletes a trained model alias.
Request
editDELETE _ml/trained_models/<model_id>/model_aliases/<model_alias>
Prerequisites
editRequires the manage_ml
cluster privilege. This privilege is included in the
machine_learning_admin
built-in role.
Description
editThis 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.
Path parameters
edit-
model_alias
- (Required, string) The model alias to delete.
-
model_id
- (Required, string) The trained model ID to which the model alias refers.
Examples
editThe following example shows how to delete a model alias (flight_delay_model
)
for a trained model ID (flight-delay-prediction-1574775339910
):
resp = client.ml.delete_trained_model_alias( model_id="flight-delay-prediction-1574775339910", model_alias="flight_delay_model", ) print(resp)
response = client.ml.delete_trained_model_alias( model_id: 'flight-delay-prediction-1574775339910', model_alias: 'flight_delay_model' ) puts response
const response = await client.ml.deleteTrainedModelAlias({ model_id: "flight-delay-prediction-1574775339910", model_alias: "flight_delay_model", }); console.log(response);
DELETE _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model