Method: Elasticsearch::API::Transform::Actions#start_transform

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

#start_transform(arguments = {}) ⇒ Object

Starts one or more transforms.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :transform_id (String)

    The id of the transform to start

  • :from (String)

    Restricts the set of transformed entities to those changed after this time

  • :timeout (Time)

    Controls the time to wait for the transform to start

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



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

def start_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)}/_start"
  params = Utils.process_params(arguments)

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