# 3.2.4 Describe the Purpose of Resource Locks

Even with RBAC, there is still a risk that someone accidentally deletes a critical resource. Resource locks can prevent a resource from being modified or deleted. These can be applied to resources, resource groups, or entire subscriptions. They are also inherited. There are two types of lock:

* Delete means authorised users can read and modify a resource, but can't delete it.
* ReadOnly means authorised users can read a resource, but can't delete or update it.

Resource locks are managed from Azure Portal, PowerShell, Azure CLI or an Azure Resource Manager template. In the portal, go to the settings of any resource to add, view or delete a lock.

### How do I Delete or Change a Locked Rsource?

To do this, first remove the lock and then apply the change. Locks apply regardless of RBAC permissions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://contrxl.gitbook.io/contrxl/systems-administration/microsoft/az-900/3.-management-and-governance/3.2-governance-and-compliance/3.2.4-describe-the-purpose-of-resource-locks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
