Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ module Elasticsearch
module API
module Watcher
module Actions
# Creates a new watch, or updates an existing one.
# Create or update a watch
#
# @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
# @option arguments [Hash] :body The watch (*Required*)
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.19/watcher-api-put-watch.html
# @see https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-put-watch
#
def put_watch(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'watcher.put_watch' }
Expand All @@ -42,6 +42,7 @@ def put_watch(arguments = {})
end
request_opts[:defined_params] = defined_params unless defined_params.empty?

raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]

arguments = arguments.clone
Expand Down

This file was deleted.