Module: Elasticsearch::API::Snapshot::Actions

Included in:
SnapshotClient
Defined in:
lib/elasticsearch/api/namespace/snapshot.rb,
lib/elasticsearch/api/actions/snapshot/get.rb,
lib/elasticsearch/api/actions/snapshot/clone.rb,
lib/elasticsearch/api/actions/snapshot/create.rb,
lib/elasticsearch/api/actions/snapshot/delete.rb,
lib/elasticsearch/api/actions/snapshot/status.rb,
lib/elasticsearch/api/actions/snapshot/restore.rb,
lib/elasticsearch/api/actions/snapshot/get_repository.rb,
lib/elasticsearch/api/actions/snapshot/create_repository.rb,
lib/elasticsearch/api/actions/snapshot/delete_repository.rb,
lib/elasticsearch/api/actions/snapshot/verify_repository.rb,
lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb,
lib/elasticsearch/api/actions/snapshot/repository_analyze.rb

Instance Method Summary collapse

Instance Method Details

#cleanup_repository(arguments = {}) ⇒ Object

Removes stale data from repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :timeout (Time)

    Explicit operation timeout

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb', line 34

def cleanup_repository(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.cleanup_repository' }

  defined_params = [:repository].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 'repository' missing" unless arguments[:repository]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_POST
  path   = "_snapshot/#{Utils.__listify(_repository)}/_cleanup"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#clone(arguments = {}) ⇒ Object

Clones indices from one snapshot into another snapshot in the same repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :snapshot (String)

    The name of the snapshot to clone from

  • :target_snapshot (String)

    The name of the cloned snapshot to create

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    The snapshot clone definition (Required)

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/elasticsearch/api/actions/snapshot/clone.rb', line 36

def clone(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.clone' }

  defined_params = %i[repository snapshot target_snapshot].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 'body' missing" unless arguments[:body]
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
  raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]
  raise ArgumentError, "Required argument 'target_snapshot' missing" unless arguments[:target_snapshot]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = arguments.delete(:body)

  _repository = arguments.delete(:repository)

  _snapshot = arguments.delete(:snapshot)

  _target_snapshot = arguments.delete(:target_snapshot)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}/_clone/#{Utils.__listify(_target_snapshot)}"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#create(arguments = {}) ⇒ Object

Creates a snapshot in a repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :snapshot (String)

    A snapshot name

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :wait_for_completion (Boolean)

    Should this request wait until the operation has completed before returning

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    The snapshot definition

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/elasticsearch/api/actions/snapshot/create.rb', line 36

