How to resize a server via the IaaS-API
Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen
This tutorial will show you how to resize a server by changing its machine-type.
Prerequisites
Section titled “Prerequisites”- Switch over to where you have installed the STACKIT CLI
- First use the cli to Authenticate to the API and set the project ID
$ stackit auth loginSuccessfully logged into STACKIT CLI.$ stackit config set --project-id xxx$ PROJECTID=xxxAll available Machine Types can be found here:
Change the machine-type
Section titled “Change the machine-type”By changing the machine-type the server will have a short downtime.
Resizing a server
$ stackit curl -X POST -H "Content-Type: application/json" --data '{"machineType": "<TYPE_NAME>"}' https://iaas.api.eu01.stackit.cloud/v1/projects/<PROJECT_ID>/servers/<SERVER_ID>/resize<TYPE_NAME>should be replaced with the name of the new machine-type that should be used<PROJECT_ID>should be replaced with your actual project ID<SERVER_ID>should be replaced with the ID of the server you want to resize