Method: Elastic::EnterpriseSearch::Actions#put_read_only

Defined in:
lib/elastic/enterprise-search/api/put_read_only.rb

#put_read_only(arguments = {}) ⇒ Object

Read-Only - Update the read-only flag’s state Update the read-only flag’s state

Parameters:

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

    endpoint arguments

  • body (Hash)

    a customizable set of options

Options Hash (arguments):

  • :body (Hash) — default: Required: enabled
  • :headers (Hash)

    optional HTTP headers to send with the request

Raises:

  • (ArgumentError)

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elastic/enterprise-search/api/put_read_only.rb', line 33

def put_read_only(arguments = {})
  raise ArgumentError, "Required parameter 'body (enabled)' missing" unless arguments[:body]

  body = arguments.delete(:body) || {}
  headers = arguments.delete(:headers) || {}
  request(
    :put,
    'api/ent/v1/internal/read_only_mode/',
    arguments,
    body,
    headers
  )
end