def delete(self, device_id: int):
        """
        Deletes the resource with the given name.
        """
        device = self._get_or_abort(device_id)
        session.delete(device)
        session.commit()
        return '', 204
Deletes the resource with the given name.