elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb
# Deletes forecasts from a machine learning job.
#
# @option arguments [String] :job_id The ID of the job from which to delete forecasts
# @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
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html
#
Deletes forecasts from a machine learning job.
Deletes forecasts from a machine learning job .
def delete_forecast(arguments = {})
          raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
          headers = arguments.delete(:headers) || {}
          body = nil
          arguments = arguments.clone
          _job_id = arguments.delete(:job_id)
          _forecast_id = arguments.delete(:forecast_id)
          method = Elasticsearch::API::HTTP_DELETE
          path   = if _job_id && _forecast_id
                     "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast/#{Utils.__listify(_forecast_id)}"
                   else
                     "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast"
                   end
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def delete_forecast ( arguments = { } ) raise ArgumentError , "Required argument 'job_id' missing" unless arguments [ :job_id ] headers = arguments . delete ( :headers ) || { } body = nil arguments = arguments . clone _job_id = arguments . delete ( :job_id ) _forecast_id = arguments . delete ( :forecast_id ) method = Elasticsearch :: API :: HTTP_DELETE path = if _job_id && _forecast_id "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast/#{Utils.__listify(_forecast_id)}" else "_ml/anomaly_detectors/#{Utils.__listify(_job_id)}/_forecast" end params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Deletes forecasts from a machine learning job.
Deletes forecasts from a machine learning job .
arguments
:headers Custom HTTP headers
: headers Custom HTTP headers
see
None