There is currently no function that lets you lock a piece of content. `connectapi` should support this. At a glance, I don't think there is public API to support this feature yet. In support of https://github.com/posit-dev/connect-extensions/issues/285.