Skip to content

Commit cbad67e

Browse files
Merge pull request #293254 from AbhishekMallick01/Jan-20-2025-SFIROPC
SFI ROPC - Addressed ConnectionString flagged
2 parents 3b9a186 + 8d4e9da commit cbad67e

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

articles/backup/tutorial-restore-disk.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Tutorial - Restore a VM with Azure CLI
33
description: Learn how to restore a disk and create a recover a VM in Azure with Backup and Recovery Services.
44
ms.topic: tutorial
5-
ms.date: 11/22/2024
5+
ms.date: 01/20/2025
66
ms.custom: mvc, devx-track-azurecli
77
ms.service: azure-backup
88
author: AbhishekMallick-MS
@@ -278,22 +278,8 @@ Now get the SAS token for this container and template as detailed [here](../azur
278278

279279
```azurecli-interactive
280280
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)
297283
```
298284

299285
### Deploy the template to create the VM

0 commit comments

Comments
 (0)