Page tree
Skip to end of metadata
Go to start of metadata

API Essentials

API Key Generation

Autoscaling

Backups

Credit

DNS

Firewall Rules

Flex Cloud VM Control

Getting Started with Superb Flex Cloud

IP Addresses

Logs

Network Interfaces

Recipes

SSH Keys

Templates

Test Route

Troubleshooting API Issues

Viewing Activity Logs

Virtual Server Operating Systems

Virtual Servers

VS Disks

GET /virtual_machines/:virtual_machine_id/auto_scaling

Gets autoscaling rules for specified VS

Sections:

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

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url <api_url>/virtual_machines/:virtual_machine_id/auto_scaling.json

JSON Response

 [
    {
        "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

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url <api_url>/virtual_machines/:virtual_machine_id/auto_scaling.xml

XML Response example

 <?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>
  • No labels