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
@@ -51,11 +50,12 @@ Enable blob inventory reports by adding a policy with one or more rules to your
51
50
52
51
9. Choose how often you want to generate reports.
53
52
54
-
9. Optionally, add a prefix match to filter blobs in your inventory report.
53
+
10. Optionally, add a prefix match to filter blobs in your inventory report.
55
54
56
-
10. Select **Save**.
55
+
11. Select **Save**.
57
56
58
-
:::image type="content" source="./media/blob-inventory-how-to/portal-blob-inventory.png" alt-text="Screenshot showing how to add a blob inventory rule by using the Azure portal":::
57
+
> [!div class="mx-imgBorder"]
58
+
> 
59
59
60
60
### [PowerShell](#tab/azure-powershell)
61
61
@@ -188,6 +188,52 @@ You can add, edit, or remove a policy via the [Azure CLI](/cli/azure/).
188
188
189
189
---
190
190
191
+
## Disable inventory reports
192
+
193
+
While you can disable individual reports, you can also prevent blob inventory from running at all.
194
+
195
+
1. Sign in to the [Azure portal](https://portal.azure.com/).
196
+
197
+
2. Locate your storage account and display the account overview.
198
+
199
+
3. Under **Data management**, select **Blob inventory**.
200
+
201
+
4. Select **Blob inventory settings**, and in the **Blob inventory settings** pane, clear the **Enable blob inventory** checkbox, and then select **Save**.
202
+
203
+
> [!div class="mx-imgBorder"]
204
+
> 
205
+
206
+
Clearing the **Enable blob inventory** checkbox suspends all blob inventory runs. You can select this checkbox later if you want to resume inventory runs.
207
+
208
+
## Optionally enable access time tracking
209
+
210
+
You can choose to enable blob access time tracking. When access time tracking is enabled, inventory reports will include the **LastAccessTime** field based on the time that the blob was last accessed with a read or write operation. To minimize the effect on read access latency, only the first read of the last 24 hours updates the last access time. Subsequent reads in the same 24-hour period don't update the last access time. If a blob is modified between reads, the last access time is the more recent of the two values.
211
+
212
+
### [Portal](#tab/azure-portal)
213
+
214
+
To enable last access time tracking with the Azure portal, follow these steps:
215
+
216
+
1. Sign in to the [Azure portal](https://portal.azure.com/).
217
+
218
+
2. Locate your storage account and display the account overview.
219
+
220
+
3. Under **Data management**, select **Blob inventory**.
221
+
222
+
4. Select **Blob inventory settings**, and in the **Blob inventory settings** pane, select the **Enable last access tracking** checkbox.
223
+
224
+
> [!div class="mx-imgBorder"]
225
+
> 
Copy file name to clipboardExpand all lines: articles/storage/blobs/blob-inventory.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ Each rule within the policy has several parameters:
94
94
| name | string | A rule name can include up to 256 case-sensitive alphanumeric characters. The name must be unique within a policy. | Yes |
95
95
| enabled | boolean | A flag allowing a rule to be enabled or disabled. The default value is **true**. | Yes |
96
96
| definition | JSON inventory rule definition | Each definition is made up of a rule filter set. | Yes |
97
-
| destination | string | The destination container where all inventory files will be generated. The destination container must already exist. |
97
+
| destination | string | The destination container where all inventory files are generated. The destination container must already exist. |
98
98
99
99
The global **Blob inventory enabled** flag takes precedence over the *enabled* parameter in a rule.
100
100
@@ -115,7 +115,7 @@ Several filters are available for customizing a blob inventory report:
115
115
| Filter name | Filter type | Notes | Required? |
116
116
|--|--|--|--|
117
117
| blobTypes | Array of predefined enum values | Valid values are `blockBlob` and `appendBlob` for hierarchical namespace enabled accounts, and `blockBlob`, `appendBlob`, and `pageBlob` for other accounts. This field isn't applicable for inventory on a container, (objectType: `container`). | Yes |
118
-
| creationTime | Number | Specifies the number of days ago within which the blob must have been created. For example, a value of `3` includes in the report only those blobs which were created in the last 3 days. | No |
118
+
| creationTime | Number | Specifies the number of days ago within which the blob must have been created. For example, a value of `3` includes in the report only those blobs, which were created in the last three days. | No |
119
119
| prefixMatch | Array of up to 10 strings for prefixes to be matched. | If you don't define *prefixMatch* or provide an empty prefix, the rule applies to all blobs within the storage account. A prefix must be a container name prefix or a container name. For example, `container`, `container1/foo`. | No |
120
120
| excludePrefix | Array of up to 10 strings for prefixes to be excluded. | Specifies the blob paths to exclude from the inventory report.<br><br>An *excludePrefix* must be a container name prefix or a container name. An empty *excludePrefix* would mean that all blobs with names matching any *prefixMatch* string will be listed.<br><br>If you want to include a certain prefix, but exclude some specific subset from it, then you could use the excludePrefix filter. For example, if you want to include all blobs under `container-a` except those under the folder `container-a/folder`, then *prefixMatch* should be set to `container-a` and *excludePrefix* should be set to `container-a/folder`. | No |
121
121
| includeSnapshots | boolean | Specifies whether the inventory should include snapshots. Default is `false`. This field isn't applicable for inventory on a container, (objectType: `container`). | No |
@@ -227,7 +227,7 @@ View the JSON for inventory rules by selecting the **Code view** tab in the **Bl
<sup>1</sup> Disabled by default. [Optionally enable access time tracking](lifecycle-management-policy-configure.md#optionally-enable-access-time-tracking).
230
+
<sup>1</sup> Disabled by default. [Optionally enable access time tracking](blob-inventory-how-to.md#optionally-enable-access-time-tracking).
231
231
232
232
### Custom schema fields supported for container inventory
233
233
@@ -249,8 +249,8 @@ View the JSON for inventory rules by selecting the **Code view** tab in the **Bl
| Deleted (Will appear only if include deleted containers is selected) |||
253
-
| Version (Will appear only if include deleted containers is selected) |||
252
+
| Deleted (Appears only if include deleted containers is selected) |||
253
+
| Version (Appears only if include deleted containers is selected) |||
254
254
| DeletedTime (Will appear only if include deleted containers is selected) |||
255
255
| RemainingRetentionDays (Will appear only if include deleted containers is selected) |||
256
256
@@ -415,7 +415,7 @@ An inventory job can take a longer amount of time in these cases:
415
415
416
416
An inventory job might take more than one day to complete for hierarchical namespace enabled accounts that have hundreds of millions of blobs. Sometimes the inventory job fails and doesn't create an inventory file. If a job doesn't complete successfully, check subsequent jobs to see if they're complete before contacting support.
417
417
418
-
- There is no option to generate a report retrospectively for a particular date.
418
+
- There's no option to generate a report retrospectively for a particular date.
419
419
420
420
### Inventory jobs can't write reports to containers that have an object replication policy
421
421
@@ -427,7 +427,7 @@ You can't configure an inventory policy in the account if support for version-le
427
427
428
428
### Reports might exclude soft-deleted blobs in accounts that have a hierarchical namespace
429
429
430
-
If a container or directory is deleted with soft-delete enabled, then the container or directory and all its contents are marked as soft-deleted. However, only the container or directory (reported as a zero-length blob) appears in an inventory report and not the soft-deleted blobs in that container or directory even if you set the `includeDeleted` field of the policy to **true**. This can lead to a difference between what appears in capacity metrics that you obtain in the Azure Portal and what is reported by an inventory report.
430
+
If a container or directory is deleted with soft-delete enabled, then the container or directory and all its contents are marked as soft-deleted. However, only the container or directory (reported as a zero-length blob) appears in an inventory report and not the soft-deleted blobs in that container or directory even if you set the `includeDeleted` field of the policy to **true**. This can lead to a difference between what appears in capacity metrics that you obtain in the Azure portal and what is reported by an inventory report.
431
431
432
432
Only blobs that are explicitly deleted appear in reports. Therefore, to obtain a complete listing of all soft-deleted blobs (directory and all child blobs), workloads should delete each blob in a directory before deleting the directory itself.
Copy file name to clipboardExpand all lines: articles/storage/blobs/lifecycle-management-policy-configure.md
+10-27Lines changed: 10 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,17 @@ A lifecycle management policy is composed of one or more rules that define a set
23
23
- The number of days since the blob was last modified.
24
24
- The number of days since the blob was last accessed. To use this condition in an action, you should first [optionally enable last access time tracking](#optionally-enable-access-time-tracking).
25
25
26
-
When the selected condition is true, then the management policy performs the specified action. For example, if you have defined an action to move a blob from the hot tier to the cool tier if it has not been modified for 30 days, then the lifecycle management policy will move the blob 30 days after the last write operation to that blob.
26
+
When the selected condition is true, then the management policy performs the specified action. For example, if you have defined an action to move a blob from the hot tier to the cool tier if it hasn't been modified for 30 days, then the lifecycle management policy will move the blob 30 days after the last write operation to that blob.
27
27
28
28
For a blob snapshot or version, the condition that is checked is the number of days since the snapshot or version was created.
29
29
30
30
## Optionally enable access time tracking
31
31
32
32
Before you configure a lifecycle management policy, you can choose to enable blob access time tracking. When access time tracking is enabled, a lifecycle management policy can include an action based on the time that the blob was last accessed with a read or write operation. To minimize the effect on read access latency, only the first read of the last 24 hours updates the last access time. Subsequent reads in the same 24-hour period don't update the last access time. If a blob is modified between reads, the last access time is the more recent of the two values.
33
33
34
-
If [last access time tracking](lifecycle-management-overview.md#move-data-based-on-last-accessed-time)is not enabled, **daysAfterLastAccessTimeGreaterThan** uses the date the lifecycle policy was enabled instead of the `LastAccessTime` property of the blob. This date is also used when the `LastAccessTime` property is a null value. For more information about using last access time tracking, see [Move data based on last accessed time](lifecycle-management-overview.md#move-data-based-on-last-accessed-time).
34
+
If [last access time tracking](lifecycle-management-overview.md#move-data-based-on-last-accessed-time)isn't enabled, **daysAfterLastAccessTimeGreaterThan** uses the date the lifecycle policy was enabled instead of the `LastAccessTime` property of the blob. This date is also used when the `LastAccessTime` property is a null value. For more information about using last access time tracking, see [Move data based on last accessed time](lifecycle-management-overview.md#move-data-based-on-last-accessed-time).
35
35
36
-
####[Portal](#tab/azure-portal)
36
+
### [Portal](#tab/azure-portal)
37
37
38
38
To enable last access time tracking with the Azure portal, follow these steps:
39
39
@@ -44,34 +44,17 @@ To enable last access time tracking with the Azure portal, follow these steps:
44
44
> [!div class="mx-imgBorder"]
45
45
> 
46
46
47
-
####[PowerShell](#tab/azure-powershell)
47
+
### [PowerShell](#tab/azure-powershell)
48
48
49
-
To enable lastaccesstime tracking with PowerShell, call the [Enable-AzStorageBlobLastAccessTimeTracking](/powershell/module/az.storage/enable-azstoragebloblastaccesstimetracking) command, as shown in the following example. Remember to replace placeholder values in angle brackets with your own values:
To enable last access time tracking with Azure CLI, call the [az storage account blob-service-properties update](/cli/azure/storage/account/blob-service-properties#az-storage-account-blob-service-properties-update) command, as shown in the following example. Remember to replace placeholder values in angle brackets with your own values:
64
-
65
-
```azurecli
66
-
az storage account blob-service-properties update \
67
-
--resource-group <resource-group> \
68
-
--account-name <storage-account> \
69
-
--enable-last-access-tracking true
70
-
```
71
-
72
-
# [Template](#tab/template)
55
+
### [Template](#tab/template)
73
56
74
-
To enable last access time tracking for a new or existing storage account with an Azure Resource Manager template, include the **lastAccessTimeTrackingPolicy** object in the template definition. For details, see the [Microsoft.Storage/storageAccounts/blobServices 2021-02-01 - Bicep & ARM template reference](/azure/templates/microsoft.storage/2021-02-01/storageaccounts/blobservices?tabs=json). The **lastAccessTimeTrackingPolicy** object is available in the Azure Storage Resource Provider REST API for versions 2019-06-01 and later.
@@ -110,7 +93,7 @@ There are two ways to add a policy through the Azure portal.
110
93
111
94
1. Select **Add** to add the new policy.
112
95
113
-
Keep in mind that a lifecycle management policy will not delete the current version of a blob until any previous versions or snapshots associated with that blob have been deleted. If blobs in your storage account have previous versions or snapshots, then you should select **Base blobs**, **Snapshots**, and **Versions** in the **Blob Subtype** section when you are specifying a delete action as part of the policy.
96
+
Keep in mind that a lifecycle management policy won't delete the current version of a blob until any previous versions or snapshots associated with that blob are deleted. If blobs in your storage account have previous versions or snapshots, then you should select **Base blobs**, **Snapshots**, and **Versions** in the **Blob Subtype** section when you're specifying a delete action as part of the policy.
To enable last access time tracking with Azure CLI, call the [az storage account blob-service-properties update](/cli/azure/storage/account/blob-service-properties#az-storage-account-blob-service-properties-update) command, as shown in the following example. Remember to replace placeholder values in angle brackets with your own values:
10
+
11
+
```azurecli
12
+
az storage account blob-service-properties update \
To enable last access time tracking with PowerShell, call the [Enable-AzStorageBlobLastAccessTimeTracking](/powershell/module/az.storage/enable-azstoragebloblastaccesstimetracking) command, as shown in the following example. Remember to replace placeholder values in angle brackets with your own values:
To enable last access time tracking for a new or existing storage account with an Azure Resource Manager template, include the **lastAccessTimeTrackingPolicy** object in the template definition. For details, see the [Microsoft.Storage/storageAccounts/blobServices 2021-02-01 - Bicep & ARM template reference](/azure/templates/microsoft.storage/2021-02-01/storageaccounts/blobservices?tabs=json). The **lastAccessTimeTrackingPolicy** object is available in the Azure Storage Resource Provider REST API for versions 2019-06-01 and later.
0 commit comments