2
votes

We defined data from azure blob container to be deleted after 1 day with the following policy

{
  "rules": [
    {
      "name": "expirationRule",
      "enabled": true,
      "type": "Lifecycle",
      "definition": {
        "filters": {
          "blobTypes": [ "blockBlob" ]
        },
        "actions": {
          "baseBlob": {
            "delete": { "daysAfterModificationGreaterThan": 1 }
          }
        }
      }
    }
  ]
}

We know that platform runs the lifecycle policy once a day. And it will delete files, but will it count hours, minutes, or just take days.

For example, I upload a file at 9:00, I will create a lifecycle at 13:00. The container will trigger lifecycle tomorrow at 13:00 and delete the file or it will be deleted the day after tomorrow after a full day?

1
what do you mean "the container will trigger lifecycle tomorrow at 13:00"? you create the policy at 13:00 in tomorrow, or you've already created the policy and it'll be triggered 13:00 in tomorrow?Ivan Yang
for example, I will create it at 13:00 today and it will be triggered tomorrow at 13:00Andriy Moskalyuk

1 Answers

2
votes

For the first time to run lifecycle management policy, it can take up to 24 hours to run the policy.

For example, you upload a file at 9:00 AM today, and then create a lifecycle policy at 13:00 PM today. The file will be deleted within 24 hours. It means that the file will be deleted at any time between 13:00 PM today and 13:00 PM tomorrow.