Module: Elasticsearch::XPack::API::License::Actions

Included in:
LicenseClient
Defined in:
lib/elasticsearch/xpack/api/namespace/license.rb,
lib/elasticsearch/xpack/api/actions/license/get.rb,
lib/elasticsearch/xpack/api/actions/license/post.rb,
lib/elasticsearch/xpack/api/actions/license/delete.rb,
lib/elasticsearch/xpack/api/actions/license/params_registry.rb,
lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb,
lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb,
lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb,
lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb

Defined Under Namespace

Modules: ParamsRegistry

Instance Method Summary collapse

Instance Method Details

#delete(arguments = {}) ⇒ Object

Deletes licensing information for the cluster

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

See Also:



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/elasticsearch/xpack/api/actions/license/delete.rb', line 29

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_license"
  params = {}

  body = nil
  perform_request(method, path, params, body, headers).body
end

#get(arguments = {}) ⇒ Object

Retrieves licensing information for the cluster

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :local (Boolean)

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

  • :accept_enterprise (Boolean)

    If the active license is an enterprise license, return type as ‘enterprise’ (default: false)

  • :headers (Hash)

    Custom HTTP headers

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/elasticsearch/xpack/api/actions/license/get.rb', line 31

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_GET
  path   = "_license"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#get_basic_status(arguments = {}) ⇒ Object

Retrieves information about the status of the basic license.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

See Also:



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb', line 29

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_GET
  path   = "_license/basic_status"
  params = {}

  body = nil
  perform_request(method, path, params, body, headers).body
end

#get_trial_status(arguments = {}) ⇒ Object

Retrieves information about the status of the trial license.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

See Also:



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb', line 29

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_GET
  path   = "_license/trial_status"
  params = {}

  body = nil
  perform_request(method, path, params, body, headers).body
end

#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)

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    licenses to be installed

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/elasticsearch/xpack/api/actions/license/post.rb', line 31

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_PUT
  path   = "_license"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = arguments[:body]
  perform_request(method, path, params, body, headers).body
end

#post_start_basic(arguments = {}) ⇒ Object

Starts an indefinite basic license.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :acknowledge (Boolean)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb', line 30

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_POST
  path   = "_license/start_basic"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#post_start_trial(arguments = {}) ⇒ Object

starts a limited time trial license.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :type (String)

    The type of trial license to generate (default: “trial”)

  • :acknowledge (Boolean)

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

  • :headers (Hash)

    Custom HTTP headers

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb', line 31

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_POST
  path   = "_license/start_trial"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end