Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

GET /virtual_machines/:virtual_machine_id/auto_scaling

Gets autoscaling rules for specified VS

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*|Explanation.*

Response Parameters

adjust_units - the 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_trigger - the 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_id - the 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

JSON Request example

Code Block
languagebash
themeRDark
 GET /virtual_machines/:virtual_machine_id/auto_scaling.json

JSON Response

Code Block
themeRDark
 [
    {
        "auto_scaling_configuration": {
            "adjust_units": 500,
            "created_at": "2015-08-27T20:31:29+00:00",
            "for_minutes": 5,
            "id": 13,
            "limit_trigger": 60,
            "resource": "memory",
            "scale_type": "up",
            "up_to": 1000,
            "updated_at": "2015-08-27T20:31:29+00:00",
            "virtual_machine_id": 511,
            "above": 60,
            "add_units": 500
        }
    },
    {
        "auto_scaling_configuration": {
            "adjust_units": 500,
            "created_at": "2015-08-27T20:31:29+00:00",
            "for_minutes": 5,
            "id": 14,
            "limit_trigger": 30,
            "resource": "memory",
            "scale_type": "down",
            "up_to": null,
            "updated_at": "2015-08-27T20:31:29+00:00",
            "virtual_machine_id": 511,
            "above": 30,
            "add_units": 500
        }
    },
    {
        "auto_scaling_configuration": {
            "adjust_units": 53,
            "created_at": "2015-08-27T20:31:29+00:00",
            "for_minutes": 10,
            "id": 15,
            "limit_trigger": 30,
            "resource": "cpu",
            "scale_type": "up",
            "up_to": 70,
            "updated_at": "2015-08-27T20:31:29+00:00",
            "virtual_machine_id": 511,
            "above": 30,
            "add_units": 53
        }
    },
    {
        "auto_scaling_configuration": {
            "adjust_units": 51,
            "created_at": "2015-08-27T20:31:29+00:00",
            "for_minutes": 5,
            "id": 16,
            "limit_trigger": 30,
            "resource": "cpu",
            "scale_type": "down",
            "up_to": null,
            "updated_at": "2015-08-27T20:31:29+00:00",
            "virtual_machine_id": 511,
            "above": 30,
            "add_units": 51
        }
    },
    {
        "auto_scaling_configuration": {
            "adjust_units": 5,
            "created_at": "2015-08-27T20:31:29+00:00",
            "for_minutes": 15,
            "id": 17,
            "limit_trigger": 30,
            "resource": "disk",
            "scale_type": "up",
            "up_to": 10,
            "updated_at": "2015-08-27T20:31:29+00:00",
            "virtual_machine_id": 511,
            "above": 30,
            "add_units": 5
        }
    },
    {
        "auto_scaling_configuration": {
            "adjust_units": null,
            "created_at": null,
            "for_minutes": null,
            "id": null,
            "limit_trigger": null,
            "resource": "disk",
            "scale_type": "down",
            "up_to": null,
            "updated_at": null,
            "virtual_machine_id": 511,
            "above": null,
            "add_units": null
        }
    }
]

XML Request example

Code Block
languagebash
themeRDark
 GET /virtual_machines/:virtual_machine_id/auto_scaling.xml

XML Response example

Code Block
languagexml
themeRDark
 <?xml version="1.0" encoding="UTF-8"?>
<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>