Module: Elasticsearch::XPack::API::Autoscaling::Actions

Included in:
AutoscalingClient
Defined in:
lib/elasticsearch/xpack/api/namespace/autoscaling.rb,
lib/elasticsearch/xpack/api/actions/autoscaling/params_registry.rb,
lib/elasticsearch/xpack/api/actions/autoscaling/get_autoscaling_policy.rb,
lib/elasticsearch/xpack/api/actions/autoscaling/put_autoscaling_policy.rb,
lib/elasticsearch/xpack/api/actions/autoscaling/get_autoscaling_capacity.rb,
lib/elasticsearch/xpack/api/actions/autoscaling/get_autoscaling_decision.rb,
lib/elasticsearch/xpack/api/actions/autoscaling/delete_autoscaling_policy.rb

Defined Under Namespace

Modules: ParamsRegistry

Instance Method Summary collapse

Instance Method Details

#delete_autoscaling_policy(arguments = {}) ⇒ Object

Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    the name of the autoscaling policy

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elasticsearch/xpack/api/actions/autoscaling/delete_autoscaling_policy.rb', line 30

def delete_autoscaling_policy(arguments = {})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

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

  arguments = arguments.clone

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_DELETE
  path   = "_autoscaling/policy/#{Elasticsearch::API::Utils.__listify(_name)}"
  params = {}

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

#get_autoscaling_capacity(arguments = {}) ⇒ Object

Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

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/autoscaling/get_autoscaling_capacity.rb', line 29

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_GET
  path   = "_autoscaling/capacity"
  params = {}

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

#get_autoscaling_decision(arguments = {}) ⇒ Object

Gets the current autoscaling decision based on the configured autoscaling policy, indicating whether or not autoscaling is needed. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

See Also:



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/elasticsearch/xpack/api/actions/autoscaling/get_autoscaling_decision.rb', line 33

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

  arguments = arguments.clone

  method = Elasticsearch::API::HTTP_GET
  path   = "_autoscaling/decision"
  params = {}

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

#get_autoscaling_policy(arguments = {}) ⇒ Object

Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    the name of the autoscaling policy

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/elasticsearch/xpack/api/actions/autoscaling/get_autoscaling_policy.rb', line 30

def get_autoscaling_policy(arguments = {})
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

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

  arguments = arguments.clone

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = "_autoscaling/policy/#{Elasticsearch::API::Utils.__listify(_name)}"
  params = {}

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

#put_autoscaling_policy(arguments = {}) ⇒ Object

Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

Parameters:

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

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    the name of the autoscaling policy

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    the specification of the autoscaling policy (Required)

Raises:

  • (ArgumentError)

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elasticsearch/xpack/api/actions/autoscaling/put_autoscaling_policy.rb', line 31

def put_autoscaling_policy(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

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

  arguments = arguments.clone

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_PUT
  path   = "_autoscaling/policy/#{Elasticsearch::API::Utils.__listify(_name)}"
  params = {}

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