Skip to content

Commit 7bd8269

Browse files
committed
Fixing a validation issue
1 parent 13e9203 commit 7bd8269

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

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

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ az storage account or-policy show \
215215
--policy "@-"
216216
```
217217

218+
### [REST API](#tab/rest-api)
219+
220+
N/A
221+
218222
---
219223

220224
## Configure object replication using a JSON file
@@ -228,7 +232,7 @@ For information about how to author a JSON file that contains the policy definit
228232
229233
The examples in this section show how to configure the object replication policy on the destination account, and then get the JSON file for that policy that another user can use to configure the policy on the source account.
230234

231-
# [Azure portal](#tab/portal)
235+
### [Azure portal](#tab/portal)
232236

233237
To configure object replication on the destination account with a JSON file in the Azure portal, follow these steps:
234238

@@ -257,7 +261,7 @@ The downloaded JSON file includes the policy ID that Azure Storage created for t
257261

258262
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.
259263

260-
# [PowerShell](#tab/powershell)
264+
### [PowerShell](#tab/powershell)
261265

262266
To download a JSON file that contains the replication policy definition for the destination account from PowerShell, call the [Get-AzStorageObjectReplicationPolicy](/powershell/module/az.storage/get-azstorageobjectreplicationpolicy) command to return the policy. Then convert the policy to JSON and save it as a local file, as shown in the following example. Remember to replace values in angle brackets and the file path with your own values:
263267

@@ -284,7 +288,7 @@ Set-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
284288
-Rule $object.Rules
285289
```
286290

287-
# [Azure CLI](#tab/azure-cli)
291+
### [Azure CLI](#tab/azure-cli)
288292

289293
To write the replication policy definition for the destination account to a JSON file from Azure CLI, call the [az storage account or-policy show](/cli/azure/storage/account/or-policy#az-storage-account-or-policy-show) command and output to a file.
290294

@@ -305,23 +309,27 @@ az storage account or-policy create \
305309
--policy @policy.json
306310
```
307311

312+
### [REST API](#tab/rest-api)
313+
314+
N/A
315+
308316
---
309317

310318
## Configure replication metrics
311319

312320
### Enable replication metrics
313321
You can enable replication metrics on both new and existing object replication policies. It might take a few minutes to start observing the metrics.
314322

315-
# [Azure Portal](#tab/azure-portal)
323+
#### [Azure Portal](#tab/azure-portal)
316324
You can enable metrics using **Object Replication** blade from the new _Metrics_ column or by editing the _Edit Rules_ section of a policy from "…" on the OR policy row.
317325

318-
# [PowerShell](#tab/powershell)
326+
#### [PowerShell](#tab/powershell)
319327
Not yet supported.
320328

321-
# [Azure CLI](#tab/azure-cli)
329+
#### [Azure CLI](#tab/azure-cli)
322330
Not yet supported.
323331

324-
# [REST API](#tab/rest-api)
332+
#### [REST API](#tab/rest-api)
325333
Enabling metrics is supported on API version 2021-08-01 and above. You can add the new metrics field to the replication policy. Sample:
326334
``` json
327335
{
@@ -341,8 +349,11 @@ Enabling metrics is supported on API version 2021-08-01 and above. You can add t
341349
]
342350
}
343351
```
352+
344353
---
354+
345355
If you enable metrics on a policy that is configured to copy over existing data, you might observe an increasing amount at the beginning while the policy works on initial phase of listing. Once this is completed, the replication will start.
356+
346357
### View replication metrics
347358

348359
You can click the **View** link from Metrics column to view monitoring metrics
@@ -353,7 +364,7 @@ To further view metrics in Azure Monitor, click on chart of a metric. This will
353364

354365
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.
355366

356-
# [Azure portal](#tab/portal)
367+
### [Azure portal](#tab/portal)
357368

358369
To check the replication status for a blob in the source account in the Azure portal, follow these steps:
359370

@@ -363,7 +374,7 @@ To check the replication status for a blob in the source account in the Azure po
363374

364375
:::image type="content" source="media/object-replication-configure/check-replication-status-source.png" alt-text="Screenshot showing replication status for a blob in the source account":::
365376

366-
# [PowerShell](#tab/powershell)
377+
### [PowerShell](#tab/powershell)
367378

368379
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:
369380

@@ -376,7 +387,7 @@ $blobSrc = Get-AzStorageBlob -Container $srcContainerName1 `
376387
$blobSrc.BlobProperties.ObjectReplicationSourceProperties[0].Rules[0].ReplicationStatus
377388
```
378389

379-
# [Azure CLI](#tab/azure-cli)
390+
### [Azure CLI](#tab/azure-cli)
380391

381392
To check the replication status for a blob in the source account with Azure CLI, get the value of the object replication **status** property, as shown in the following example:
382393

@@ -398,11 +409,15 @@ If the replication status for a blob in the source account indicates failure, th
398409
- Verify that the destination container still exists.
399410
- If the source blob has been encrypted with a customer-provided key as part of a write operation, then object replication will fail. For more information about customer-provided keys, see [Provide an encryption key on a request to Blob storage](encryption-customer-provided-keys.md).
400411

412+
### [REST API](#tab/rest-api)
413+
414+
N/A
415+
401416
## Remove a replication policy
402417

403418
To remove a replication policy and its associated rules, use Azure portal, PowerShell, or CLI.
404419

405-
# [Azure portal](#tab/portal)
420+
### [Azure portal](#tab/portal)
406421

407422
To remove a replication policy in the Azure portal, follow these steps:
408423

@@ -411,7 +426,7 @@ To remove a replication policy in the Azure portal, follow these steps:
411426
1. Select the **More** button next to the policy name.
412427
1. Select **Delete Rules**.
413428

414-
# [PowerShell](#tab/powershell)
429+
### [PowerShell](#tab/powershell)
415430

416431
To remove a replication policy, delete the policy from both the source account and the destination account. Deleting the policy also deletes any rules associated with it.
417432

@@ -427,7 +442,7 @@ Remove-AzStorageObjectReplicationPolicy -ResourceGroupName $rgName `
427442
-PolicyId $destPolicy.PolicyId
428443
```
429444

430-
# [Azure CLI](#tab/azure-cli)
445+
### [Azure CLI](#tab/azure-cli)
431446

432447
To remove a replication policy, delete the policy from both the source account and the destination account. Deleting the policy also deletes any rules associated with it.
433448

@@ -443,6 +458,10 @@ az storage account or-policy delete \
443458
--resource-group <resource-group>
444459
```
445460

461+
### [REST API](#tab/rest-api)
462+
463+
N/A
464+
446465
---
447466

448467
## Next steps

0 commit comments

Comments
 (0)