Method: Elasticsearch::API::Transform::Actions#schedule_now_transform

Defined in:
lib/elasticsearch/api/actions/transform/schedule_now_transform.rb

#schedule_now_transform(arguments = {}) ⇒ Object

Schedules now a transform.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :transform_id (String)

    The id of the transform. (Required)

  • :timeout (Time)

    Controls the time to wait for the scheduling to take place

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elasticsearch/api/actions/transform/schedule_now_transform.rb', line 33

def schedule_now_transform(arguments = {})
  raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id]

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

  body = nil

  _transform_id = arguments.delete(:transform_id)

  method = Elasticsearch::API::HTTP_POST
  path   = "_transform/#{Utils.__listify(_transform_id)}/_schedule_now"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers)
  )
end