Sha256: 27787b3acb3d6e84dabd8215cc5738622ed35bf5601ccb678279df415d21badb

Contents?: true

Size: 995 Bytes

Versions: 5

Compression:

Stored size: 995 Bytes

Contents

module Elasticsearch
  module XPack
    module API
      module Watcher
        module Actions

          # Force the execution of a stored watch
          #
          # @option arguments [String] :id Watch ID
          # @option arguments [Hash] :body Execution control
          # @option arguments [Boolean] :debug indicates whether the watch should execute in debug mode
          #
          # @see http://www.elastic.co/guide/en/x-pack/current/watcher-api-execute-watch.html
          #
          def execute_watch(arguments={})
            valid_params = [ :debug ]
            method = Elasticsearch::API::HTTP_PUT

            path   = Elasticsearch::API::Utils.__pathify "_xpack/watcher/watch", arguments.delete(:id), "_execute"

            params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
            body   = arguments[:body]

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
elasticsearch-xpack-6.8.1 lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb
elasticsearch-xpack-6.8.0 lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb
elasticsearch-xpack-6.3.1 lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb
elasticsearch-xpack-6.3.0 lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb
elasticsearch-xpack-6.2.0 lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb