An organization hosts a production Azure Cosmos DB account. A ReadOnly resource lock is applied to the resource group containing the database, and a CanNotDelete resource lock is applied to the parent subscription. A cloud administrator with the Contributor role attempts to increase the database throughput and delete an unused database container. What is the outcome of these attempts?
- Both the throughput modification and the container deletion will be blocked.Answer
- BThe throughput modification will succeed, but the container deletion will be blocked.
- CThe throughput modification will be blocked, but the container deletion will succeed.
- DBoth the throughput modification and the container deletion will succeed.
Answer
Both the throughput modification and the container deletion will be blocked.
Both actions will be blocked. The Cosmos DB account inherits the ReadOnly lock applied to the resource group. Because a ReadOnly lock is more restrictive than a CanNotDelete lock, it prevents both configuration modifications (such as updating database throughput) and deletions (such as removing a database container). These restrictions apply to all users, including those with Contributor permissions.
Step-by-Step Solution
Key Concept
Resource locks prevent modification and deletion of Azure resources, applying to all users regardless of their RBAC roles, with child resources inheriting parent locks.