private HttpResponse updateSnapshot(SnapshotId id, String hostname, Inspector body) {
        Inspector stateField = body.field("state");
        if (!stateField.valid()) {
            throw new IllegalArgumentException("No 'state' field present in request body");
        }
        String value = stateField.asString();
        Snapshot.State newState = switch (value) {
            case "creating" -> Snapshot.State.creating;
            case "created" -> Snapshot.State.created;
            case "restoring" -> Snapshot.State.restoring;
            case "restored" -> Snapshot.State.restored;
            default -> throw new IllegalArgumentException("Invalid snapshot state '" + value + "'");
        };
        nodeRepository.snapshots().move(id, hostname, newState);
        return new MessageResponse("Updated snapshot '" + id + "' for node " + hostname);
    }
Returns true if the peer is a tenant host or node.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java