Method: Elasticsearch::API::Transform::Actions#stop_transform

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

#stop_transform(arguments = {}) ⇒ Object

Stops 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 stop

  • :force (Boolean)

    Whether to force stop a failed transform or not. Default to false

  • :wait_for_completion (Boolean)

    Whether to wait for the transform to fully stop before returning or not. Default to false

  • :timeout (Time)

    Controls the time to wait until the transform has stopped. Default to 30 seconds

  • :allow_no_match (Boolean)

    Whether to ignore if a wildcard expression matches no transforms. (This includes _all string or when no transforms have been specified)

  • :wait_for_checkpoint (Boolean)

    Whether to wait for the transform to reach a checkpoint before stopping. Default to false

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



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

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

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