elasticsearch/docs/reference/ml/trained-models/apis/stop-trained-model-deployment.asciidoc
Liam Thompson 33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* Remove `es-test-dir` book-scoped variable

* Remove `plugins-examples-dir` book-scoped variable

* Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables

- In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed.
- In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path
- In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem

* Replace `es-repo-dir` with `es-ref-dir`

* Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
2024-04-17 14:37:07 +02:00

69 lines
1.8 KiB
Text

[role="xpack"]
[[stop-trained-model-deployment]]
= Stop trained model deployment API
[subs="attributes"]
++++
<titleabbrev>Stop trained model deployment</titleabbrev>
++++
Stops a trained model deployment.
[[stop-trained-model-deployment-request]]
== {api-request-title}
`POST _ml/trained_models/<deployment_id>/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}
`<deployment_id>`::
(Required, string)
include::{es-ref-dir}/ml/ml-shared.asciidoc[tag=deployment-id]
[[stop-trained-model-deployment-query-params]]
== {api-query-parms-title}
`allow_no_match`::
(Optional, Boolean)
include::{es-ref-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.
`finish_pending_work`::
(Optional, Boolean) If true, the deployment is stopped after any queued work is completed. Defaults to `false`.
////
[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}
The following example stops the `my_model_for_search` deployment:
[source,console]
--------------------------------------------------
POST _ml/trained_models/my_model_for_search/deployment/_stop
--------------------------------------------------