Sha256: d83212458c67232bbf3fc65bbef4ee6d7d7e8a665eed233b372d80d1a08c2175

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information

module Elasticsearch
  module XPack
    module API
      module MachineLearning
        module Actions

          # Updates the description of a filter, adds items, or removes items.
          #
          # @option arguments [String] :filter_id The ID of the filter to update (*Required*)
          # @option arguments [Hash] :body The filter update (*Required*)
          #
          def update_filter(arguments={})
            raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
            raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
            method = Elasticsearch::API::HTTP_POST
            path = "_xpack/ml/filters/#{arguments[:filter_id]}/_update"
            params = {}
            body   = arguments[:body]

            perform_request(method, path, params, body).body
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
elasticsearch-xpack-6.8.3 lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb
elasticsearch-xpack-6.8.2 lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb
elasticsearch-xpack-7.4.0 lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb
elasticsearch-xpack-7.3.0 lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb