File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change 2
2
title : Tutorial - Restore a VM with Azure CLI
3
3
description : Learn how to restore a disk and create a recover a VM in Azure with Backup and Recovery Services.
4
4
ms.topic : tutorial
5
- ms.date : 11/22/2024
5
+ ms.date : 01/20/2025
6
6
ms.custom : mvc, devx-track-azurecli
7
7
ms.service : azure-backup
8
8
author : AbhishekMallick-MS
@@ -278,22 +278,8 @@ Now get the SAS token for this container and template as detailed [here](../azur
278
278
279
279
``` azurecli-interactive
280
280
expiretime=$(date -u -d '30 minutes' +%Y-%m-%dT%H:%MZ)
281
- connection=$(az storage account show-connection-string \
282
- --resource-group mystorageaccountRG \
283
- --name mystorageaccount \
284
- --query connectionString)
285
- token=$(az storage blob generate-sas \
286
- --container-name myVM-daa1931199fd4a22ae601f46d8812276 \
287
- --name azuredeploy1fc2d55d-f0dc-4ca6-ad48-aca0519c0232.json \
288
- --expiry $expiretime \
289
- --permissions r \
290
- --output tsv \
291
- --connection-string $connection)
292
- url=$(az storage blob url \
293
- --container-name myVM-daa1931199fd4a22ae601f46d8812276 \
294
- --name azuredeploy1fc2d55d-f0dc-4ca6-ad48-aca0519c0232.json \
295
- --output tsv \
296
- --connection-string $connection)
281
+ token=$(az storage blob generate-sas --account-name $storageAccountName --container-name $containerName --name $templateName --permissions r --expiry $expiretime --auth-mode login --as-user --https-only --output tsv)
282
+ url=$(az storage blob url --account-name $storageAccountName --container-name $containerName --name $templateName --output tsv --auth-mode login)
297
283
```
298
284
299
285
### Deploy the template to create the VM
You can’t perform that action at this time.
0 commit comments