Soru

Zorluk: ZorImplement Azure Blob Storage Lifecycle Management and Retention Policies

You are developing a lifecycle management policy for a Standard General Purpose v2 (GPv2) storage account to automate data tiering for telemetry log blobs. The storage account is configured with the following policy:

{
"rules": [
{
"name": "cool-rule",
"enabled": true,
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToCool": {
"daysAfterModificationGreaterThan": 14
}
}
},
"filters": {
"blobTypes": ["blockBlob"],
"prefixMatch": ["telemetry/"]
}
}
},
{
"name": "archive-rule",
"enabled": true,
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"tierToArchive": {
"daysAfterModificationGreaterThan": 90
}
}
},
"filters": {
"blobTypes": ["blockBlob"],
"prefixMatch": ["telemetry/"],
"blobIndexMatch": [
{
"name": "Archivable",
"op": "==",
"value": "true"
}
]
}
}
}
]
}

A new block blob is uploaded to `telemetry/log1.txt`. You need to trace the lifecycle transitions of this blob based on the actions taken by the client application and the lifecycle execution engine. What is the correct sequence of events from the initial upload to the archiving of the blob? Arrange the events in chronological order.

  1. 1The blob is uploaded to the Hot tier on Day `00`, initializing its Last-Modified timestamp.
  2. 2A client application updates the content of the blob on Day `1010`, updating its Last-Modified timestamp to Day `1010`.
  3. 3On Day `2424`, the lifecycle engine executes `cool-rule` and transitions the blob to the Cool tier.
  4. 4A client application sets the blob index tag `Archivable` to `true` on Day `5050`, which does not modify the Last-Modified timestamp.
  5. 5On Day `100100`, the lifecycle engine executes `archive-rule` and transitions the blob to the Archive tier.

Cevap

The correct chronological sequence is: 1) Uploading the blob to the Hot tier on Day `00`, 2) Modifying the blob content on Day `1010` (resetting the Last-Modified time), 3) Transitioning to the Cool tier on Day `2424` after `1414` days of no modification, 4) Tagging the blob as Archivable=true on Day `5050` (without updating Last-Modified), and 5) Transitioning to the Archive tier on Day `100100` after `9090` days of no modification.
The correct order follows the chronological progression of the blob's lifecycle. Content modifications reset the Last-Modified timestamp, whereas setting blob index tags does not. This means the transition to Cool happens `1414` days after the content update (Day `2424`), and the transition to Archive happens `9090` days after the content update (Day `100100`), provided the index tag filter matches.

Adım Adım Çözüm

1
Upload the blob to initialize the lifecycle.
The blob is placed in the Hot tier, and the Last-Modified time is set to Day `00`.
Lifecycle management calculations are relative to the Last-Modified timestamp.
2
Modify the blob content on Day `1010`.
The Last-Modified timestamp updates to Day `1010`, resetting the age calculation.
Modifying content alters the blob and resets the `daysAfterModificationGreaterThan` counter.
3
Evaluate the cool rule after `1414` days.
The blob transitions to the Cool tier on Day `2424`.
The blob has been unmodified for `1414` days since Day `1010`, matching the first rule's filter.
4
Tag the blob with index tags on Day `5050`.
The tag `Archivable=true` is applied, but the Last-Modified timestamp remains Day `1010`.
Tag updates do not alter the Last-Modified property, meaning the clock does not reset.
5
Evaluate the archive rule after `9090` days.
The blob transitions to the Archive tier on Day `100100`.
The blob has been unmodified for `9090` days since Day `1010`, and it matches the index tag filter required by the second rule.

Anahtar Kavram

Understanding how blob lifecycle transitions are calculated using the Last-Modified timestamp, how content modifications reset this timestamp, and how metadata/tag operations do not affect it.
Bu soruyu puanla