Skip to content

Commit 92ac2aa

Browse files
Merge pull request #217525 from v-amallick/main
MUA CLI updates
2 parents 210e37b + 1b69ed5 commit 92ac2aa

File tree

1 file changed

+75
-5
lines changed

1 file changed

+75
-5
lines changed

articles/backup/multi-user-authorization.md

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,20 @@ To create the Resource Guard in a tenant different from the vault tenant, follow
7575

7676
# [PowerShell](#tab/powershell)
7777

78-
Use the following command to create a resource guard:
78+
To create a resource guard, run the following cmdlet:
7979

8080
```azurepowershell-interactive
8181
New-AzDataProtectionResourceGuard -Location “Location” -Name “ResourceGuardName” -ResourceGroupName “rgName”
8282
```
8383

84+
# [CLI](#tab/cli)
85+
86+
To create a resource guard, run the following command:
87+
88+
```azurecli-interactive
89+
az dataprotection resource-guard create --location "Location" --tags key1="val1" --resource-group "RgName" --resource-guard-name "ResourceGuardName"
90+
```
91+
8492
---
8593

8694
### Select operations to protect using Resource Guard
@@ -105,7 +113,7 @@ To exempt operations, follow these steps:
105113

106114
# [PowerShell](#tab/powershell)
107115

108-
Use the following commands to update the operations. These exclude operations from protection by the resource guard.
116+
To update the operations. These exclude operations from protection by the resource guard, run the following cmdlets:
109117

110118
```azurepowershell-interactive
111119
$resourceGuard = Get-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "rgName" -Name "resGuardName"
@@ -120,6 +128,27 @@ Use the following commands to update the operations. These exclude operations fr
120128
- The second and third commands fetch the critical operations that you want to update.
121129
- The fourth command excludes some critical operations from the resource guard.
122130

131+
# [CLI](#tab/cli)
132+
133+
To update the operations that are to be excluded from being protected by the resource guard, run the following commands:
134+
135+
```azurecli-interactive
136+
az dataprotection resource-guard update --name
137+
--resource-group
138+
[--critical-operation-exclusion-list {deleteProtection, getSecurityPIN, updatePolicy, updateProtection}]
139+
[--resource-type {Microsoft.RecoveryServices/vaults}]
140+
[--tags]
141+
[--type]
142+
143+
```
144+
145+
**Example**:
146+
147+
```azurecli
148+
az dataprotection resource-guard update --resource-group "RgName" --resource-guard-name "ResourceGuardName" --resource-type "Microsoft.RecoveryServices/vaults" --critical-operation-exclusion-list deleteProtection getSecurityPIN updatePolicy
149+
```
150+
151+
123152
---
124153

125154

@@ -177,7 +206,7 @@ To enable MUA on the vaults, follow these steps.
177206

178207
# [PowerShell](#tab/powershell)
179208

180-
Use the following command to enable MUA on a Recovery Services vault:
209+
To enable MUA on a Recovery Services vault, run the following cmdlet:
181210

182211
```azurepowershell-interactive
183212
$token = (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Token
@@ -190,6 +219,27 @@ Use the following command to enable MUA on a Recovery Services vault:
190219
>[!NOTE]
191220
>The token parameter is optional and is only needed to authenticate cross tenant protected operations.
192221
222+
# [CLI](#tab/cli)
223+
224+
To enable MUA on a Recovery Services vault, run the following command:
225+
226+
```azurecli-interactive
227+
az backup vault resource-guard-mapping update --resource-guard-id
228+
[--ids]
229+
[--name]
230+
[--resource-group]
231+
[--tenant-id]
232+
233+
```
234+
235+
The tenant ID is required if the resource guard exists in a different tenant.
236+
237+
**Example**:
238+
239+
```azurecli
240+
az backup vault resource-guard-mapping update --resource-group RgName --name VaultName --resource-guard-id ResourceGuardId
241+
```
242+
193243
---
194244

195245

@@ -318,7 +368,7 @@ To disable MUA on a vault, follow these steps:
318368

319369
# [PowerShell](#tab/powershell)
320370

321-
Use the following command to disable MUA on a Recovery Services vault:
371+
To disable MUA on a Recovery Services vault, use the following cmdlet:
322372

323373
```azurepowershell-interactive
324374
$token = (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Token
@@ -331,7 +381,27 @@ Use the following command to disable MUA on a Recovery Services vault:
331381
>[!NOTE]
332382
>The token parameter is optional and is only needed to authenticate the cross tenant protected operations.
333383
334-
---
384+
# [CLI](#tab/cli)
385+
386+
To disable MUA on a Recovery Services vault, run the following command:
387+
388+
```azurecli-interactive
389+
az backup vault resource-guard-mapping delete [--ids]
390+
[--name]
391+
[--resource-group]
392+
[--tenant-id]
393+
[--yes]
394+
395+
```
396+
---
397+
398+
The tenant ID is required if the resource guard exists in a different tenant.
399+
400+
**Example**:
401+
402+
```azurecli
403+
az backup vault resource-guard-mapping delete --resource-group RgName --name VaultName
404+
```
335405

336406

337407

0 commit comments

Comments
 (0)