module Elasticsearch::API::DanglingIndices::Actions
def delete_dangling_index(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- Explicit operation timeout -
:master_timeout(Time) -- Specify timeout for connection to master Server default: 30s. -
:accept_data_loss(Boolean) -- This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index. (*Required*) -
:index_uuid(String) -- The UUID of the index to delete. Use the get dangling indices API to find the UUID. (*Required*)
def delete_dangling_index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.delete_dangling_index' } defined_params = [:index_uuid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_DELETE path = "_dangling/#{Utils.listify(_index_uuid)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def import_dangling_index(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- Explicit operation timeout -
:master_timeout(Time) -- Specify timeout for connection to master Server default: 30s. -
:accept_data_loss(Boolean) -- This parameter must be set to true to import a dangling index. -
:index_uuid(String) -- The UUID of the index to import. Use the get dangling indices API to locate the UUID. (*Required*)
def import_dangling_index(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.import_dangling_index' } defined_params = [:index_uuid].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_POST path = "_dangling/#{Utils.listify(_index_uuid)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def list_dangling_indices(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors
def list_dangling_indices(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'dangling_indices.list_dangling_indices' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_dangling' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end