Autoscaling¶
Entities¶
Autoscaling¶
Autoscaling resource:
Field |
Explanation |
---|---|
id |
autoscaling’s identifier |
virtual_machine_id |
virtual machine’s identifier |
lbdaemon_id |
load balancer instance’s identifier |
template_id |
template’s id which will be used to create new virtual machines |
max_servers |
maximum number of servers |
created_at |
creation date |
updated_at |
update date |
autoscaling list:
Autoscaling Rules¶
Autoscaling rule resource:
Field |
Explanation |
---|---|
id |
the rule’s identifier |
autoscaling_id |
autoscaling’s identifier |
autoscaling_type |
sessions, cpu, scheduled |
threshold |
max sessions or cpus |
trigger |
check every <trigger> minutes |
expire |
will stop the rule when after <expire> hours |
priority |
rule priority |
start_at |
start date for scheduled rules. format: YYYY-MM-DD HH:mm:SS |
stop_at |
stop date for scheduled rules. format: YYYY-MM-DD HH:mm:SS |
Autoscaling rule list:
Autoscaling Server Array¶
Autoscaling server array resource:
Field |
Explanation |
---|---|
id |
server array’s identifier |
server_id |
autoscaling’s identifier |
virtual_machine_id |
virtual machine’s identifier |
ip_address |
virtual machine’s ip address |
expire |
will kill the server after <expire> hours |
created_at |
for when the server was created |
updated_at |
for when this resource was updated |
Autoscaling server array list:
Operations¶
Create¶
- Method
POST
- Url
/account/<account_id>/autoscaling
- Success Code
201
- Returned Data
- Has Token
Yes
Create an autoscale engine
Mandatory parameters:
virtual_machine_id: virtual machine to watch
balancer_instance_id: balancer instance to modify
template_id: template to use to duplicate
Optional parameters:
max_servers: maximum number of servers
List autoscalings¶
- Method
GET
- Url
/account/<account_id>/autoscalings
- Success Code
200
- Returned Data
- Has Token
No
Get an autoscale resource list
Filters:
virtual_machine_id: virtual machine id to filter autoscaling
balancer_instance_id: balancer instance id to filter autoscaling
template_id: Template id to filter autoscaling
max_servers: Max servers to filter autoscaling
Edit autoscaling¶
- Method
PUT
- Url
/account/<account_id>/autoscaling/<autoscaling_id>
- Success Code
200
- Returned Data
- Has Token
No
Modify the autoscale engine
Parameters accepted:
balancer_instance_id: balancer instance to modify
template_id: template to use to duplicate
max_servers: maximum number of servers
Get autoscaling¶
- Method
GET
- Url
/account/<account_id>/autoscaling/<autoscaling_id>
- Success Code
200
- Returned Data
- Has Token
No
Get an autoscale resource
Delete autoscaling¶
- Method
DELETE
- Url
/account/<account_id>/autoscaling/<autoscaling_id>
- Success Code
204
- Returned Data
No data returned
- Has Token
Yes
Remove an autoscale engine
Stop autoscaling¶
- Method
POST
- Url
/account/<account_id>/autoscaling/<autoscaling_id>/stop
- Success Code
200
- Returned Data
- Has Token
No
Stop all autoscaling actions
Note
After stop, number of servers will be set to 0 to make sure no new instances are activated. Change the number of max_servers with Edit autoscaling to make it work again.
Create rule¶
- Method
POST
- Url
/account/<account_id>/autoscaling_rule
- Success Code
201
- Returned Data
- Has Token
Yes
Create a new autoscale rule
Mandatory parameters:
autoscaling_id: autoscale engine to add to
autoscaling_type: type of autoscale
Optional parameters:
trigger: check every <trigger> minutes
expire: when to go back a non-triggered state
priority: priority of the rule
threshold: when to start applying the rule
start_at: mandatory just for scheduled rules
stop_at: mandatory just for scheduled rules
Delete rule¶
- Method
DELETE
- Url
/account/<account_id>/autoscaling_rule/<rule_id>
- Success Code
204
- Returned Data
No data returned
- Has Token
Yes
Remove a rule
Get rule¶
- Method
GET
- Url
/account/<account_id>/autoscaling_rule/<rule_id>
- Success Code
200
- Returned Data
- Has Token
No
Get a rule resource
Update rule¶
- Method
PUT
- Url
/account/<account_id>/autoscaling_rule/<rule_id>
- Success Code
200
- Returned Data
- Has Token
No
Modify an autoscale rule
Parameters:
threshold: when to start applying the rule
start_at
stop_at
trigger: check every <trigger> minutes
expire: when to go back a non-triggered state
priority: priority of the rule
List rules¶
- Method
GET
- Url
/account/<account_id>/autoscaling_rules
- Success Code
200
- Returned Data
- Has Token
No
Get all rules
Filters:
autoscaling_id
autoscaling_type
expire
priority
start_at
stop_at
List rules from virtual machine¶
- Method
GET
- Url
/account/<account_id>/virtual_machine/<virtual_machine_id>/autoscaling_rules
- Success Code
200
- Returned Data
- Has Token
No
Get all rules from a virtual machine
Get server array¶
- Method
GET
- Url
/account/<account_id>/autoscaling/<autoscaling_id>/server_array
- Success Code
200
- Returned Data
- Has Token
No
Get all the server generated
Filters:
ip_address: filtered server for ip address