Zum Inhalt springen

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.

  • 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 login
Successfully logged into STACKIT CLI.
$ stackit config set --project-id xxx
$ PROJECTID=xxx

All available Machine Types can be found here:

Server machine types

By changing the machine-type the server will have a short downtime.

Resizing a server

Terminal window
$ 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