You have an Azure subscription named Subscription1.
In Subscription1, you create an Azure file share named MyFileShare.
You create a shared access signature (SAS) named SAS1 as shown in the following exhibit.
Write a AZ CLI Code and print the SAS1 value
Scripts
========
$MyResourceGroup="RG102"
$location="North Europe"
$storageaccountname= "storage16854"
#A virtual network named Paris-VNet that will contain two sub#nets named Subnet1 and Subnet2
# Create a resource group.
az group create --location $location --name $myResourceGroup
az storage account create -n $storageaccountname -g $MyResourceGroup --kind StorageV2 --https-only --access-tier Hot --sku Standard_LRS
az storage share create --account-name $storageaccountname --name myfileshare02
$pkey = az storage account keys list -g $myResourceGroup -n $storageaccountname --query [0].value -o tsv
$sastoken = az storage account generate-sas --start '2018-09-01' --expiry '2018-09-14' --permissions rwl --resource-types sco --services f --https-only --account-name storage16852 --account-key $pkey --ip 193.77.134.10-193.77.134.50
$sastoken
No comments:
Post a Comment