Method: Elasticsearch::API::Transform::Actions#get_transform_stats

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

#get_transform_stats(arguments = {}) ⇒ Object

Retrieves usage information for transforms.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :transform_id (String)

    The id of the transform for which to get stats. ‘_all’ or ‘*’ implies all transforms

  • :from (Number)

    skips a number of transform stats, defaults to 0

  • :size (Number)

    specifies a max number of transform stats to get, defaults to 100

  • :timeout (Time)

    Controls the time to wait for the stats

  • :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)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



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

def get_transform_stats(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_GET
  path   = "_transform/#{Utils.__listify(_transform_id)}/_stats"
  params = Utils.process_params(arguments)

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