Module: ElasticsearchServerless::API::MachineLearning::Actions

Defined in:
lib/elasticsearch-serverless/api/machine_learning/put_job.rb,
lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb,
lib/elasticsearch-serverless/api/machine_learning/open_job.rb,
lib/elasticsearch-serverless/api/machine_learning/close_job.rb,
lib/elasticsearch-serverless/api/machine_learning/flush_job.rb,
lib/elasticsearch-serverless/api/machine_learning/reset_job.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_job.rb,
lib/elasticsearch-serverless/api/machine_learning/put_filter.rb,
lib/elasticsearch-serverless/api/machine_learning/update_job.rb,
lib/elasticsearch-serverless/api/machine_learning/get_filters.rb,
lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb,
lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb,
lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb,
lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb,
lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb,
lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb,
lib/elasticsearch-serverless/api/machine_learning/update_filter.rb,
lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb,
lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb,
lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb,
lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb,
lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb,
lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb,
lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb,
lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb,
lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb,
lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb,
lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb,
lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb,
lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb,
lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb,
lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb,
lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb,
lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb,
lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb,
lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb,
lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb,
lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb,
lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb,
lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb,
lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb,
lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb,
lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb

Instance Method Summary collapse

Instance Method Details

#close_job(arguments = {}) ⇒ Object

Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. You can close multiple anomaly detection jobs in a single API request by using a group name, a comma-separated list of jobs, or a wildcard expression. You can close all jobs by using _all or by specifying * as the job identifier. (Required)

  • :allow_no_match (Boolean)

    Specifies what to do when the request: contains wildcard expressions and there are no jobs that match; contains the _all string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches. By default, it returns an empty jobs array when there are no matches and the subset of results when there are partial matches. If false, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :force (Boolean)

    Use to close a failed job, or to forcefully close a job which has not responded to its initial close request; the request returns without performing the associated actions such as flushing buffers and persisting the model snapshots. If you want the job to be in a consistent state after the close job API returns, do not set to true. This parameter should be used only in situations where the job has already failed or where you are not interested in results the job might have recently produced or might produce in the future.

  • :timeout (Time)

    Controls the time to wait until a job has closed. Server default: 30m.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

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-serverless/api/machine_learning/close_job.rb', line 36

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

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

  body = arguments.delete(:body)

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_close"
  params = Utils.process_params(arguments)

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

#delete_calendar(arguments = {}) ⇒ Object