def create(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.create' }

  defined_params = %i[repository snapshot].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 'repository' missing" unless arguments[:repository]
  raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = arguments.delete(:body)

  _repository = arguments.delete(:repository)

  _snapshot = arguments.delete(:snapshot)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#create_repository(arguments = {}) ⇒ Object

Creates a repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :timeout (Time)

    Explicit operation timeout

  • :verify (Boolean)

    Whether to verify the repository after creation

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    The repository definition (Required)

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/elasticsearch/api/actions/snapshot/create_repository.rb', line 36

def create_repository(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.create_repository' }

  defined_params = [:repository].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 'body' missing" unless arguments[:body]
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = arguments.delete(:body)

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_snapshot/#{Utils.__listify(_repository)}"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#delete(arguments = {}) ⇒ Object

Deletes one or more snapshots.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :snapshot (List)

    A comma-separated list of snapshot names

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :wait_for_completion (Boolean)

    Should this request wait until the operation has completed before returning

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/elasticsearch/api/actions/snapshot/delete.rb', line 35

def delete(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.delete' }

  defined_params = %i[repository snapshot].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 '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 do
      Elasticsearch::API::Response.new(
        perform_request(method, path, params, body, headers, request_opts)
      )
    end
  else
    Elasticsearch::API::Response.new(
      perform_request(method, path, params, body, headers, request_opts)
    )
  end
end

#delete_repository(arguments = {}) ⇒ Object

Deletes a repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (List)

    Name of the snapshot repository to unregister. Wildcard (‘*`) patterns are supported.

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :timeout (Time)

    Explicit operation timeout

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/elasticsearch/api/actions/snapshot/delete_repository.rb', line 34

def delete_repository(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.delete_repository' }

  defined_params = [:repository].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 'repository' missing" unless arguments[:repository]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_snapshot/#{Utils.__listify(_repository)}"
  params = Utils.process_params(arguments)

  if Array(arguments[:ignore]).include?(404)
    Utils.__rescue_from_not_found do
      Elasticsearch::API::Response.new(
        perform_request(method, path, params, body, headers, request_opts)
      )
    end
  else
    Elasticsearch::API::Response.new(
      perform_request(method, path, params, body, headers, request_opts)
    )
  end
end

#get(arguments = {}) ⇒ Object

Returns information about a snapshot.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :snapshot (List)

    A comma-separated list of snapshot names

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :ignore_unavailable (Boolean)

    Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown

  • :index_names (Boolean)

    Whether to include the name of each index in the snapshot. Defaults to true.

  • :index_details (Boolean)

    Whether to include details of each index in the snapshot, if those details are available. Defaults to false.

  • :include_repository (Boolean)

    Whether to include the repository name in the snapshot info. Defaults to true.

  • :sort (String)

    Allows setting a sort order for the result. Defaults to start_time (options: start_time, duration, name, repository, index_count, shard_count, failed_shard_count)

  • :size (Integer)

    Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit.

  • :order (String)

    Sort order (options: asc, desc)

  • :from_sort_value (String)

    Value of the current sort column at which to start retrieval.

  • :after (String)

    Offset identifier to start pagination from as returned by the ‘next’ field in the response body.

  • :offset (Integer)

    Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0

  • :slm_policy_filter (String)

    Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern ‘_none’ to match snapshots without an SLM policy

  • :verbose (Boolean)

    Whether to show verbose snapshot info or only show the basic info found in the repository index blob

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/elasticsearch/api/actions/snapshot/get.rb', line 46

def get(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.get' }

  defined_params = %i[repository snapshot].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 '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_GET
  path   = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}"
  params = Utils.process_params(arguments)

  if Array(arguments[:ignore]).include?(404)
    Utils.__rescue_from_not_found do
      Elasticsearch::API::Response.new(
        perform_request(method, path, params, body, headers, request_opts)
      )
    end
  else
    Elasticsearch::API::Response.new(
      perform_request(method, path, params, body, headers, request_opts)
    )
  end
end

#get_repository(arguments = {}) ⇒ Object

Returns information about a repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (List)

    A comma-separated list of repository names

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :headers (Hash)

    Custom HTTP headers

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/elasticsearch/api/actions/snapshot/get_repository.rb', line 34

def get_repository(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.get_repository' }

  defined_params = [:repository].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?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_GET
  path   = if _repository
             "_snapshot/#{Utils.__listify(_repository)}"
           else
             '_snapshot'
           end
  params = Utils.process_params(arguments)

  if Array(arguments[:ignore]).include?(404)
    Utils.__rescue_from_not_found do
      Elasticsearch::API::Response.new(
        perform_request(method, path, params, body, headers, request_opts)
      )
    end
  else
    Elasticsearch::API::Response.new(
      perform_request(method, path, params, body, headers, request_opts)
    )
  end
end

#repository_analyze(arguments = {}) ⇒ Object

Analyzes a repository for correctness and performance

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :blob_count (Number)

    Number of blobs to create during the test. Defaults to 100.

  • :concurrency (Number)

    Number of operations to run concurrently during the test. Defaults to 10.

  • :read_node_count (Number)

    Number of nodes on which to read a blob after writing. Defaults to 10.

  • :early_read_node_count (Number)

    Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the ‘rare_action_probability’ parameter is also relevant. Defaults to 2.

  • :seed (Number)

    Seed for the random number generator used to create the test workload. Defaults to a random value.

  • :rare_action_probability (Number)

    Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02.

  • :max_blob_size (String)

    Maximum size of a blob to create during the test, e.g ‘1gb’ or ‘100mb’. Defaults to ‘10mb’.

  • :max_total_data_size (String)

    Maximum total size of all blobs to create during the test, e.g ‘1tb’ or ‘100gb’. Defaults to ‘1gb’.

  • :timeout (Time)

    Explicit operation timeout. Defaults to ‘30s’.

  • :detailed (Boolean)

    Whether to return detailed results or a summary. Defaults to ‘false’ so that only the summary is returned.

  • :rarely_abort_writes (Boolean)

    Whether to rarely abort writes before they complete. Defaults to ‘true’.

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/elasticsearch/api/actions/snapshot/repository_analyze.rb', line 43

def repository_analyze(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.repository_analyze' }

  defined_params = [:repository].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 'repository' missing" unless arguments[:repository]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_POST
  path   = "_snapshot/#{Utils.__listify(_repository)}/_analyze"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#restore(arguments = {}) ⇒ Object

Restores a snapshot.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :snapshot (String)

    A snapshot name

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :wait_for_completion (Boolean)

    Should this request wait until the operation has completed before returning

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    Details of what to restore

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/elasticsearch/api/actions/snapshot/restore.rb', line 36

def restore(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.restore' }

  defined_params = %i[repository snapshot].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 'repository' missing" unless arguments[:repository]
  raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = arguments.delete(:body)

  _repository = arguments.delete(:repository)

  _snapshot = arguments.delete(:snapshot)

  method = Elasticsearch::API::HTTP_POST
  path   = "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}/_restore"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end

#status(arguments = {}) ⇒ Object

Returns information about the status of a snapshot.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :snapshot (List)

    A comma-separated list of snapshot names

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :ignore_unavailable (Boolean)

    Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown

  • :headers (Hash)

    Custom HTTP headers

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/elasticsearch/api/actions/snapshot/status.rb', line 35

def status(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.status' }

  defined_params = %i[repository snapshot].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?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  _snapshot = arguments.delete(:snapshot)

  method = Elasticsearch::API::HTTP_GET
  path   = if _repository && _snapshot
             "_snapshot/#{Utils.__listify(_repository)}/#{Utils.__listify(_snapshot)}/_status"
           elsif _repository
             "_snapshot/#{Utils.__listify(_repository)}/_status"
           else
             '_snapshot/_status'
           end
  params = Utils.process_params(arguments)

  if Array(arguments[:ignore]).include?(404)
    Utils.__rescue_from_not_found do
      Elasticsearch::API::Response.new(
        perform_request(method, path, params, body, headers, request_opts)
      )
    end
  else
    Elasticsearch::API::Response.new(
      perform_request(method, path, params, body, headers, request_opts)
    )
  end
end

#verify_repository(arguments = {}) ⇒ Object

Verifies a repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (String)

    A repository name

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :timeout (Time)

    Explicit operation timeout

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/elasticsearch/api/actions/snapshot/verify_repository.rb', line 34

def verify_repository(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'snapshot.verify_repository' }

  defined_params = [:repository].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 'repository' missing" unless arguments[:repository]

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_POST
  path   = "_snapshot/#{Utils.__listify(_repository)}/_verify"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end