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

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

Instance Method Summary collapse

Instance Method Details

#get(arguments = {}) ⇒ Object

Get license information. Get information about your Elastic license including its type, its status, when it was issued, and when it expires.

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:



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

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

  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, request_opts)
  )
end