Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List existing SASTokens on a container using Azure powershell

When creating a SASToken via powershell it retunrs the created SAS token url from New-AzureStorageContainerSASToken comdlet.

$Context = New-AzureStorageContext -StorageAccountName $StorageAccount -StorageAccountKey $StorageAccountKey                                                        
$now = Get-Date

$sasUrl = New-AzureStorageContainerSASToken -Name mycontainer -Permission rwdl -StartTime $now.AddHours(-1) -ExpiryTime $now.AddMonths(1) -Context $context -FullUri  
echo $sasUrl 

But now in case I lost it, how can I list the exiting SASTokens? You may have few on the same container.

Tried Get-AzureStorageContainer but this information is unavailable.
Played with other Get-AzureStorage* and failed to find it.
Is this operation supported via powershell?

like image 1000
Haim Raman Avatar asked Dec 22 '15 08:12

Haim Raman


1 Answers

It is not possible to get the list of SAS URLs because they are not stored anywhere in Azure Storage.

like image 164
Gaurav Mantri Avatar answered Jan 26 '23 05:01

Gaurav Mantri