Skip to content

Commit 1ad43cc

Browse files
authored
Merge pull request #197310 from tamram/tamram22-0505a
clarify behavior on LCM delete action for HNS accounts
2 parents 315831e + f2d3e1e commit 1ad43cc

File tree

4 files changed

+52
-55
lines changed

4 files changed

+52
-55
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Use Azure Storage lifecycle management policies to create automated
55
author: tamram
66

77
ms.author: tamram
8-
ms.date: 04/18/2022
8+
ms.date: 05/05/2022
99
ms.service: storage
1010
ms.subservice: common
1111
ms.topic: conceptual
@@ -150,7 +150,9 @@ Lifecycle management supports tiering and deletion of current versions, previous
150150
| tierToCool | Supported for `blockBlob` | Supported | Supported |
151151
| enableAutoTierToHotFromCool | Supported for `blockBlob` | Not supported | Not supported |
152152
| tierToArchive | Supported for `blockBlob` | Supported | Supported |
153-
| delete | Supported for `blockBlob` and `appendBlob` | Supported | Supported |
153+
| delete<sup>1</sup> | Supported for `blockBlob` and `appendBlob` | Supported | Supported |
154+
155+
<sup>1</sup> When applied to an account with a hierarchical namespace enabled, a delete action removes empty directories. If the directory is not empty, then the delete action removes objects that meet the policy conditions within the first 24-hour cycle. If that action results in an empty directory that also meets the policy conditions, then that directory will be removed within the next 24-hour cycle, and so on.
154156

