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

PUT /virtual_machines/:id 

Edit specified virtual server

Sections:

Request Parameters

label - the VS name

memory -  the amount of RAM allocated to this VS in Mb

cpus - the number of CPUs of this VS

cpu_shares - CPU priority percentage

cpu_units - the amount of CPU units per core if the CPU priority is replaced with CPU units in user billing plan.

allow_migration - set 1 to migrate a VS to a hypervisor with sufficient resources if a hypervisor has insufficient space to resize. Otherwise, set 0. 

allow_cold_resize – set 1 to switch to cold resize when hot resize failed

admin_note – admin notes on the VS.

note – regular notes on the VS.

If the VS is modified successfully, an HTTP 204 response is returned. If scheduling for changes fails, an HTTP 422 response is returned.

Response Parameters

If the VS is modified successfully, an HTTP 204 response is returned. If scheduling for changes fails, an HTTP 422 response is returned.

JSON Request example

 curl -i -X PUT -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"virtual_machine":{"label":"Test_API_Edit","memory":"512","cpu_shares":"40","cpus":"4","allow_migration":"1","primary_disk_min_iops":"600","swap_disk_min_iops":"600","allow_cold_resize":"1"}}' --url <api_url>/virtual_machines/:id.json

XML Request example

 curl -i -X PUT -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<?xml version="1.0" encoding="UTF-8"?><virtual_machine><label>Test_API_Edit</label><memory>512</memory><cpu_shares>40</cpu_shares><cpus>4</cpus><allow_migration>1</allow_migration><allow_cold_resize>1</allow_cold_resize><primary_disk_min_iops>600</primary_disk_min_iops><swap_disk_min_iops>600</swap_disk_min_iops></virtual_machine>' --url <api_url>/virtual_machines/:id.xml
  • No labels