Module: ElasticsearchServerless::API::License::Actions

Defined in:
lib/elasticsearch-serverless/api/license/get.rb

Instance Method Summary collapse

Instance Method Details

#get(arguments = {}) ⇒ Object

Retrieves licensing information for the cluster

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :accept_enterprise (Boolean)

    If true, this parameter returns enterprise for Enterprise license types. If false, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility. This parameter is deprecated and will always be set to true in 8.x. Server default: true.

  • :local (Boolean)

    Specifies whether to retrieve local information. The default value is false, which means the information is retrieved from the master node.

  • :headers (Hash)

    Custom HTTP headers

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/elasticsearch-serverless/api/license/get.rb', line 33

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

  body = nil

  method = ElasticsearchServerless::API::HTTP_GET
  path   = "_license"
  params = Utils.process_params(arguments)

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