Rebuilds a virtual machine, reinstalling it from a specified image.
POST
/v1/projects/:projectId/vms/:vmId/rebuildThis operation is asynchronous and returns a pollable operation id. Poll
GET /v{version}/projects/{projectId}/operations/{operationId} using the returned
OperationId until its status leaves InProgress. A new initial login password is
generated and returned in the response. If SshKeyIds is omitted or empty, the VM's currently
bound SSH keys are reused; otherwise the provided keys become the effective set for the rebuilt VM.
Request
Responses
- 202
- 400
- 404
- 409
The rebuild request was accepted; the VM is being reinstalled in the background.
The request body failed validation.
The project, VM or image was not found.
Another operation is already in progress on this VM. Poll until it clears, then retry.