A developer is configuring a data retention policy for a Standard General Purpose v2 (GPv2) storage account. The goal is to automatically transition specific blobs to the Archive tier when they are no longer actively needed. The developer plans to identify target blobs using the index tag `ArchiveStatus = 'Pending'`. Which sequence of steps must the developer perform to configure, apply, and verify this lifecycle management policy?
- 1Apply the case-sensitive blob index tag `ArchiveStatus` with the value `Pending` to the target blobs using the Azure Storage SDK.
- 2Create a local JSON policy file containing a rule with a `blobIndexMatch` filter for the tag and a `tierToArchive` action under `baseBlob`.
- 3Run the `az storage account management-policy create` command in the Azure CLI to apply the JSON policy to the storage account.
- 4Wait up to hours for the platform's scheduled daily execution run of the lifecycle management service.
- 5Query the properties of the tagged blobs using the Azure CLI or SDK to verify that their access tier is set to Archive.
Answer
To configure and verify the lifecycle management policy, you must first apply the case-sensitive blob index tag to the target blobs. Next, create a local JSON policy file defining a rule with a matching tag filter and a transition action. Then, run the CLI command to apply this policy. Allow up to hours for the platform's daily run to execute. Finally, query the properties of the blobs to confirm the access tier has transitioned to Archive.
The correct sequence begins with preparing the blobs by tagging them, as they must exist with index tags before evaluation. Then, the JSON policy document must be authored with a `blobIndexMatch` rule. The policy is applied to the Standard GPv2 storage account using `az storage account management-policy create`. Since execution occurs on a daily schedule, the developer must wait up to hours for the run to complete. Finally, the developer queries the blobs to verify the transition to the Archive tier.
Step-by-Step Solution
Key Concept
Azure Blob Storage Lifecycle Management policy configuration, application, and scheduled execution cycles using index tag filters and Azure CLI.