AZ-900 · Question #490
You have an Azure Storage account named storage1. You need to ensure that containers can be created in, but not deleted from, storage1. What should you do?
The correct answer is B. Create a delete lock for storage1.. To allow container creation but prevent deletion in an Azure Storage account, a delete lock should be applied.
Question
Options
- ACreate a ReadOnly lock for storage1.
- BCreate a delete lock for storage1.
- CEnable container soft delete.
- DEnable blob soft delete.
How the community answered
(45 responses)- A2% (1)
- B82% (37)
- C7% (3)
- D9% (4)
Why each option
To allow container creation but prevent deletion in an Azure Storage account, a delete lock should be applied.
A ReadOnly lock prevents all modification and deletion operations on the resource, which would also prevent the creation of new containers.
An Azure Resource Manager delete lock prevents users from deleting the resource, while still allowing other operations like creation and modification. Applying a delete lock to storage1 ensures that containers cannot be deleted, but container creation operations, which are not considered deletions of the storage account itself, remain unaffected.
Enabling container soft delete retains deleted containers for a specified period but does not prevent their initial deletion.
Enabling blob soft delete retains deleted blobs for a specified period, but this feature is for individual blobs, not containers, and doesn't prevent container deletion.
Concept tested: Azure Resource Locks (Delete Lock)
Source: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources
Community Discussion
No community discussion yet for this question.