Skip to main content
Rebuilding a virtual instance reinstalls its operating system using either the current image or another public image available in the same region. You can also replace the SSH key or provide new user data as part of the operation.
The operation replaces all data on the boot volume.
The API returns a task ID. During the operation, the instance enters REBUILD status and returns to ACTIVE when rebuilding finishes. The installed image is available in metadata.image_name.
An API token is required, along with a project ID and a region ID.

Rebuild the instance

IMAGE_ID is a public image ID from the Images API. my-key is the name of an SSH key already registered in the project, and user_data must be valid base64.