@@ -75,12 +75,20 @@ To create the Resource Guard in a tenant different from the vault tenant, follow
75
75
76
76
# [ PowerShell] ( #tab/powershell )
77
77
78
- Use the following command to create a resource guard:
78
+ To create a resource guard, run the following cmdlet :
79
79
80
80
``` azurepowershell-interactive
81
81
New-AzDataProtectionResourceGuard -Location “Location” -Name “ResourceGuardName” -ResourceGroupName “rgName”
82
82
```
83
83
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
+
84
92
---
85
93
86
94
### Select operations to protect using Resource Guard
@@ -105,7 +113,7 @@ To exempt operations, follow these steps:
105
113
106
114
# [ PowerShell] ( #tab/powershell )
107
115
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:
109
117
110
118
``` azurepowershell-interactive
111
119
$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
120
128
- The second and third commands fetch the critical operations that you want to update.
121
129
- The fourth command excludes some critical operations from the resource guard.
122
130
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
+
123
152
---
124
153
125
154
@@ -177,7 +206,7 @@ To enable MUA on the vaults, follow these steps.
177
206
178
207
# [ PowerShell] ( #tab/powershell )
179
208
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 :
181
210
182
211
``` azurepowershell-interactive
183
212
$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:
190
219
> [ !NOTE]
191
220
> The token parameter is optional and is only needed to authenticate cross tenant protected operations.
192
221
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
+
193
243
---
194
244
195
245
@@ -318,7 +368,7 @@ To disable MUA on a vault, follow these steps:
318
368
319
369
# [ PowerShell] ( #tab/powershell )
320
370
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 :
322
372
323
373
``` azurepowershell-interactive
324
374
$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:
331
381
> [ !NOTE]
332
382
> The token parameter is optional and is only needed to authenticate the cross tenant protected operations.
333
383
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
+ ```
335
405
336
406
337
407
0 commit comments