Method: Elasticsearch::API::License::Actions#post

Defined in:
lib/elasticsearch/api/actions/license/post.rb

#post(arguments = {}) ⇒ Object

Updates the license for the cluster.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :acknowledge (Boolean)

    whether the user has acknowledged acknowledge messages (default: false)

  • :master_timeout (Time)

    Timeout for processing on master node

  • :timeout (Time)

    Timeout for acknowledgement of update from all nodes in cluster

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    licenses to be installed

See Also:


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/elasticsearch/api/actions/license/post.rb', line 35

def post(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'license.post' }

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

  body   = arguments.delete(:body)

  method = Elasticsearch::API::HTTP_PUT
  path   = '_license'
  params = Utils.process_params(arguments)

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