Method: Elasticsearch::API::MachineLearning::Actions#update_trained_model_deployment
- Defined in:
- lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb
#update_trained_model_deployment(arguments = {}) ⇒ Object
Updates certain properties of trained model deployment. This functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb', line 37 def update_trained_model_deployment(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "ml.update_trained_model_deployment" } defined_params = [:model_id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST path = "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_update" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |