Sha256: 0f0b229104830609904b1b4eff4ea7bf7de34085035029b7fd534b01aa90fe34

Contents?: true

Size: 1.27 KB

Versions: 6

Compression:

Stored size: 1.27 KB

Contents

module Elasticsearch
  module XPack
    module API
      module MachineLearning
        module Actions

          # @option arguments [String] :job_id The ID of the job from which to delete forecasts (*Required*)
          # @option arguments [String] :forecast_id The ID of the forecast to delete, can be comma delimited list.
          #   Leaving blank implies `_all`
          # @option arguments [Boolean] :allow_no_forecasts Whether to ignore if `_all` matches no forecasts
          # @option arguments [Time] :timeout Controls the time to wait until the forecast(s) are deleted.
          #   Default to 30 seconds.
          #
          def delete_forecast(arguments={})
            raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
            method = Elasticsearch::API::HTTP_DELETE
            path   = "_ml/anomaly_detectors/#{arguments[:job_id]}/_forecast/#{arguments[:forecast_id]}"

            valid_params = [
                :forecast_id,
                :allow_no_forecasts,
                :timeout ]

            params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
            body   = nil

            perform_request(method, path, params, body).body
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
elasticsearch-xpack-7.3.0 lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb
elasticsearch-xpack-7.2.1 lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb
elasticsearch-xpack-7.2.0 lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb
elasticsearch-xpack-7.1.0 lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb
elasticsearch-xpack-7.0.0 lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb
elasticsearch-xpack-7.0.0.pre lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb