[[reference-ml-start_trained_model_deployment]]

////////
===========================================================================================================================
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
||        ██████╗ ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗                                                            ||
||        ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝                                                            ||
||        ██████╔╝█████╗  ███████║██║  ██║██╔████╔██║█████╗                                                              ||
||        ██╔══██╗██╔══╝  ██╔══██║██║  ██║██║╚██╔╝██║██╔══╝                                                              ||
||        ██║  ██║███████╗██║  ██║██████╔╝██║ ╚═╝ ██║███████╗                                                            ||
||        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚═╝     ╚═╝╚══════╝                                                            ||
||                                                                                                                       ||
||                                                                                                                       ||
||    This file is autogenerated, DO NOT send pull requests that changes this file directly.                             ||
||    You should update the script that does the generation, which can be found in:                                      ||
||    https://github.com/elastic/elastic-client-generator-js                                                             ||
||                                                                                                                       ||
||    You can run the script with the following command:                                                                 ||
||       npm run elasticsearch -- --version <version>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////

[discrete]
=== client.ml.startTrainedModelDeployment

Start a trained model deployment. It allocates the model to every machine learning node.

{ref}/start-trained-model-deployment.html[{es} documentation]

[discrete]
==== Function signature

[source,ts]
----
(MlStartTrainedModelDeploymentRequest, options?): Promise<MlStartTrainedModelDeploymentResponse>
----

[discrete]
===== `MlStartTrainedModelDeploymentRequest`

[source,ts]
----
interface MlStartTrainedModelDeploymentRequest extends <<shared-type-request-base, RequestBase>> {
  model_id: <<shared-type-id, Id>>
  cache_size?: <<shared-type-byte-size, ByteSize>>
  deployment_id?: string
  number_of_allocations?: <<shared-type-integer, integer>>
  priority?: MlTrainingPriority
  queue_capacity?: <<shared-type-integer, integer>>
  threads_per_allocation?: <<shared-type-integer, integer>>
  timeout?: <<shared-type-duration, Duration>>
  wait_for?: MlDeploymentAllocationState
}
----

[discrete]
===== `MlStartTrainedModelDeploymentResponse`

[source,ts]
----
interface MlStartTrainedModelDeploymentResponse {
  assignment: MlTrainedModelAssignment
}
----

