| lock_content | R Documentation |
Lock or unlock a content item. When content is locked, all processes are terminated, rendering is disabled, and new bundles cannot be deployed.
lock_content(content, locked_message = "")
unlock_content(content)
content |
An R6 content item |
locked_message |
Optional. A custom message that is displayed by the content item when locked. It is possible to format this message using Markdown. |
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.
An R6 content item
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()
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.