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.
- 1Enable blob versioning on the storage account.
- 2Create a local JSON file that contains a lifecycle rule with actions targeting the noncurrent versions (the version sub-type).
- 3Run the az storage account management-policy create command, passing the JSON policy file using the --policy parameter.
- 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
Anahtar Kavram
Azure Blob Storage Lifecycle Management with Blob Versioning