You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use Lifecycle management policies to transition blobs to cost-efficient access tiers based on their use patterns or delete them entirely at the end of their lifecycle. A policy can operate on current versions, previous versions and snapshots. A policy does not operate on blobs in system containers such as as the **$logs** or **$web** containers.
16
+
You can use lifecycle management policies to transition blobs to cost-efficient access tiers based on their use patterns. You can also delete blobs entirely at the end of their lifecycle. A policy can operate on current versions, previous versions and snapshots, but a policy doesn't operate on blobs in system containers such as as the **$logs** or **$web** containers.
17
17
18
18
This article describes the elements of a lifecycle management policy. For policy examples, see the following articles:
19
19
@@ -64,37 +64,31 @@ Filters limit actions to a subset of blobs within the storage account. You can u
|**blobTypes**| Array of predefined enum values | The type of blob (For example: **blockblob**) | Yes |
67
+
|**blobTypes**| Array of predefined enum values | The type of blob (either **blockblob** or **appendBlob**) | Yes |
68
68
|**prefixMatch**| Array of strings | These strings are prefixes to be matched. | No |
69
69
|**blobIndexMatch**| An array of dictionary values | These values consist of blob index tag key and value conditions to be matched. | No |
70
70
71
-
The current release supports **blockBlob** and **appendBlob** blob types. Only the **Delete** action is supported for **appendBlob** blob type.
71
+
#### Prefix match filter
72
72
73
-
Each rule can define up to 10 case-sensitive prefixes. A prefix string must start with a container name. For example, if you want to match all blobs under the path `https://myaccount.blob.core.windows.net/sample-container/blob1/...`, specify the **prefixMatch** as `sample-container/blob1`.
73
+
If you apply the **prefixMatch** filter, then each rule can define up to 10 case-sensitive prefixes. A prefix string must start with a container name. For example, if you want to match all blobs under the path `https://myaccount.blob.core.windows.net/sample-container/blob1/...`, specify the **prefixMatch** as `sample-container/blob1`.
74
74
75
75
This filter will match all blobs in `sample-container` where the names begin with `blob1`. If you don't define a prefix match, then, the rule applies to all blobs within the storage account. Prefix strings don't support wildcard matching. Characters such as `*` and `?` are treated as string literals.
76
76
77
-
Each rule can define up to 10 blob index tag conditions. For example, if you want to match all blobs with `Project = Contoso` under `https://myaccount.blob.core.windows.net/`, then the **blobIndexMatch** filter is `{"name": "Project","op": "==","value": "Contoso"}`. If you don't define a value for the **blobIndexMatch** filter, then the rule applies to all blobs within the storage account.
77
+
#### Blob index match filer
78
+
79
+
If you apply the **blobIndexMatch** filter, then each rule can define up to 10 blob index tag conditions. For example, if you want to match all blobs with `Project = Contoso` under `https://myaccount.blob.core.windows.net/`, then the **blobIndexMatch** filter is `{"name": "Project","op": "==","value": "Contoso"}`. If you don't define a value for the **blobIndexMatch** filter, then the rule applies to all blobs within the storage account.
78
80
79
81
### Actions
80
82
81
83
You must define at least one action for each rule. Actions are applied to the filtered blobs when the run condition is met. To learn more about run conditions, see the [Action run conditions](#action-run-conditions) section of this article. The following table describes each action that is available in a policy definition.
82
84
83
85
| Action | Description |
84
86
|---|---|
85
-
|**TierToCool**<sup>1</sup> | Set a blob to the cool access tier. |
86
-
|**TierToCold**<sup>1</sup> | Set a blob to the cold access tier. |
87
-
|**TierToArchive**<sup>1,2</sup> | Set a blob to the archive access tier. |
88
-
|**enableAutoTierToHotFromCool**<sup>3</sup> | If a blob is set to the cool tier, this action automatically moves that blob into the hot tier when the blob is accessed.<br>This action is available only when used with the **daysAfterLastAccessTimeGreaterThan** run condition.|
89
-
|**Delete**<sup>4</sup> | Deletes a blob. |
90
-
91
-
<sup>1</sup> Not supported with append blobs, page blobs, or with blobs in a premium block blob storage account.
92
-
93
-
<sup>2</sup> Not supported with blobs that use an encryption scope or with blobs in accounts that are configured for Zone-redundant storage (ZRS), geo-zone-redundant storage (GZRS) / read-access geo-zone-redundant storage (RA-GZRS).
94
-
95
-
<sup>3</sup> Not supported with previous versions or snapshots.
96
-
97
-
<sup>4</sup> Not supported with page blobs or blobs in an immutable container.
87
+
|**TierToCool**<sup>1</sup> | Set a blob to the cool access tier. Not supported with append blobs, page blobs, or with blobs in a premium block blob storage account.|
88
+
|**TierToCold**<sup>1</sup> | Set a blob to the cold access tier. Not supported with append blobs, page blobs, or with blobs in a premium block blob storage account.|
89
+
|**TierToArchive**<sup>1,2</sup> | Set a blob to the archive access tier. Not supported with append blobs, page blobs, or with blobs in a premium block blob storage account. Also not supported with blobs that use an encryption scope or with blobs in accounts that are configured for Zone-redundant storage (ZRS), geo-zone-redundant storage (GZRS) / read-access geo-zone-redundant storage (RA-GZRS)|
90
+
|**enableAutoTierToHotFromCool**<sup>3</sup> | If a blob is set to the cool tier, this action automatically moves that blob into the hot tier when the blob is accessed.<br>This action is available only when used with the **daysAfterLastAccessTimeGreaterThan** run condition. Not supported with previous versions or snapshots. |
91
+
|**Delete**<sup>4</sup> | Deletes a blob. Not supported with page blobs or blobs in an immutable container.|
98
92
99
93
If you define more than one action on the same blob, then lifecycle management applies the least expensive action to the blob. For example, a **delete** action is cheaper than the **tierToArchive** action and the **tierToArchive** action is cheaper than the **tierToCool** action.
0 commit comments