|
319 | 319 |
|
320 | 320 | --- |
321 | 321 |
|
| 322 | +## Configure blob index tags replication (preview) |
| 323 | + |
| 324 | +Object replication now supports copying index tags from source blobs to destination blobs. You can configure this capability as part of a new or existing replication rule. |
| 325 | + |
| 326 | +> [!IMPORTANT] |
| 327 | +> Tag replication is currently in PREVIEW. |
| 328 | +> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability. |
| 329 | +
|
| 330 | +### Prerequisites |
| 331 | + |
| 332 | +The source storage account must be registered for the EnableObjectReplicationTags preview feature before tag replication can be enabled. Register the preview feature in the Azure portal by following the steps in the [Azure Resource Manager preview features](/azure/azure-resource-manager/management/preview-features?tabs=azure-portal) documentation. |
| 333 | + |
| 334 | +### Enable Tags replication |
| 335 | + |
| 336 | +Tags replication can be enabled on both new and existing object replication policies. Any change to a source blob or it's index tags will trigger replication of tags. |
| 337 | + |
| 338 | +#### [Azure portal](#tab/portal) |
| 339 | + |
| 340 | +Enable tags replication from the Object Replication blade when creating a rule or update existing rules using the Tags replication column. |
| 341 | + |
| 342 | +To configure replicating blob index tags when creating a new rule, follow these steps: |
| 343 | + |
| 344 | +1. Navigate to the source storage account in the Azure portal. |
| 345 | +1. Under **Data management**, select **Object replication**. |
| 346 | +1. Select **Create replication rules**. |
| 347 | +1. Select **Enable tags replication** and finally select **Save and apply** to configure replicating blob index tags. |
| 348 | + |
| 349 | +To configure replicating blob index tags for exsiting rules, follow these steps: |
| 350 | + |
| 351 | +1. Navigate to **Your accounts tab** in **Object replication** page |
| 352 | +1. Select **Enable** option under Tags replication column in **Objects copied from this account** table and select **OK**. |
| 353 | +1. Status of Tags replication column against a rule now shows **Enabled**. |
| 354 | + |
| 355 | +To disable replicating blob index tags for exsiting rules, follow these steps: |
| 356 | + |
| 357 | +1. Navigate to **Your accounts tab** in **Object replication** page |
| 358 | +2. Select an exsiting rule and select **Edit rules** from the '…' menu |
| 359 | +3. Unselect **Enable tags replication** option and finally select **Save and apply** to disable replicating blob index tags. |
| 360 | + |
| 361 | +#### [PowerShell](#tab/powershell) |
| 362 | + |
| 363 | +N/A. |
| 364 | + |
| 365 | +#### [Azure CLI](#tab/azure-cli) |
| 366 | + |
| 367 | +N/A. |
| 368 | + |
| 369 | +#### [REST API](#tab/rest-api) |
| 370 | + |
| 371 | +Users can use existing REST APIs: [Object Replication Policies - Create Or Update - REST API](/rest/api/storagerp/object-replication-policies/create-or-update) to configure policies for replicating tags set on the Blobs. |
| 372 | + |
| 373 | +Add the following line ``` “tagsReplication”: { “enabled”: true }``` when creating or updating the replication |
| 374 | +rules on the source account. |
| 375 | + |
| 376 | +Tags replication is supported on API version 2022-05-01 and above. You can add the new tagsReplication field to the replication policy. |
| 377 | + |
| 378 | +Sample: |
| 379 | + |
| 380 | +``` json |
| 381 | +{ |
| 382 | + "sourceAccount": "<source-account-name>", |
| 383 | + "destinationAccount": "<destination-account-name>", |
| 384 | + "tagsReplication": |
| 385 | + { |
| 386 | + "enabled": true |
| 387 | + }, |
| 388 | + "rules": |
| 389 | + [ |
| 390 | + { |
| 391 | + "ruleId": "<rule-id>", |
| 392 | + "sourceContainer": "<source-container-name>", |
| 393 | + "destinationContainer": "<destination-container-name>" |
| 394 | + } |
| 395 | + ] |
| 396 | +} |
| 397 | +``` |
| 398 | +--- |
| 399 | + |
322 | 400 | ## Configure replication metrics |
323 | 401 |
|
324 | 402 | ### Enable replication metrics |
|
0 commit comments