elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb
# Deletes one or more snapshots.
#
# @option arguments [String] :repository A repository name
# @option arguments [List] :snapshot A comma-separated list of snapshot names
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
#
Deletes one or more snapshots.
Deletes one or more snapshots .
def delete(arguments = {})
          raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
          raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]
          arguments = arguments.clone
          headers = arguments.delete(:headers) || {}
          body = nil
          _repository = arguments.delete(:repository)
          _snapshot = arguments.delete(:snapshot)
          method = Elasticsearch::API::HTTP_DELETE
          path   = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}"
          params = Utils.process_params(arguments)
          if Array(arguments[:ignore]).include?(404)
            Utils.__rescue_from_not_found {
              Elasticsearch::API::Response.new(
                perform_request(method, path, params, body, headers)
              )
            }
          else
            Elasticsearch::API::Response.new(
              perform_request(method, path, params, body, headers)
            )
          end
        end
def delete ( arguments = { } ) raise ArgumentError , "Required argument 'repository' missing" unless arguments [ :repository ] raise ArgumentError , "Required argument 'snapshot' missing" unless arguments [ :snapshot ] arguments = arguments . clone headers = arguments . delete ( :headers ) || { } body = nil _repository = arguments . delete ( :repository ) _snapshot = arguments . delete ( :snapshot ) method = Elasticsearch :: API :: HTTP_DELETE path = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}" params = Utils . process_params ( arguments ) if Array ( arguments [ :ignore ] ) . include? ( 404 ) Utils . __rescue_from_not_found { Elasticsearch :: API :: Response . new ( perform_request ( method , path , params , body , headers ) ) } else Elasticsearch :: API :: Response . new ( perform_request ( method , path , params , body , headers ) ) end end
Deletes one or more snapshots.
Deletes one or more snapshots .
arguments
:headers Custom HTTP headers
: headers Custom HTTP headers
see
None