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

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

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:


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

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

  body   = nil

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

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers)
  )
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)

    Supported for backwards compatibility with 7.x. If this param is used it must be set to true Deprecated

  • :headers (Hash)

    Custom HTTP headers

See Also:


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

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

  body   = nil

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

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers)
  )
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:


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

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

  body   = nil

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

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers)
  )
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:


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

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

  body   = nil

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

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers)
  )
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:


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

def post(arguments = {})
  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)
  )
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:


32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elasticsearch/api/actions/license/post_start_basic.rb', line 32

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

  body   = nil

  method = Elasticsearch::API::HTTP_POST
  path   = "_license/start_basic"
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers)
  )
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:


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

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

  body   = nil

  method = Elasticsearch::API::HTTP_POST
  path   = "_license/start_trial"
  params = Utils.process_params(arguments)

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