gpt4 book ai didi

azure - Set-AzureRmCurrentStorageAccount 抛出错误资源组未找到

转载 作者:行者123 更新时间:2023-12-03 05:57:31 26 4
gpt4 key购买 nike

创建 SAS token 是我们的目标,也是将所需存储设置为当前存储的前提条件:

运行以下命令

Set-AzureRmCurrentStorageAccount -ResourceGroupName $StorResourceGroupName -Name $StorageAccountName 

抛出错误:

Set-AzureRmCurrentStorageAccount : The Resource 'Microsoft.Storage/storageAccounts/yoursites' under resource group 'Default-Storage-EastUS' was not found. At line:1 char:1 + Set-AzureRmCurrentStorageAccount -ResourceGroupName $StorResourceGroupName -Name ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Set-AzureRmCurrentStorageAccount], CloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Management.Storage.SetAzureRmCurrentStorageAccount

这引发了错误New-AzureStorageBlobSASToken -Container $StorageContainer -Blob $blobname -Permission r -ExpiryTime (Get-Date).AddHours(2.0) -FullUri

如何绕过这个问题?

最佳答案

我可以想到您可能会收到此错误的两个原因:

  1. 存储帐户不属于此资源组(如错误所示)。
  2. 存储帐户是一个经典存储帐户(我是根据资源组的名称猜测的)。

请看看其中之一是否确实如此。

关于azure - Set-AzureRmCurrentStorageAccount 抛出错误资源组未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38626758/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com