Module: Elasticsearch::API::Autoscaling::Actions
- Included in:
- AutoscalingClient
- Defined in:
- lib/elasticsearch/api/namespace/autoscaling.rb,
lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb,
lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb,
lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb,
lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb more...
Instance Method Summary collapse
-
#delete_autoscaling_policy(arguments = {}) ⇒ Object
Deletes an autoscaling policy.
-
#get_autoscaling_capacity(arguments = {}) ⇒ Object
Gets the current autoscaling capacity based on the configured autoscaling policy.
-
#get_autoscaling_policy(arguments = {}) ⇒ Object
Retrieves an autoscaling policy.
-
#put_autoscaling_policy(arguments = {}) ⇒ Object
Creates a new autoscaling policy.
Instance Method Details
permalink #delete_autoscaling_policy(arguments = {}) ⇒ Object
Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb', line 32 def delete_autoscaling_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "autoscaling.delete_autoscaling_policy" } defined_params = [:name].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_autoscaling/policy/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
permalink #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.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb', line 31 def get_autoscaling_capacity(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_capacity" } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = "_autoscaling/capacity" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
permalink #get_autoscaling_policy(arguments = {}) ⇒ Object
Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb', line 32 def get_autoscaling_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_policy" } defined_params = [:name].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = "_autoscaling/policy/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
permalink #put_autoscaling_policy(arguments = {}) ⇒ Object
Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb', line 33 def put_autoscaling_policy(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "autoscaling.put_autoscaling_policy" } defined_params = [:name].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_autoscaling/policy/#{Utils.__listify(_name)}" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |