ServerMania logo

Get the List of Autoscaling Rules for VS

To get the list of autoscaling rules for a particular VS, use the following request:

GET /virtual_machines/:virtual_machine_id/auto_scaling.xml
GET /virtual_machines/:virtual_machine_id/auto_scaling.json

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://test/virtual_machines/3823/auto_scaling.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://test/virtual_machines/3823/auto_scaling.json 

XML Output Example

<auto_scaling_configurations type="array">
<auto_scaling_configuration>
    <adjust_units type="integer">10</adjust_units>
    <created_at type="datetime">2015-02-27T16:11:12+02:00</created_at>
    <for_minutes type="integer">5</for_minutes>
    <id type="integer">6</id>
    <limit_trigger type="integer">10</limit_trigger>
    <resource>cpu</resource>
    <scale_type>up</scale_type>
    <up_to type="integer">50</up_to>
    <updated_at type="datetime">2015-02-27T16:11:12+02:00</updated_at>
    <virtual_machine_id type="integer">3823</virtual_machine_id>
    <above type="integer">10</above>
    <add_units type="integer">10</add_units>
  </auto_scaling_configuration>
...
<auto_scaling_configuration></auto_scaling_configuration>
...
</auto_scaling_configuration> 

Where:

adjust_unitsthe amount of resource units which the system should add/remove if the rule is met

created_at - the date when the record in DB was created

for_minutes - the time threshold before scaling will be triggered

id -  the ID of the rule

limit_triggerthe amount of the resource usage (%). If this value is reached by the VS for the period specified by the for_minutes parameter, the system will add/remove the amount of units set by the adjust_units parameters

resource -  the resource for which the rule is created (memory/cpu/disk )

scale_type - the autoscale option for this rule: up or down

up_to -  the amount of resource which cannot be exceeded within 24 hours period

updated_at -  the date when the record in DB was updated

virtual_machine_idthe ID of the VS to which this rule applies

above - the amount of the resource usage (%). If this value is reached by the VS during the period specified by the for_minutes parameter, the system will add the amount of units set by the add_units parameters

add_units - the amount of resource units which the system should add if the rule is met