Deletes a calendar.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. (Required)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb', line 32

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

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

  body = nil

  _calendar_id = arguments.delete(:calendar_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/calendars/#{Utils.listify(_calendar_id)}"
  params = {}

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

#delete_calendar_event(arguments = {}) ⇒ Object

Deletes scheduled events from a calendar.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. (Required)

  • :event_id (String)

    Identifier for the scheduled event. You can obtain this identifier by using the get calendar events API. (Required)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb', line 33

def delete_calendar_event(arguments = {})
  raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
  raise ArgumentError, "Required argument 'event_id' missing" unless arguments[:event_id]

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

  body = nil

  _calendar_id = arguments.delete(:calendar_id)

  _event_id = arguments.delete(:event_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/calendars/#{Utils.listify(_calendar_id)}/events/#{Utils.listify(_event_id)}"
  params = {}

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

#delete_calendar_job(arguments = {}) ⇒ Object

Deletes anomaly detection jobs from a calendar.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. (Required)

  • :job_id (String, Array)

    An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups. (Required)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb', line 33

def delete_calendar_job(arguments = {})
  raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
  raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]

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

  body = nil

  _calendar_id = arguments.delete(:calendar_id)

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/calendars/#{Utils.listify(_calendar_id)}/jobs/#{Utils.listify(_job_id)}"
  params = {}

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

#delete_data_frame_analytics(arguments = {}) ⇒ Object

Deletes an existing data frame analytics job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Identifier for the data frame analytics job. (Required)

  • :force (Boolean)

    If true, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job.

  • :timeout (Time)

    The time to wait for the job to be deleted. Server default: 1m.

  • :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-serverless/api/machine_learning/delete_data_frame_analytics.rb', line 34

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

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

  body = nil

  _id = arguments.delete(:id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/data_frame/analytics/#{Utils.listify(_id)}"
  params = Utils.process_params(arguments)

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

#delete_datafeed(arguments = {}) ⇒ Object

Deletes an existing datafeed.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String)

    A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :force (Boolean)

    Use to forcefully delete a started datafeed; this method is quicker than stopping and deleting the datafeed.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb', line 33

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

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

  body = nil

  _datafeed_id = arguments.delete(:datafeed_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}"
  params = Utils.process_params(arguments)

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

#delete_filter(arguments = {}) ⇒ Object

Deletes a filter.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :filter_id (String)

    A string that uniquely identifies a filter. (Required)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb', line 32

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

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

  body = nil

  _filter_id = arguments.delete(:filter_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/filters/#{Utils.listify(_filter_id)}"
  params = {}

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

#delete_job(arguments = {}) ⇒ Object

Deletes an existing anomaly detection job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    Identifier for the anomaly detection job. (Required)

  • :force (Boolean)

    Use to forcefully delete an opened job; this method is quicker than closing and deleting the job.

  • :delete_user_annotations (Boolean)

    Specifies whether annotations that have been added by the user should be deleted along with any auto-generated annotations when the job is reset.

  • :wait_for_completion (Boolean)

    Specifies whether the request should return immediately or wait until the job deletion completes. Server default: true.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_job.rb', line 35

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

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

  body = nil

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}"
  params = Utils.process_params(arguments)

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

#delete_trained_model(arguments = {}) ⇒ Object

Deletes an existing trained inference model that is currently not referenced by an ingest pipeline.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The unique identifier of the trained model. (Required)

  • :force (Boolean)

    Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb', line 33

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

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

  body = nil

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}"
  params = Utils.process_params(arguments)

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

#delete_trained_model_alias(arguments = {}) ⇒ Object

Deletes a model alias that refers to the trained model

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_alias (String)

    The model alias to delete. (Required)

  • :model_id (String)

    The trained model ID to which the model alias refers. (Required)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb', line 33

def delete_trained_model_alias(arguments = {})
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
  raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias]

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

  body = nil

  _model_alias = arguments.delete(:model_alias)

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_DELETE
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}/model_aliases/#{Utils.listify(_model_alias)}"
  params = {}

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

#estimate_model_memory(arguments = {}) ⇒ Object

Estimates the model memory

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb', line 32

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

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

  body = arguments.delete(:body)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/anomaly_detectors/_estimate_model_memory"
  params = {}

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

#evaluate_data_frame(arguments = {}) ⇒ Object

Evaluates the data frame analytics for an annotated index.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb', line 32

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

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

  body = arguments.delete(:body)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/data_frame/_evaluate"
  params = {}

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

#flush_job(arguments = {}) ⇒ Object

Forces any buffered data to be processed by the job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    Identifier for the anomaly detection job. (Required)

  • :advance_time (String, Time)

    Specifies to advance to a particular time value. Results are generated and the model is updated for data from the specified time interval.

  • :calc_interim (Boolean)

    If true, calculates the interim results for the most recent bucket or all buckets within the latency period.

  • :end (String, Time)

    When used in conjunction with calc_interim and start, specifies the range of buckets on which to calculate interim results.

  • :skip_time (String, Time)

    Specifies to skip to a particular time value. Results are not generated and the model is not updated for data from the specified time interval.

  • :start (String, Time)

    When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch-serverless/api/machine_learning/flush_job.rb', line 38

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

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

  body = arguments.delete(:body)

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_flush"
  params = Utils.process_params(arguments)

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

#get_calendar_events(arguments = {}) ⇒ Object

Retrieves information about the scheduled events in calendars.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using _all or * or by omitting the calendar identifier. (Required)

  • :end (String, Time)

    Specifies to get events with timestamps earlier than this time.

  • :from (Integer)

    Skips the specified number of events. Server default: 0.

  • :job_id (String)

    Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of _all or *.

  • :size (Integer)

    Specifies the maximum number of events to obtain. Server default: 100.

  • :start (String, Time)

    Specifies to get events with timestamps after this time.

  • :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-serverless/api/machine_learning/get_calendar_events.rb', line 37

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

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

  body = nil

  _calendar_id = arguments.delete(:calendar_id)

  method = ElasticsearchServerless::API::HTTP_GET
  path   = "_ml/calendars/#{Utils.listify(_calendar_id)}/events"
  params = Utils.process_params(arguments)

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

#get_calendars(arguments = {}) ⇒ Object

Retrieves configuration information for calendars.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using _all or * or by omitting the calendar identifier.

  • :from (Integer)

    Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier. Server default: 0.

  • :size (Integer)

    Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier. Server default: 10000.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb', line 35

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

  body = arguments.delete(:body)

  _calendar_id = arguments.delete(:calendar_id)

  method = if body
             ElasticsearchServerless::API::HTTP_POST
           else
             ElasticsearchServerless::API::HTTP_GET
           end

  path   = if _calendar_id
             "_ml/calendars/#{Utils.listify(_calendar_id)}"
           else
             "_ml/calendars"
           end
  params = Utils.process_params(arguments)

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

#get_data_frame_analytics(arguments = {}) ⇒ Object

Retrieves configuration information for data frame analytics jobs.

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: 1. Contains wildcard expressions and there are no data frame analytics jobs that match. 2. Contains the _all string or no identifiers and there are no matches. 3. 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:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb', line 36

def get_data_frame_analytics(arguments = {})
  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)
  )
end

#get_data_frame_analytics_stats(arguments = {}) ⇒ Object

Retrieves usage information for data frame analytics jobs.

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: 1. Contains wildcard expressions and there are no data frame analytics jobs that match. 2. Contains the _all string or no identifiers and there are no matches. 3. 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.

  • :verbose (Boolean)

    Defines whether the stats response should be verbose.

  • :headers (Hash)

    Custom HTTP headers

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb', line 36

def get_data_frame_analytics_stats(arguments = {})
  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)}/_stats"
           else
             "_ml/data_frame/analytics/_stats"
           end
  params = Utils.process_params(arguments)

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

#get_datafeed_stats(arguments = {}) ⇒ Object

Retrieves usage information for datafeeds.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String, Array)

    Identifier for the datafeed. It can be a datafeed identifier or a wildcard expression. If you do not specify one of these options, the API returns information about all datafeeds.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: 1. Contains wildcard expressions and there are no datafeeds that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value is true, which returns an empty datafeeds 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.

  • :headers (Hash)

    Custom HTTP headers

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb', line 33

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

  body = nil

  _datafeed_id = arguments.delete(:datafeed_id)

  method = ElasticsearchServerless::API::HTTP_GET
  path   = if _datafeed_id
             "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_stats"
           else
             "_ml/datafeeds/_stats"
           end
  params = Utils.process_params(arguments)

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

#get_datafeeds(arguments = {}) ⇒ Object

Retrieves configuration information for datafeeds.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String, Array)

    Identifier for the datafeed. It can be a datafeed identifier or a wildcard expression. If you do not specify one of these options, the API returns information about all datafeeds.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: 1. Contains wildcard expressions and there are no datafeeds that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value is true, which returns an empty datafeeds 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.

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



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb', line 34

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

  body = nil

  _datafeed_id = arguments.delete(:datafeed_id)

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

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

#get_filters(arguments = {}) ⇒ Object

Retrieves filters.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :filter_id (String, Array)

    A string that uniquely identifies a filter.

  • :from (Integer)

    Skips the specified number of filters. Server default: 0.

  • :size (Integer)

    Specifies the maximum number of filters to obtain. Server default: 100.

  • :headers (Hash)

    Custom HTTP headers

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch-serverless/api/machine_learning/get_filters.rb', line 34

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

  body = nil

  _filter_id = arguments.delete(:filter_id)

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

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

#get_job_stats(arguments = {}) ⇒ Object

Retrieves usage information for anomaly detection jobs.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    Identifier for the anomaly detection job. It can be a job identifier, a group name, a comma-separated list of jobs, or a wildcard expression. If you do not specify one of these options, the API returns information for all anomaly detection jobs.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: 1. Contains wildcard expressions and there are no jobs that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. If true, the API returns an empty jobs array when there are no matches and the subset of results when there are partial matches. If false, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :headers (Hash)

    Custom HTTP headers

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb', line 33

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

  body = nil

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_GET
  path   = if _job_id
             "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_stats"
           else
             "_ml/anomaly_detectors/_stats"
           end
  params = Utils.process_params(arguments)

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

#get_jobs(arguments = {}) ⇒ Object

Retrieves configuration information for anomaly detection jobs.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String, Array)

    Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. If you do not specify one of these options, the API returns information for all anomaly detection jobs.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: 1. Contains wildcard expressions and there are no jobs that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value is true, which returns an empty jobs 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.

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



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb', line 34

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

  body = nil

  _job_id = arguments.delete(:job_id)

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

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

#get_overall_buckets(arguments = {}) ⇒ Object

Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    Identifier for the anomaly detection job. It can be a job identifier, a group name, a comma-separated list of jobs or groups, or a wildcard expression. You can summarize the bucket results for all anomaly detection jobs by using _all or by specifying * as the <job_id>. (Required)

  • :allow_no_match (Boolean)

    Specifies what to do when the request: 1. Contains wildcard expressions and there are no jobs that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. If true, the request returns an empty jobs 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.

  • :bucket_span (Time)

    The span of the overall buckets. Must be greater or equal to the largest bucket span of the specified anomaly detection jobs, which is the default value. By default, an overall bucket has a span equal to the largest bucket span of the specified anomaly detection jobs. To override that behavior, use the optional bucket_span parameter.

  • :end (String, Time)

    Returns overall buckets with timestamps earlier than this time.

  • :exclude_interim (Boolean)

    If true, the output excludes interim results.

  • :overall_score (Double, String)

    Returns overall buckets with overall scores greater than or equal to this value.

  • :start (String, Time)

    Returns overall buckets with timestamps after this time.

  • :top_n (Integer)

    The number of top anomaly detection job bucket scores to be used in the overall_score calculation. Server default: 1.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb', line 40

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

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

  body = arguments.delete(:body)

  _job_id = arguments.delete(:job_id)

  method = if body
             ElasticsearchServerless::API::HTTP_POST
           else
             ElasticsearchServerless::API::HTTP_GET
           end

  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/overall_buckets"
  params = Utils.process_params(arguments)

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

#get_trained_models(arguments = {}) ⇒ Object

Retrieves configuration information for a trained inference model.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The unique identifier of the trained model.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: - Contains wildcard expressions and there are no models that match. - Contains the _all string or no identifiers and there are no matches. - Contains wildcard expressions and there are only partial matches. If true, it returns an empty array when there are no matches and the subset of results when there are partial matches. Server default: true.

  • :decompress_definition (Boolean)

    Specifies whether the included model definition should be returned as a JSON map (true) or in a custom compressed format (false). Server default: true.

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

  • :from (Integer)

    Skips the specified number of models. Server default: 0.

  • :include (String)

    A comma delimited string of optional fields to include in the response body.

  • :size (Integer)

    Specifies the maximum number of models to obtain. Server default: 100.

  • :tags (String)

    A comma delimited string of tags. A trained model can have many tags, or none. When supplied, only trained models that contain all the supplied tags are returned.

  • :headers (Hash)

    Custom HTTP headers

See Also:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb', line 39

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

  body = nil

  _model_id = arguments.delete(:model_id)

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

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

#get_trained_models_stats(arguments = {}) ⇒ Object

Retrieves usage information for trained inference models.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String, Array)

    The unique identifier of the trained model or a model alias. It can be a comma-separated list or a wildcard expression.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: - Contains wildcard expressions and there are no models that match. - Contains the _all string or no identifiers and there are no matches. - Contains wildcard expressions and there are only partial matches. If true, it returns an empty array when there are no matches and the subset of results when there are partial matches. Server default: true.

  • :from (Integer)

    Skips the specified number of models. Server default: 0.

  • :size (Integer)

    Specifies the maximum number of models to obtain. Server default: 100.

  • :headers (Hash)

    Custom HTTP headers

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb', line 35

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

  body = nil

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_GET
  path   = if _model_id
             "_ml/trained_models/#{Utils.listify(_model_id)}/_stats"
           else
             "_ml/trained_models/_stats"
           end
  params = Utils.process_params(arguments)

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

#open_job(arguments = {}) ⇒ Object

Opens one or more anomaly detection jobs.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    Identifier for the anomaly detection job. (Required)

  • :timeout (Time)

    Controls the time to wait until a job has opened. Server default: 30m.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

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-serverless/api/machine_learning/open_job.rb', line 34

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

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

  body = arguments.delete(:body)

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_open"
  params = Utils.process_params(arguments)

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

#post_calendar_events(arguments = {}) ⇒ Object

Posts scheduled events in a calendar.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb', line 33

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

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

  body = arguments.delete(:body)

  _calendar_id = arguments.delete(:calendar_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/calendars/#{Utils.listify(_calendar_id)}/events"
  params = {}

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

#preview_data_frame_analytics(arguments = {}) ⇒ Object

Previews that will be analyzed given a data frame analytics config.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Identifier for the data frame analytics job.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb', line 33

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

  body = arguments.delete(:body)

  _id = arguments.delete(:id)

  method = if body
             ElasticsearchServerless::API::HTTP_POST
           else
             ElasticsearchServerless::API::HTTP_GET
           end

  path   = if _id
             "_ml/data_frame/analytics/#{Utils.listify(_id)}/_preview"
           else
             "_ml/data_frame/analytics/_preview"
           end
  params = {}

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

#preview_datafeed(arguments = {}) ⇒ Object

Previews a datafeed.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String)

    A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job configuration details in the request body.

  • :start (String, Time)

    The start time from where the datafeed preview should begin

  • :end (String, Time)

    The end time when the datafeed preview should stop

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb', line 35

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

  body = arguments.delete(:body)

  _datafeed_id = arguments.delete(:datafeed_id)

  method = if body
             ElasticsearchServerless::API::HTTP_POST
           else
             ElasticsearchServerless::API::HTTP_GET
           end

  path   = if _datafeed_id
             "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_preview"
           else
             "_ml/datafeeds/_preview"
           end
  params = Utils.process_params(arguments)

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

#put_calendar(arguments = {}) ⇒ Object

Instantiates a calendar.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb', line 33

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

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

  body = arguments.delete(:body)

  _calendar_id = arguments.delete(:calendar_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/calendars/#{Utils.listify(_calendar_id)}"
  params = {}

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

#put_calendar_job(arguments = {}) ⇒ Object

Adds an anomaly detection job to a calendar.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :calendar_id (String)

    A string that uniquely identifies a calendar. (Required)

  • :job_id (String)

    An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups. (Required)

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb', line 33

def put_calendar_job(arguments = {})
  raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
  raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]

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

  body = nil

  _calendar_id = arguments.delete(:calendar_id)

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/calendars/#{Utils.listify(_calendar_id)}/jobs/#{Utils.listify(_job_id)}"
  params = {}

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

#put_data_frame_analytics(arguments = {}) ⇒ Object

Instantiates a data frame analytics job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Identifier for the data frame analytics job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb', line 33

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

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

  body = arguments.delete(:body)

  _id = arguments.delete(:id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/data_frame/analytics/#{Utils.listify(_id)}"
  params = {}

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

#put_datafeed(arguments = {}) ⇒ Object

Instantiates a datafeed.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String)

    A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :allow_no_indices (Boolean)

    If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the _all string or when no indices are specified. Server default: true.

  • :expand_wildcards (String, Array<String>)

    Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values. Server default: open.

  • :ignore_throttled (Boolean)

    If true, concrete, expanded, or aliased indices are ignored when frozen. Server default: true.

  • :ignore_unavailable (Boolean)

    If true, unavailable indices (missing or closed) are ignored.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb', line 37

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

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

  body = arguments.delete(:body)

  _datafeed_id = arguments.delete(:datafeed_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}"
  params = Utils.process_params(arguments)

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

#put_filter(arguments = {}) ⇒ Object

Instantiates a filter.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :filter_id (String)

    A string that uniquely identifies a filter. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/put_filter.rb', line 33

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

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

  body = arguments.delete(:body)

  _filter_id = arguments.delete(:filter_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/filters/#{Utils.listify(_filter_id)}"
  params = {}

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

#put_job(arguments = {}) ⇒ Object

Instantiates an anomaly detection job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/put_job.rb', line 33

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

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

  body = arguments.delete(:body)

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}"
  params = {}

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

#put_trained_model(arguments = {}) ⇒ Object

Creates an inference trained model.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The unique identifier of the trained model. (Required)

  • :defer_definition_decompression (Boolean)

    If set to true and a compressed_definition is provided, the request defers definition decompression and skips relevant validations.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb', line 34

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

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

  body = arguments.delete(:body)

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}"
  params = Utils.process_params(arguments)

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

#put_trained_model_alias(arguments = {}) ⇒ Object

Creates a new model alias (or reassigns an existing one) to refer to the trained model

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_alias (String)

    The alias to create or update. This value cannot end in numbers. (Required)

  • :model_id (String)

    The identifier for the trained model that the alias refers to. (Required)

  • :reassign (Boolean)

    Specifies whether the alias gets reassigned to the specified trained model if it is already assigned to a different model. If the alias is already assigned and this parameter is false, the API returns an error.

  • :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
52
53
54
# File 'lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb', line 34

def put_trained_model_alias(arguments = {})
  raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
  raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias]

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

  body = nil

  _model_alias = arguments.delete(:model_alias)

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}/model_aliases/#{Utils.listify(_model_alias)}"
  params = Utils.process_params(arguments)

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

#put_trained_model_definition_part(arguments = {}) ⇒ Object

Creates part of a trained model definition

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The unique identifier of the trained model. (Required)

  • :part (Integer)

    The definition part number. When the definition is loaded for inference the definition parts are streamed in the order of their part number. The first part must be 0 and the final part must be total_parts - 1. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb', line 34

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

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

  body = arguments.delete(:body)

  _model_id = arguments.delete(:model_id)

  _part = arguments.delete(:part)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}/definition/#{Utils.listify(_part)}"
  params = {}

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

#put_trained_model_vocabulary(arguments = {}) ⇒ Object

Creates a trained model vocabulary

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The unique identifier of the trained model. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb', line 33

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

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

  body = arguments.delete(:body)

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_PUT
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}/vocabulary"
  params = {}

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

#reset_job(arguments = {}) ⇒ Object