155157
> [!NOTE]
156158
> 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`.

articles/storage/blobs/object-replication-configure.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 05/02/2022
10+
ms.date: 05/05/2022
1111
ms.author: tamram
1212
ms.subservice: blobs
1313
ms.custom: devx-track-azurecli, devx-track-azurepowershell
@@ -21,7 +21,7 @@ This article describes how to configure an object replication policy by using th
2121

2222
## Prerequisites
2323

24-
Before you configure object replication, create the source and destination storage accounts if they do not already exist. The source and destination accounts can be either general-purpose v2 storage accounts or premium block blob accounts. For more information, see [Create an Azure Storage account](../common/storage-account-create.md).
24+
Before you configure object replication, create the source and destination storage accounts if they don't already exist. The source and destination accounts can be either general-purpose v2 storage accounts or premium block blob accounts. For more information, see [Create an Azure Storage account](../common/storage-account-create.md).
2525

2626
Object replication requires that blob versioning is enabled for both the source and destination account, and that blob change feed is enabled for the source account. To learn more about blob versioning, see [Blob versioning](versioning-overview.md). To learn more about change feed, see [Change feed support in Azure Blob Storage](storage-blob-change-feed.md). Keep in mind that enabling these features can result in additional costs.
2727

@@ -47,7 +47,7 @@ To create a replication policy in the Azure portal, follow these steps:
4747

4848
:::image type="content" source="media/object-replication-configure/configure-replication-policy.png" alt-text="Screenshot showing replication rules in Azure portal":::
4949

50-
1. If desired, specify one or more filters to copy only blobs that match a prefix pattern. For example, if you specify a prefix `b`, only blobs whose name begin with that letter are replicated. You can specify a virtual directory as part of the prefix. The prefix string does not support wildcard characters.
50+
1. If desired, specify one or more filters to copy only blobs that match a prefix pattern. For example, if you specify a prefix `b`, only blobs whose name begin with that letter are replicated. You can specify a virtual directory as part of the prefix. You can add a maximum of up to five prefix matches. The prefix string doesn't support wildcard characters.
5151

5252
The following image shows filters that restrict which blobs are copied as part of a replication rule.
5353

@@ -85,30 +85,30 @@ $srcContainerName2 = "source-container2"
8585
$destContainerName2 = "dest-container2"
8686
8787
# Enable blob versioning and change feed on the source account.
88-
Update-AzStorageBlobServiceProperty -ResourceGroupName $rgname `
88+
Update-AzStorageBlobServiceProperty -ResourceGroupName $rgName `
8989
-StorageAccountName $srcAccountName `
9090
-EnableChangeFeed $true `
9191
-IsVersioningEnabled $true
9292
9393
# Enable blob versioning on the destination account.
94-
Update-AzStorageBlobServiceProperty -ResourceGroupName $rgname `
94+
Update-AzStorageBlobServiceProperty -ResourceGroupName $rgName `
9595
-StorageAccountName $destAccountName `
9696
-IsVersioningEnabled $true
9797
9898
# List the service properties for both accounts.
99-
Get-AzStorageBlobServiceProperty -ResourceGroupName $rgname `
99+
Get-AzStorageBlobServiceProperty -ResourceGroupName $rgName `
100100
-StorageAccountName $srcAccountName
101-
Get-AzStorageBlobServiceProperty -ResourceGroupName $rgname `
101+
Get-AzStorageBlobServiceProperty -ResourceGroupName $rgName `
102102
-StorageAccountName $destAccountName
103103
104104
# Create containers in the source and destination accounts.
105-
Get-AzStorageAccount -ResourceGroupName $rgname -StorageAccountName $srcAccountName |
105+
Get-AzStorageAccount -ResourceGroupName $rgName -StorageAccountName $srcAccountName |
106106
New-AzStorageContainer $srcContainerName1
107-
Get-AzStorageAccount -ResourceGroupName $rgname -StorageAccountName $destAccountName |
107+
Get-AzStorageAccount -ResourceGroupName $rgName -StorageAccountName $destAccountName |
108108
New-AzStorageContainer $destContainerName1
109-
Get-AzStorageAccount -ResourceGroupName $rgname -StorageAccountName $srcAccountName |
109+
Get-AzStorageAccount -ResourceGroupName $rgName -StorageAccountName $srcAccountName |
110110
New-AzStorageContainer $srcContainerName2
111-
Get-AzStorageAccount -ResourceGroupName $rgname -StorageAccountName $destAccountName |
111+
Get-AzStorageAccount -ResourceGroupName $rgName -StorageAccountName $destAccountName |
112112
New-AzStorageContainer $destContainerName2
113113
114114
# Define replication rules for each container.
@@ -120,14 +120,14 @@ $rule2 = New-AzStorageObjectReplicationPolicyRule -SourceContainer $srcContainer
120120
-MinCreationTime 2021-09-01T00:00:00Z
121121
122122
# Create the replication policy on the destination account.
123-
$destPolicy = Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgname `
123+
$destPolicy = Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
124124
-StorageAccountName $destAccountName `
125125
-PolicyId default `
126126
-SourceAccount $srcAccountName `
127127
-Rule $rule1,$rule2
128128
129129
# Create the same policy on the source account.
130-
Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgname `
130+
Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
131131
-StorageAccountName $srcAccountName `
132132
-InputObject $destPolicy
133133
```
@@ -218,7 +218,7 @@ az storage account or-policy show \
218218

219219
## Configure object replication using a JSON file
220220

221-
If you do not have permissions to the source storage account or if you want to use more than 10 container pairs, then you can configure object replication on the destination account and provide a JSON file that contains the policy definition to another user to create the same policy on the source account. For example, if the source account is in a different Azure AD tenant from the destination account, then you can use this approach to configure object replication.
221+
If you don't have permissions to the source storage account or if you want to use more than 10 container pairs, then you can configure object replication on the destination account and provide a JSON file that contains the policy definition to another user to create the same policy on the source account. For example, if the source account is in a different Azure AD tenant from the destination account, then you can use this approach to configure object replication.
222222

223223
> [!NOTE]
224224
> Cross-tenant object replication is permitted by default for a storage account. To prevent replication across tenants, you can set the **AllowCrossTenantReplication** property (preview) to disallow cross-tenant object replication for your storage accounts. For more information, see [Prevent object replication across Azure Active Directory tenants](object-replication-prevent-cross-tenant-policies.md).
@@ -252,7 +252,7 @@ You can then download a JSON file containing the policy definition that you can
252252

253253
The downloaded JSON file includes the policy ID that Azure Storage created for the policy on the destination account. You must use the same policy ID to configure object replication on the source account.
254254

255-
Keep in mind that uploading a JSON file to create a replication policy for the destination account via the Azure portal does not automatically create the same policy in the source account. Another user must create the policy on the source account before Azure Storage begins replicating objects.
255+
Keep in mind that uploading a JSON file to create a replication policy for the destination account via the Azure portal doesn't automatically create the same policy in the source account. Another user must create the policy on the source account before Azure Storage begins replicating objects.
256256

257257
# [PowerShell](#tab/powershell)
258258

@@ -262,7 +262,7 @@ To download a JSON file that contains the replication policy definition for the
262262
$rgName = "<resource-group>"
263263
$destAccountName = "<destination-storage-account>"
264264
265-
$destPolicy = Get-AzStorageObjectReplicationPolicy -ResourceGroupName $rgname `
265+
$destPolicy = Get-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
266266
-StorageAccountName $destAccountName
267267
$destPolicy | ConvertTo-Json -Depth 5 > c:\temp\json.txt
268268
```
@@ -273,7 +273,7 @@ When running the example, be sure to set the `-ResourceGroupName` parameter to t
273273

274274
```powershell
275275
$object = Get-Content -Path C:\temp\json.txt | ConvertFrom-Json
276-
Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgname `
276+
Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
277277
-StorageAccountName $srcAccountName `
278278
-PolicyId $object.PolicyId `
279279
-SourceAccount $object.SourceAccount `
@@ -306,7 +306,7 @@ az storage account or-policy create \
306306

