@@ -411,6 +411,7 @@ public function deleteForecast(array $params = [])
411
411
* job_id: string, // (REQUIRED) The ID of the job to delete
412
412
* force: boolean, // True if the job should be forcefully deleted
413
413
* wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
414
+ * delete_user_annotations: boolean, // Should annotations added by the user be deleted
414
415
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
415
416
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
416
417
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -431,7 +432,7 @@ public function deleteJob(array $params = [])
431
432
$ url = '/_ml/anomaly_detectors/ ' . $ this ->encode ($ params ['job_id ' ]);
432
433
$ method = 'DELETE ' ;
433
434
434
- $ url = $ this ->addQueryString ($ url , $ params , ['force ' ,'wait_for_completion ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
435
+ $ url = $ this ->addQueryString ($ url , $ params , ['force ' ,'wait_for_completion ' ,'delete_user_annotations ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
435
436
$ headers = [
436
437
'Accept ' => 'application/json ' ,
437
438
];
@@ -2186,6 +2187,7 @@ public function putTrainedModelVocabulary(array $params = [])
2186
2187
* @param array{
2187
2188
* job_id: string, // (REQUIRED) The ID of the job to reset
2188
2189
* wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
2190
+ * delete_user_annotations: boolean, // Should annotations added by the user be deleted
2189
2191
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2190
2192
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2191
2193
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -2206,7 +2208,7 @@ public function resetJob(array $params = [])
2206
2208
$ url = '/_ml/anomaly_detectors/ ' . $ this ->encode ($ params ['job_id ' ]) . '/_reset ' ;
2207
2209
$ method = 'POST ' ;
2208
2210
2209
- $ url = $ this ->addQueryString ($ url , $ params , ['wait_for_completion ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2211
+ $ url = $ this ->addQueryString ($ url , $ params , ['wait_for_completion ' ,'delete_user_annotations ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2210
2212
$ headers = [
2211
2213
'Accept ' => 'application/json ' ,
2212
2214
];
@@ -2375,6 +2377,7 @@ public function startDatafeed(array $params = [])
2375
2377
* cache_size: string, // A byte-size value for configuring the inference cache size. For example, 20mb.
2376
2378
* number_of_allocations: int, // The total number of allocations this model is assigned across machine learning nodes.
2377
2379
* threads_per_allocation: int, // The number of threads used by each model allocation during inference.
2380
+ * priority: string, // The deployment priority.
2378
2381
* queue_capacity: int, // Controls how many inference requests are allowed in the queue at a time.
2379
2382
* timeout: time, // Controls the amount of time to wait for the model to deploy.
2380
2383
* wait_for: string, // The allocation status for which to wait
@@ -2398,7 +2401,7 @@ public function startTrainedModelDeployment(array $params = [])
2398
2401
$ url = '/_ml/trained_models/ ' . $ this ->encode ($ params ['model_id ' ]) . '/deployment/_start ' ;
2399
2402
$ method = 'POST ' ;
2400
2403
2401
- $ url = $ this ->addQueryString ($ url , $ params , ['cache_size ' ,'number_of_allocations ' ,'threads_per_allocation ' ,'queue_capacity ' ,'timeout ' ,'wait_for ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2404
+ $ url = $ this ->addQueryString ($ url , $ params , ['cache_size ' ,'number_of_allocations ' ,'threads_per_allocation ' ,'priority ' , ' queue_capacity ' ,'timeout ' ,'wait_for ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2402
2405
$ headers = [
2403
2406
'Accept ' => 'application/json ' ,
2404
2407
'Content-Type ' => 'application/json ' ,
@@ -2717,6 +2720,43 @@ public function updateModelSnapshot(array $params = [])
2717
2720
}
2718
2721
2719
2722
2723
+ /**
2724
+ * Updates certain properties of trained model deployment.
2725
+ *
2726
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html
2727
+ *
2728
+ * @param array{
2729
+ * model_id: string, // (REQUIRED) The unique identifier of the trained model.
2730
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2731
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2732
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2733
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2734
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
2735
+ * body: array, // (REQUIRED) The updated trained model deployment settings
2736
+ * } $params
2737
+ *
2738
+ * @throws MissingParameterException if a required parameter is missing
2739
+ * @throws NoNodeAvailableException if all the hosts are offline
2740
+ * @throws ClientResponseException if the status code of response is 4xx
2741
+ * @throws ServerResponseException if the status code of response is 5xx
2742
+ *
2743
+ * @return Elasticsearch|Promise
2744
+ */
2745
+ public function updateTrainedModelDeployment (array $ params = [])
2746
+ {
2747
+ $ this ->checkRequiredParameters (['model_id ' ,'body ' ], $ params );
2748
+ $ url = '/_ml/trained_models/ ' . $ this ->encode ($ params ['model_id ' ]) . '/deployment/_update ' ;
2749
+ $ method = 'POST ' ;
2750
+
2751
+ $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2752
+ $ headers = [
2753
+ 'Accept ' => 'application/json ' ,
2754
+ 'Content-Type ' => 'application/json ' ,
2755
+ ];
2756
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
2757
+ }
2758
+
2759
+
2720
2760
/**
2721
2761
* Upgrades a given job snapshot to the current major version.
2722
2762
*
0 commit comments