This is UNOFFICIAL Auto VM Resizer for IdCloudhost Console VM. For official API, you can read from this Documentation.
PHP 7.3++
Install required composer package using command
composer install
After that, assign value to .env. If you dont want to use telegram as notification channel, just let it null.
You should change xxx value on BASE_URL to your VM server location, for example Singapore location will be sgp01.
PROCESSOR_MAX = 2
PROCESSOR_MIN = 1
RAM_MAX = 2048
RAM_MIN = 1024
TOKEN = YOUR_TOKEN
VM_ID = YOUR_VM_ID
BASE_URL = "https://api.idcloudhost.com/v1/xxx/"
TELEGRAM_TOKEN =
CHAT_ID =
You can run the script for 2 method, the first one is minimize and maximize.
Minimize will use PROCESSOR_MIN and RAM_MIN, and maximize will use the PROCESSOR_MAX and RAM_MAX for your VM spec.
For example minimize
php index.php minimize
For example maximize
php index.php maximize
If you find a bug, please open new issue.