[role="xpack"]
[[stop-trained-model-deployment]]
= Stop trained model deployment API
[subs="attributes"]
++++
Stop trained model deployment
++++
Stops a trained model deployment.
[[stop-trained-model-deployment-request]]
== {api-request-title}
`POST _ml/trained_models//deployment/_stop`
[[stop-trained-model-deployment-prereq]]
== {api-prereq-title}
Requires the `manage_ml` cluster privilege. This privilege is included in the
`machine_learning_admin` built-in role.
[[stop-trained-model-deployment-desc]]
== {api-description-title}
Deployment is required only for trained models that have a PyTorch `model_type`.
[[stop-trained-model-deployment-path-params]]
== {api-path-parms-title}
``::
(Required, string)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=model-id]
[[stop-trained-model-deployment-query-params]]
== {api-query-parms-title}
`allow_no_match`::
(Optional, Boolean)
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-match-deployments]
`force`::
(Optional, Boolean) If true, the deployment is stopped even if it or one of its model aliases
is referenced by ingest pipelines. You can't use these pipelines until you restart the model
deployment.
////
[role="child_attributes"]
[[stop-trained-model-deployment-results]]
== {api-response-body-title}
////
////
[[stop-trained-models-response-codes]]
== {api-response-codes-title}
////
////
[[stop-trained-model-deployment-example]]
== {api-examples-title}
////