Lock or unlock a content item. When content is locked, all processes are terminated, rendering is disabled, and new bundles cannot be deployed.
Details
lock_content() locks a content item with an optional message displayed to
visitors (supports Markdown).
unlock_content() unlocks a content item, reverting the effects of locking.
See also
Other content functions:
content_delete(),
content_item(),
content_title(),
content_update(),
create_random_name(),
dashboard_url(),
delete_thumbnail(),
delete_vanity_url(),
deploy_repo(),
get_associations(),
get_bundles(),
get_environment(),
get_image(),
get_job(),
get_jobs(),
get_log(),
get_thumbnail(),
get_vanity_url(),
git,
has_thumbnail(),
permissions,
search_content(),
set_image_path(),
set_integrations(),
set_run_as(),
set_thumbnail(),
set_vanity_url(),
swap_vanity_url(),
swap_vanity_urls(),
terminate_jobs(),
verify_content_name()
Examples
if (FALSE) { # \dontrun{
# Lock content with a message
client <- connect()
content <- content_item(client, "content-guid")
content <- lock_content(content, locked_message = "Ah ah ah! You didn't say the magic word!")
# Lock content without a message
content <- lock_content(content)
# Unlock content
content <- unlock_content(content)
} # }