Developing Solutions for Azure (AZ-204)

Last Updated: 7/8/2024

Lifecycle policies

  • A lifecycle management policy is a collection of rules in a JSON document.
  • Each rule definition within a policy includes a filter set and an action set.
  • The filter set limits rule actions to a certain set of objects within a container or objects names.
  • The action set applies the tier or delete actions to the filtered set of objects
  • At least one rule is required in a policy. You can define up to 100 rules in a policy.

Rule Filters

  • Filters limit rule actions to a subset of blobs within the storage account.
  • If more than one filter is defined, a logical AND runs on all filters.
  • An array of dictionary values consisting of blob index tag key and value conditions to be matched. Each rule can define up to 10 blob index tag condition.

Rule actions

  • Actions are applied to the filtered blobs when the run condition is met.
  • Lifecycle management supports tiering and deletion of blobs and deletion of blob snapshots.
  • Define at least one action for each rule on blobs or blob snapshots.
  • Action: tierToCool, enableAutoTierToHotFromCool (Not supported in snapshot), tierToArchive, delete
  • If you define more than one action on the same blob, lifecycle management applies the least expensive action to the blob. For example, action delete is cheaper than action tierToArchive. Action tierToArchive is cheaper than action tierToCool.
  • The run conditions are based on age. Base blobs use the last modified time to track age, and blob snapshots use the snapshot creation time to track age.
  • Action run condition: daysAfterCreationGreaterThan, daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan, daysAfterLastTierChangeGreaterThan