Skip to content

Commit dafafb9

Browse files
authored
update lcm with blob index changes
1 parent 8d6fabc commit dafafb9

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

articles/storage/blobs/storage-lifecycle-management-concepts.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to create lifecycle policy rules to transition aging data
44
author: mhopkins-msft
55

66
ms.author: mhopkins
7-
ms.date: 05/21/2019
7+
ms.date: 04/24/2020
88
ms.service: storage
99
ms.subservice: common
1010
ms.topic: conceptual
@@ -20,7 +20,7 @@ The lifecycle management policy lets you:
2020
- Transition blobs to a cooler storage tier (hot to cool, hot to archive, or cool to archive) to optimize for performance and cost
2121
- Delete blobs at the end of their lifecycles
2222
- Define rules to be run once per day at the storage account level
23-
- Apply rules to containers or a subset of blobs (using prefixes as filters)
23+
- Apply rules to containers or a subset of blobs (using name prefixes or [blob index tags](storage-manage-and-find-blobs.md) as filters)
2424

2525
Consider a scenario where data gets frequent access during the early stages of the lifecycle, but only occasionally after two weeks. Beyond the first month, the data set is rarely accessed. In this scenario, hot storage is best during the early stages. Cool storage is most appropriate for occasional access. Archive storage is the best tier option after the data ages over a month. By adjusting storage tiers in respect to the age of data, you can design the least expensive storage options for your needs. To achieve this transition, lifecycle management policy rules are available to move aging data to cooler tiers.
2626

@@ -124,7 +124,7 @@ There are two ways to add a policy through the Azure portal.
124124

125125
6. For more information about this JSON example, see the [Policy](#policy) and [Rules](#rules) sections.
126126

127-
# [Powershell](#tab/azure-powershell)
127+
# [PowerShell](#tab/azure-powershell)
128128

129129
The following PowerShell script can be used to add a policy to your storage account. The `$rgname` variable must be initialized with your resource group name. The `$accountName` variable must be initialized with your storage account name.
130130

@@ -288,7 +288,11 @@ Filters include:
288288
| Filter name | Filter type | Notes | Is Required |
289289
|-------------|-------------|-------|-------------|
290290
| blobTypes | An array of predefined enum values. | The current release supports `blockBlob`. | Yes |
291-
| prefixMatch | An array of strings for prefixes to be match. Each rule can define up to 10 prefixes. A prefix string must start with a container name. For example, if you want to match all blobs under `https://myaccount.blob.core.windows.net/container1/foo/...` for a rule, the prefixMatch is `container1/foo`. | If you don't define prefixMatch, the rule applies to all blobs within the storage account. | No |
291+
| prefixMatch | An array of strings for prefixes to be matched. Each rule can define up to 10 prefixes. A prefix string must start with a container name. For example, if you want to match all blobs under `https://myaccount.blob.core.windows.net/container1/foo/...` for a rule, the prefixMatch is `container1/foo`. | If you don't define prefixMatch, the rule applies to all blobs within the storage account. | No |
292+
| blobIndexMatch | 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. For example, if you want to match all blobs with `Project = Contoso` under `https://myaccount.blob.core.windows.net/` for a rule, the blobIndexMatch is `{"name": "Project","op": "==","value": "Contoso"}`. | If you don't define blobIndexMatch, the rule applies to all blobs within the storage account. | No |
293+
294+
> [!NOTE]
295+
> Blob Index is in public preview, and is available in the **France Central** and **France South** regions. To learn more about this feature along with known issues and limitations, see [Manage and find data on Azure Blob Storage with Blob Index (Preview)](storage-manage-and-find-blobs.md).
292296
293297
### Rule actions
294298

@@ -401,6 +405,42 @@ Some data is expected to expire days or months after creation. You can configure
401405
}
402406
```
403407

408+
### Delete data with Blob Index tags
409+
Some data should only be expired if explicitly marked for deletion. You can configure a lifecycle management policy to expire data that are tagged with blob index key/value attributes. The following example shows a policy that deletes all block blobs tagged with `Project = Contoso`. To learn more about the Blob Index, see [Manage and find data on Azure Blob Storage with Blob Index (Preview)](storage-manage-and-find-blobs.md).
410+
411+
```json
412+
{
413+
"rules": [
414+
{
415+
"enabled": true,
416+
"name": "DeleteContosoData",
417+
"type": "Lifecycle",
418+
"definition": {
419+
"actions": {
420+
"baseBlob": {
421+
"delete": {
422+
"daysAfterModificationGreaterThan": 0
423+
}
424+
}
425+
},
426+
"filters": {
427+
"blobIndexMatch": [
428+
{
429+
"name": "Project",
430+
"op": "==",
431+
"value": "Contoso"
432+
}
433+
],
434+
"blobTypes": [
435+
"blockBlob"
436+
]
437+
}
438+
}
439+
}
440+
]
441+
}
442+
```
443+
404444
### Delete old snapshots
405445

406446
For data that is modified and accessed regularly throughout its lifetime, snapshots are often used to track older versions of the data. You can create a policy that deletes old snapshots based on snapshot age. The snapshot age is determined by evaluating the snapshot creation time. This policy rule deletes block blob snapshots within container `activedata` that are 90 days or older after snapshot creation.

0 commit comments

Comments
 (0)