Method: ElasticsearchServerless::API::MachineLearning::Actions#get_data_frame_analytics

Defined in:
lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb

#get_data_frame_analytics(arguments = {}) ⇒ Object

Get data frame analytics job configuration info. You can get information for multiple data frame analytics jobs in a single API request by using a comma-separated list of data frame analytics jobs or a wildcard expression.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Identifier for the data frame analytics job. If you do not specify this option, the API returns information for the first hundred data frame analytics jobs.

  • :allow_no_match (Boolean)

    Specifies what to do when the request:

    • Contains wildcard expressions and there are no data frame analytics

    jobs that match.

    • Contains the _all string or no identifiers and there are no matches.

    • Contains wildcard expressions and there are only partial matches.

    The default value returns an empty data_frame_analytics array when there are no matches and the subset of results when there are partial matches. If this parameter is false, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :from (Integer)

    Skips the specified number of data frame analytics jobs. Server default: 0.

  • :size (Integer)

    Specifies the maximum number of data frame analytics jobs to obtain. Server default: 100.

  • :exclude_generated (Boolean)

    Indicates if certain fields should be removed from the configuration on retrieval. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster.

  • :headers (Hash)

    Custom HTTP headers

See Also:



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb', line 51

def get_data_frame_analytics(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'ml.get_data_frame_analytics' }

  defined_params = [:id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

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

  body = nil

  _id = arguments.delete(:id)

  method = ElasticsearchServerless::API::HTTP_GET
  path   = if _id
             "_ml/data_frame/analytics/#{Utils.listify(_id)}"
           else
             '_ml/data_frame/analytics'
           end
  params = Utils.process_params(arguments)

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