Update Virtual Machine

Update VM

  • PATCH /api/marketplace-resources/<resource_uuid>/ - Update an existing VM.

    This endpoint allows you to modify certain attributes of a virtual machine, such as its name. Note that major configuration changes like resizing often require creating a new VM. You'll need the resource_uuid of the VM, which you can obtain from the "List VMs" endpoint (3.2.2).

    Request Example:

    PATCH [https://api.wayscloud.services/api/marketplace-resources/vm_resource_uuid/](https://api.wayscloud.services/api/marketplace-resources/vm_resource_uuid/)
    Authorization: Token <your_api_token>
    Content-Type: application/json

    {
    "name": "My Updated VM Name"
    }

    Request Parameters:

    Parameter Description Required
    name The new name for the VM. No

    Response Example:

    {
    "uuid": "vm_resource_uuid",
    "name": "My Updated VM Name",
    "state": "OK",
    "runtime_state": "active",
    //... other fields...
    }

    Status Codes:

    • 200 OK: The VM was successfully updated.
    • 400 Bad Request: The request body contained invalid data.
    • 401 Unauthorized: The user making the request is not authorized.
    • 404 Not Found: The specified VM resource_uuid does not exist.
    • 409 Conflict: The VM cannot be updated due to its current state (e.g., updating the name while the VM is creating).