Resets an existing anomaly detection job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    The ID of the job to reset. (Required)

  • :wait_for_completion (Boolean)

    Should this request wait until the operation has completed before returning. Server default: true.

  • :delete_user_annotations (Boolean)

    Specifies whether annotations that have been added by the user should be deleted along with any auto-generated annotations when the job is reset.

  • :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-serverless/api/machine_learning/reset_job.rb', line 34

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

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

  body = nil

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_reset"
  params = Utils.process_params(arguments)

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

#start_data_frame_analytics(arguments = {}) ⇒ Object

Starts a data frame analytics job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Identifier for the data frame analytics job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :timeout (Time)

    Controls the amount of time to wait until the data frame analytics job starts. Server default: 20s.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb', line 33

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

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

  body = nil

  _id = arguments.delete(:id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/data_frame/analytics/#{Utils.listify(_id)}/_start"
  params = Utils.process_params(arguments)

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

#start_datafeed(arguments = {}) ⇒ Object

Starts one or more datafeeds.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String)

    A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :end (String, Time)

    The time that the datafeed should end, which can be specified by using one of the following formats: * ISO 8601 format with milliseconds, for example 2017-01-22T06:00:00.000Z * ISO 8601 format without milliseconds, for example 2017-01-22T06:00:0000:00+ * Milliseconds since the epoch, for example 1485061200000 Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where Z is accepted as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the +++ used in time zone designators must be encoded as %2B. The end time value is exclusive. If you do not specify an end time, the datafeed runs continuously.

  • :start (String, Time)

    The time that the datafeed should begin, which can be specified by using the same formats as the end parameter. This value is inclusive. If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis starts from the earliest time for which data is available. If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record.

  • :timeout (Time)

    Specifies the amount of time to wait until a datafeed starts. Server default: 20s.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

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-serverless/api/machine_learning/start_datafeed.rb', line 36

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

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

  body = arguments.delete(:body)

  _datafeed_id = arguments.delete(:datafeed_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_start"
  params = Utils.process_params(arguments)

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

#start_trained_model_deployment(arguments = {}) ⇒ Object

Start a trained model deployment.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The unique identifier of the trained model. Currently, only PyTorch models are supported. (Required)

  • :cache_size (Integer, String)

    The inference cache size (in memory outside the JVM heap) per node for the model. The default value is the same size as the model_size_bytes. To disable the cache, 0b can be provided.

  • :deployment_id (String)

    A unique identifier for the deployment of the model.

  • :number_of_allocations (Integer)

    The number of model allocations on each node where the model is deployed. All allocations on a node share the same copy of the model in memory but use a separate set of threads to evaluate the model. Increasing this value generally increases the throughput. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads. Server default: 1.

  • :priority (String)

    The deployment priority.

  • :queue_capacity (Integer)

    Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds this value, new requests are rejected with a 429 error. Server default: 1024.

  • :threads_per_allocation (Integer)

    Sets the number of threads used by each model allocation during inference. This generally increases the inference speed. The inference process is a compute-bound process; any number greater than the number of available hardware threads on the machine does not increase the inference speed. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads. Server default: 1.

  • :timeout (Time)

    Specifies the amount of time to wait for the model to deploy. Server default: 20s.

  • :wait_for (String)

    Specifies the allocation status to wait for before returning. Server default: started.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb', line 40

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

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

  body = nil

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}/deployment/_start"
  params = Utils.process_params(arguments)

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

#stop_data_frame_analytics(arguments = {}) ⇒ Object

