Soru

Zorluk: OrtaImplement Azure Blob Storage Lifecycle Management and Retention Policies

You are a developer implementing a data retention strategy for a Standard General Purpose v2 (GPv2) storage account. You need to configure Azure Blob Storage Lifecycle Management to automatically transition older, historical versions of blobs (noncurrent versions) to the Cool tier. You plan to configure and test this policy using the Azure CLI.

Arrange the steps in the correct order to configure the storage account, define the policy, and verify that a blob version is subject to the policy.

  1. 1Enable blob versioning on the storage account.
  2. 2Create a local JSON file that contains a lifecycle rule with actions targeting the noncurrent versions (the version sub-type).
  3. 3Run the az storage account management-policy create command, passing the JSON policy file using the --policy parameter.
  4. 4Overwrite an existing blob in the target container to generate a noncurrent version of the blob data.

Cevap

To implement lifecycle management for noncurrent blob versions, first enable blob versioning on the storage account. Next, define the lifecycle rules targeting the noncurrent versions in a local JSON policy file. Then, use the Azure CLI command to deploy the policy. Finally, overwrite a blob to create a noncurrent version to test the policy.
The correct sequence begins with enabling versioning on the storage account so that history tracking is active. Then, the JSON policy is defined to target noncurrent versions. This JSON file is then deployed using the Azure CLI. Finally, a blob is overwritten to create a noncurrent version, which will be processed by the lifecycle management rules during the next execution cycle.

Adım Adım Çözüm

1
Enable blob versioning on the Standard GPv2 storage account.
The storage account is configured to preserve previous states of blobs as noncurrent versions when they are updated or deleted.
Lifecycle rules cannot act on noncurrent versions unless versioning is enabled first to track those versions.
2
Create a JSON policy file defining rules that specify actions under the version block.
A policy document is prepared that targets noncurrent versions for tiering (e.g., transition to Cool).
The Azure CLI requires a local JSON file path to apply the policy configuration.
3
Execute the az storage account management-policy create command referencing the JSON file.
The lifecycle policy is successfully applied to the Azure Storage account.
The policy must be applied in Azure before any data modifications can be evaluated against it.
4
Overwrite an existing blob.
A new current version is written, and the previous content is preserved as a noncurrent version.
This generates the target version entity required to test the lifecycle transition rule.

Anahtar Kavram

Azure Blob Storage Lifecycle Management with Blob Versioning
Bu soruyu puanla