Try a sample question
This is an original sample question written by itmoshi based on the exam objectives.
Several administrators hold the Owner role on the production resource group RG-Prod. You want them to keep changing resource settings as before, but you want to prevent anyone from accidentally deleting the resource group or the resources in it. What is the most appropriate approach?
- AApply a ReadOnly lock to RG-Prod
- BChange the administrators' role from Owner to Reader
- CApply a CanNotDelete lock to RG-Prod
- DAdd the tag Environment=Prod to RG-Prod
Show answer and explanation
Answer:C To block only deletion, use a CanNotDelete lock.
Why it is correct
Resource locks override RBAC permissions, so even an Owner is restricted until the lock is removed. A CanNotDelete lock blocks deletion of the resource group and the Azure resources in it while still allowing reads and ordinary configuration updates, which matches the requirement. Applied to the resource group, it is inherited by the resources inside it.
The other options
- ✗ A A ReadOnly lock blocks configuration changes as well as deletion, so the administrators could no longer modify settings. Use it when a resource's configuration must stay fixed for a period.
- ✗ B As Readers, the administrators could no longer change settings, which breaks the requirement. Reader is for users who only need to view resources.
- ✗ D Tags are labels for organizing resources and do not restrict any operation. Use them for cost reporting by department or for organizing resources.
Key takeaway
Think about what to block, not who. Block only deletion → CanNotDelete lock. Block configuration changes too → ReadOnly lock. Per-person permissions → RBAC. Organizing resources → tags. Note that locks apply to resource management operations; they do not stop data operations such as deleting blobs inside a storage account.
Try 45 questions like this for free
itmoshi is an unofficial study service and is not affiliated with Microsoft or any exam provider.