Method: Elasticsearch::API::Transform::Actions#update_transform

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

#update_transform(arguments = {}) ⇒ Object

Updates certain properties of a transform.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :transform_id (String)

    The id of the transform. (Required)

  • :defer_validation (Boolean)

    If validations should be deferred until transform starts, defaults to false.

  • :timeout (Time)

    Controls the time to wait for the update

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    The update transform definition (Required)

Raises:

  • (ArgumentError)

See Also:



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

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

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

  body = arguments.delete(:body)

  _transform_id = arguments.delete(:transform_id)

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

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