Class: Scalingo::Endpoint::Autoscalers

Inherits:
Collection
  • Object
show all
Defined in:
lib/scalingo/endpoint/autoscalers.rb

Instance Attribute Summary

Attributes included from Base

#api, #auth_api, #prefix

Instance Method Summary collapse

Methods inherited from Collection

#all, #collection_name, #each, #find, #find_by, #resource_class

Methods included from Scalingo::Endpoint

included

Methods included from ClassMethods

#resources

Methods included from Base

#initialize

Instance Method Details

#create(params) ⇒ Object

  • container_type: can be any container type of an application (e.g. web, clock…)

  • min_containers: lower limit of containers

  • max_containers: upper limit of containers

  • metric: e.g. RPM per container, RAM consumption. The list of available metrics is here.

  • target: the autoscaler will keep the metric value as close to the target as possible by scaling the application

developers.scalingo.com/autoscalers



10
11
12
# File 'lib/scalingo/endpoint/autoscalers.rb', line 10

def create(params)
  post(nil, autoscaler: params)
end