Beta Create a lock for a resource, to help prevent you from inadvertently deleting it or modifying some aspects of it. You can apply a lock to a single resource, or to a resource and all of its sub-resources. This operation can only be accessed by account users with unrestricted access. Talk to your local account administrator about access management.
Once a resource has a lock, that resource (and its sub-resources, if applicable) can't be deleted, regardless of your user permission. You can unlock a resource by running the Delete a resource lock operation for the specific lock.
There's a tutorialWe offer an example API workflow you can follow to set up a resource lock on a Linode.
Permissions and scopes
To call this operation, you need permissions, based on the model you're using:
-
OAuth scopes. Your user needs these scopes assigned. Learn more.
- Scopes:
account:read_write
- Scopes:
CLI
linode-cli resource-locks create \
--entity_id 8642531 \
--entity_type linode \
--lock_type cannot_delete \