Sha256: dc44661a6e895643d9d92ec9adc8f166a608c62423330e436c265e6f3823787f

Contents?: true

Size: 971 Bytes

Versions: 1

Compression:

Stored size: 971 Bytes

Contents

# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.

module OpenSearch
  module API
    module Actions
      # Deletes one or several PITs.
      #
      # @option arguments [Hash] body: Must include `pit_id`, which is an array of PIT IDs to be deleted. (required)
      def delete_pit(arguments = {})
        raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

        method = OpenSearch::API::HTTP_DELETE
        path = "_search/point_in_time"
        params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
        body = arguments[:body]

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

      ParamsRegistry.register(:delete_pit, [].freeze)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opensearch-api-2.2.0 lib/opensearch/api/actions/delete_pit.rb