Question

Difficulty: MediumImplement Azure Blob Storage Lifecycle Management and Retention Policies

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?

  1. 1Apply the case-sensitive blob index tag `ArchiveStatus` with the value `Pending` to the target blobs using the Azure Storage SDK.
  2. 2Create a local JSON policy file containing a rule with a `blobIndexMatch` filter for the tag and a `tierToArchive` action under `baseBlob`.
  3. 3Run the `az storage account management-policy create` command in the Azure CLI to apply the JSON policy to the storage account.
  4. 4Wait up to 2424 hours for the platform's scheduled daily execution run of the lifecycle management service.
  5. 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 2424 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 2424 hours for the run to complete. Finally, the developer queries the blobs to verify the transition to the Archive tier.

Step-by-Step Solution

1
Tag the target blobs with the index tag `ArchiveStatus` set to `Pending`.
The blobs are indexed and searchable by the lifecycle management service.
The lifecycle service relies on these index tags to match the blob selection criteria during the policy run.
2
Create a JSON policy file defining the rules, filters, and actions.
A valid configuration document that includes the `blobIndexMatch` filter and the `tierToArchive` action.
The policy engine requires a JSON structure matching the Azure Storage lifecycle schema.
3
Apply the policy to the storage account using the Azure CLI command `az storage account management-policy create`.
The lifecycle policy is successfully bound to the Standard GPv2 storage account.
The configuration must be uploaded to the Azure Resource Manager to take effect.
4
Wait for the platform's scheduled execution run.
The platform processes the applied policy on all matching blobs in the storage account.
Lifecycle management policies are executed once every 2424 hours by the Azure platform.
5
Query the access tier of the blobs.
The metadata returns the access tier as Archive.
Confirming the metadata state change verifies that the policy was successfully executed.

Key Concept

Azure Blob Storage Lifecycle Management policy configuration, application, and scheduled execution cycles using index tag filters and Azure CLI.
Rate this question