Stops one or more data frame analytics jobs.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Identifier for the data frame analytics job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :allow_no_match (Boolean)

    Specifies what to do when the request: 1. Contains wildcard expressions and there are no data frame analytics jobs that match. 2. Contains the _all string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value is true, which 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.

  • :force (Boolean)

    If true, the data frame analytics job is stopped forcefully.

  • :timeout (Time)

    Controls the amount of time to wait until the data frame analytics job stops. Defaults to 20 seconds. Server default: 20s.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb', line 35

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

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

  body = nil

  _id = arguments.delete(:id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/data_frame/analytics/#{Utils.listify(_id)}/_stop"
  params = Utils.process_params(arguments)

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

#stop_datafeed(arguments = {}) ⇒ Object

Stops one or more datafeeds.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String)

    Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can close all datafeeds by using _all or by specifying * as the identifier. (Required)

  • :allow_no_match (Boolean)

    Specifies what to do when the request: * Contains wildcard expressions and there are no datafeeds that match. * Contains the _all string or no identifiers and there are no matches. * Contains wildcard expressions and there are only partial matches. If true, the API returns an empty datafeeds array when there are no matches and the subset of results when there are partial matches. If false, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :force (Boolean)

    If true, the datafeed is stopped forcefully.

  • :timeout (Time)

    Specifies the amount of time to wait until a datafeed stops. Server default: 20s.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

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-serverless/api/machine_learning/stop_datafeed.rb', line 36

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

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

  body = arguments.delete(:body)

  _datafeed_id = arguments.delete(:datafeed_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_stop"
  params = Utils.process_params(arguments)

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

#stop_trained_model_deployment(arguments = {}) ⇒ Object

Stop a trained model deployment.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :model_id (String)

    The unique identifier of the trained model. (Required)

  • :allow_no_match (Boolean)

    Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; contains the _all string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches. If false, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :force (Boolean)

    Forcefully stops the deployment, even if it is used by ingest pipelines. You can’t use these pipelines until you restart the model deployment.

  • :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-serverless/api/machine_learning/stop_trained_model_deployment.rb', line 34

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

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

  body = nil

  _model_id = arguments.delete(:model_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/trained_models/#{Utils.listify(_model_id)}/deployment/_stop"
  params = Utils.process_params(arguments)

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

#update_data_frame_analytics(arguments = {}) ⇒ Object

Updates certain properties of a data frame analytics job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    Identifier for the data frame analytics job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb', line 33

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

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

  body = arguments.delete(:body)

  _id = arguments.delete(:id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/data_frame/analytics/#{Utils.listify(_id)}/_update"
  params = {}

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

#update_datafeed(arguments = {}) ⇒ Object

Updates certain properties of a datafeed.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :datafeed_id (String)

    A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. (Required)

  • :allow_no_indices (Boolean)

    If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the _all string or when no indices are specified. Server default: true.

  • :expand_wildcards (String, Array<String>)

    Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are: * all: Match any data stream or index, including hidden ones. * closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. * hidden: Match hidden data streams and hidden indices. Must be combined with open, closed, or both. * none: Wildcard patterns are not accepted. * open: Match open, non-hidden indices. Also matches any non-hidden data stream. Server default: open.

  • :ignore_throttled (Boolean)

    If true, concrete, expanded or aliased indices are ignored when frozen. Server default: true.

  • :ignore_unavailable (Boolean)

    If true, unavailable indices (missing or closed) are ignored.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb', line 37

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

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

  body = arguments.delete(:body)

  _datafeed_id = arguments.delete(:datafeed_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_update"
  params = Utils.process_params(arguments)

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

#update_filter(arguments = {}) ⇒ Object

Updates the description of a filter, adds items, or removes items.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :filter_id (String)

    A string that uniquely identifies a filter. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/update_filter.rb', line 33

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

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

  body = arguments.delete(:body)

  _filter_id = arguments.delete(:filter_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/filters/#{Utils.listify(_filter_id)}/_update"
  params = {}

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

#update_job(arguments = {}) ⇒ Object

Updates certain properties of an anomaly detection job.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :job_id (String)

    Identifier for the job. (Required)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/elasticsearch-serverless/api/machine_learning/update_job.rb', line 33

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

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

  body = arguments.delete(:body)

  _job_id = arguments.delete(:job_id)

  method = ElasticsearchServerless::API::HTTP_POST
  path   = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_update"
  params = {}

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