307307
## Check the replication status of a blob
308308

309-
You can check the replication status for a blob in the source account using the Azure portal, PowerShell, or Azure CLI. Object replication properties are not populated until replication has either completed or failed.
309+
You can check the replication status for a blob in the source account using the Azure portal, PowerShell, or Azure CLI. Object replication properties aren't populated until replication has either completed or failed.
310310

311311
# [Azure portal](#tab/portal)
312312

@@ -323,7 +323,7 @@ To check the replication status for a blob in the source account in the Azure po
323323
To check the replication status for a blob in the source account with PowerShell, get the value of the object replication **ReplicationStatus** property, as shown in the following example. Remember to replace values in angle brackets with your own values:
324324

325325
```powershell
326-
$ctxSrc = (Get-AzStorageAccount -ResourceGroupName $rgname `
326+
$ctxSrc = (Get-AzStorageAccount -ResourceGroupName $rgName `
327327
-StorageAccountName $srcAccountName).Context
328328
$blobSrc = Get-AzStorageBlob -Container $srcContainerName1 `
329329
-Context $ctxSrc `
@@ -363,7 +363,7 @@ To remove a replication policy in the Azure portal, follow these steps:
363363

364364
1. Navigate to the source storage account in the Azure portal.
365365
1. Under **Settings**, select **Object replication**.
366-
1. Click the **More** button next to the policy name.
366+
1. Select the **More** button next to the policy name.
367367
1. Select **Delete Rules**.
368368

369369
# [PowerShell](#tab/powershell)
@@ -372,12 +372,12 @@ To remove a replication policy, delete the policy from both the source account a
372372

373373
```powershell
374374
# Remove the policy from the destination account.
375-
Remove-AzStorageObjectReplicationPolicy -ResourceGroupName $rgname `
375+
Remove-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
376376
-StorageAccountName $destAccountName `
377377
-PolicyId $destPolicy.PolicyId
378378
379379
# Remove the policy from the source account.
380-
Remove-AzStorageObjectReplicationPolicy -ResourceGroupName $rgname `
380+
Remove-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
381381
-StorageAccountName $srcAccountName `
382382
-PolicyId $destPolicy.PolicyId
383383
```

articles/storage/blobs/soft-delete-blob-enable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: tamram
77

88
ms.service: storage
99
ms.topic: how-to
10-
ms.date: 06/29/2021
10+
ms.date: 05/05/2022
1111
ms.author: tamram
1212
ms.subservice: blobs
1313
ms.custom: devx-track-azurepowershell
@@ -19,7 +19,7 @@ Blob soft delete protects an individual blob and its versions, snapshots, and me
1919

2020
Blob soft delete is part of a comprehensive data protection strategy for blob data. To learn more about Microsoft's recommendations for data protection, see [Data protection overview](data-protection-overview.md).
2121

22-
Blob soft delete is disabled by default for a new storage account. You can enable or disable soft delete for a storage account at any time by using the Azure portal, PowerShell, or Azure CLI.
22+
Blob soft delete is enabled by default for a new storage account. You can enable or disable soft delete for a storage account at any time by using the Azure portal, PowerShell, or Azure CLI.
2323

2424
## Enable blob soft delete
2525

0 commit comments

Comments
 (0)