An administrator manages an Azure subscription that contains a resource group named RG-App. The resource group contains a virtual machine named VM-Web. The administrator applies a ReadOnly lock to the subscription and a CanNotDelete lock to the resource group RG-App. A user who is assigned the Owner role at the subscription level attempts to start VM-Web and then attempts to delete VM-Web. What is the result of these two actions?
- Both the attempt to start VM-Web and the attempt to delete VM-Web are blocked.Cevap
- BThe user can start VM-Web, but the attempt to delete VM-Web is blocked.
- CBoth the attempt to start VM-Web and the attempt to delete VM-Web are successful because the Owner role has permissions that override resource locks.
- DThe user can delete VM-Web because the resource-group-level CanNotDelete lock overrides the subscription-level ReadOnly lock.
Cevap
Both the attempt to start VM-Web and the attempt to delete VM-Web are blocked.
The correct answer is correct because Azure Resource Locks are inherited from higher scopes (subscription) to lower scopes (resource group and resource), and they are additive. The subscription-level ReadOnly lock is inherited by the virtual machine and blocks both write operations (like starting the VM) and delete operations. Furthermore, locks apply to all users, including subscription Owners, meaning they cannot perform these actions without removing the locks first.
Adım Adım Çözüm
Anahtar Kavram
Azure Resource Locks block operations regardless of RBAC roles, are inherited, and are additive (most restrictive applies). A ReadOnly lock prevents starting or stopping a virtual machine.