Sha256: 34a28120d866a97df6bb5c70b07cee6639233043b084858c8732e2943388ff4a

Contents?: true

Size: 1.22 KB

Versions: 5

Compression:

Stored size: 1.22 KB

Contents

module Elasticsearch
  module XPack
    module API
      module Watcher
        module Actions

          # Acknowledge watch actions to throttle their executions
          #
          # @option arguments [String] :watch_id Watch ID (*Required*)
          # @option arguments [List] :action_id A comma-separated list of the action ids to be acked (default: all)
          # @option arguments [Duration] :master_timeout Specify timeout for watch write operation
          #
          # @see http://www.elastic.co/guide/en/x-pack/current/watcher-api-ack-watch.html
          #
          def ack_watch(arguments={})
            raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id]

            valid_params = [
              :master_timeout,
              :action_id ]

            arguments = arguments.clone
            watch_id  = arguments.delete(:watch_id)

            method = Elasticsearch::API::HTTP_PUT
            path   = "_xpack/watcher/watch/#{watch_id}/_ack"
            params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
            body   = nil

            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.1.0 lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb
elasticsearch-xpack-6.0.0 lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb
elasticsearch-xpack-5.5.0 lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb
elasticsearch-xpack-5.0.0 lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb
elasticsearch-xpack-0.1.0.pre lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb