lib/elasticsearch/api/actions/snapshot/repository_analyze.rb in elasticsearch-api-7.17.11 vs lib/elasticsearch/api/actions/snapshot/repository_analyze.rb in elasticsearch-api-8.0.0.pre1

- old
+ new

@@ -33,44 +33,30 @@ # @option arguments [Time] :timeout Explicit operation timeout. Defaults to '30s'. # @option arguments [Boolean] :detailed Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned. # @option arguments [Boolean] :rarely_abort_writes Whether to rarely abort writes before they complete. Defaults to 'true'. # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.17/modules-snapshots.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html # def repository_analyze(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] headers = arguments.delete(:headers) || {} + body = nil + arguments = arguments.clone _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_POST path = "_snapshot/#{Utils.__listify(_repository)}/_analyze" - params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) + params = Utils.process_params(arguments) - body = nil - perform_request(method, path, params, body, headers).body + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers) + ) end - - # Register this action with its valid params when the module is loaded. - # - # @since 6.2.0 - ParamsRegistry.register(:repository_analyze, [ - :blob_count, - :concurrency, - :read_node_count, - :early_read_node_count, - :seed, - :rare_action_probability, - :max_blob_size, - :max_total_data_size, - :timeout, - :detailed, - :rarely_abort_writes - ].freeze) end end end end