Is there a python function to retrieve a blob storage account connection string?
- If so, how is this accomplished?
- If not, is there a way to retrieve a SAS token using
az cliorpython?
Thank you
Is there a python function to retrieve a blob storage account connection string?
az cli or python?Thank you
If using CLI is an option, you can get connection string for a storage account by using az storage account show-connection-string command.
az storage account show-connection-string --name MyStorageAccount --resource-group MyResourceGroup --subscription MySubscription
To get Shared Access Signature for a blob, you can use az storage blob generate-sas command.
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
az storage blob generate-sas -c myycontainer -n MyBlob --permissions r --expiry $end --https-only