elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb
def put_watch(arguments = {})
          raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

          headers = arguments.delete(:headers) || {}

          body = arguments.delete(:body)

          arguments = arguments.clone

          _id = arguments.delete(:id)

          method = Elasticsearch::API::HTTP_PUT
          path   = "_watcher/watch/#{Utils.__listify(_id)}"
          params = Utils.process_params(arguments)

          perform_request(method, path, params, body, headers).body
        end
# Creates a new watch, or updates an existing one.
#
# @option arguments [String] :id Watch ID
# @option arguments [Boolean] :active Specify whether the watch is in/active by default
# @option arguments [Number] :version Explicit version number for concurrency control
# @option arguments [Number] :if_seq_no only update the watch if the last operation that has changed the watch has the specified sequence number
# @option arguments [Number] :if_primary_term only update the watch if the last operation that has changed the watch has the specified primary term
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The watch
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html
#
Creates a new watch, or updates an existing one.
Creates a new watch or updates an existing one .
def put_watch(arguments = {})
          raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
          headers = arguments.delete(:headers) || {}
          body = arguments.delete(:body)
          arguments = arguments.clone
          _id = arguments.delete(:id)
          method = Elasticsearch::API::HTTP_PUT
          path   = "_watcher/watch/#{Utils.__listify(_id)}"
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def put_watch ( arguments = { } ) raise ArgumentError , "Required argument 'id' missing" unless arguments [ :id ] headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone _id = arguments . delete ( :id ) method = Elasticsearch :: API :: HTTP_PUT path = "_watcher/watch/#{Utils.__listify(_id)}" params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Creates a new watch, or updates an existing one.
Creates a new watch or updates an existing one .
arguments
:body The watch
: body The watch
see
None