Method: Elasticsearch::API::IndexLifecycleManagement::Actions#explain_lifecycle

Defined in:
lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb

#explain_lifecycle(arguments = {}) ⇒ Object

Retrieves information about the index’s current lifecycle state, such as the currently executing phase, action, and step.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :index (String)

    The name of the index to explain

  • :only_managed (Boolean)

    filters the indices included in the response to ones managed by ILM

  • :only_errors (Boolean)

    filters the indices included in the response to ones in an ILM error state, implies only_managed

  • :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/index_lifecycle_management/explain_lifecycle.rb', line 34

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

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

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = "#{Utils.__listify(_index)}/_ilm/explain"
  params = Utils.process_params(arguments)

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