Is it possible to lock Camera without camera type scriptable?

Is it possible to lock camera rotation with Camera type Custom? I was thinking of using render stepped to achieve this, but that might be janky.