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

Defined in:
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

Delete the license. When the license expires, your subscription level reverts to Basic. If the operator privileges feature is enabled, only operator users can use this API.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :master_timeout (Time)

    The period to wait for a connection to the master node. Server default: 30s.

  • :timeout (Time)

    The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.

  • :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/api/actions/license/delete.rb', line 35

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

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

  body = nil

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

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

#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/api/actions/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 = Elasticsearch::API::HTTP_GET
  path   = '_license'
  params = Utils.process_params(arguments)

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

#get_basic_status(arguments = {}) ⇒ Object

Get the basic license status.

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
45
46
# File 'lib/elasticsearch/api/actions/license/get_basic_status.rb', line 31

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

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

#get_trial_status(arguments = {}) ⇒ Object

Get the trial status.

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
45
46
# File 'lib/elasticsearch/api/actions/license/get_trial_status.rb', line 31

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

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

#post(arguments = {}) ⇒ Object

Update the license. You can update your license at runtime without shutting down your nodes. License updates take effect immediately. If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true. NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license. If the operator privileges feature is enabled, only operator users can use this API.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :acknowledge (Boolean)

    Specifies whether you acknowledge the license changes.

  • :master_timeout (Time)

    The period to wait for a connection to the master node. Server default: 30s.

  • :timeout (Time)

    The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

See Also:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/elasticsearch/api/actions/license/post.rb', line 41

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

#post_start_basic(arguments = {}) ⇒ Object

Start a basic license. Start an indefinite basic license, which gives access to all the basic features. NOTE: In order to start a basic license, you must not currently have a basic license. If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true. To check the status of your basic license, use the get basic license API.

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)

    Period to wait for a connection to the master node. Server default: 30s.

  • :timeout (Time)

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.

  • :headers (Hash)

    Custom HTTP headers

See Also:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/elasticsearch/api/actions/license/post_start_basic.rb', line 39

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

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

#post_start_trial(arguments = {}) ⇒ Object

Start a trial. Start a 30-day trial, which gives access to all subscription features. NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version. For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at www.elastic.co/trialextension. To check the status of your trial, use the get trial status API.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :acknowledge (Boolean)

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

  • :type_query_string (String)
    TODO
  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :headers (Hash)

    Custom HTTP headers

See Also:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/elasticsearch/api/actions/license/post_start_trial.rb', line 38

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

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