为什么 Get-AzStorageAccount cmdlet 的 AllowBlobPublicAccess return NULL 明明已启用 public 访问权限?
Why does AllowBlobPublicAccess of Get-AzStorageAccount cmdlet return NULL when it is clear that public access is enabled?
我在存储帐户上使用 运行 cmdlet Get-AzStorageAccount
来测试是否启用了 public 访问。
Azure 门户
Azure PowerShell
通过 CLI 得到类似的结果
az storage account show -g MyResourceGroup -n MyStorageAccount
问题
有一段时间我认为该 cmdlet 仅适用于 StorageV2
帐户。但是,我可以确认情况并非如此。该 cmdlet 与 StorageV2
和 General purpose V1
帐户不一致。
我无法理解 cmdlet 行为不一致的原因 Get-AzStorageAccount
w.r.t 属性 AllowPublicBlobAccess
?
谢谢,
秀
如 document 在 Note
中所示:
The AllowBlobPublicAccess property is not set by default and does not
return a value until you explicitly set it. The storage account
permits public access when the property value is null or when it is
true.
您需要禁用它并保存,然后再启用它。 属性 将是您想要的 true
。
我在存储帐户上使用 运行 cmdlet Get-AzStorageAccount
来测试是否启用了 public 访问。
Azure 门户
Azure PowerShell
通过 CLI 得到类似的结果
az storage account show -g MyResourceGroup -n MyStorageAccount
问题
有一段时间我认为该 cmdlet 仅适用于 StorageV2
帐户。但是,我可以确认情况并非如此。该 cmdlet 与 StorageV2
和 General purpose V1
帐户不一致。
我无法理解 cmdlet 行为不一致的原因 Get-AzStorageAccount
w.r.t 属性 AllowPublicBlobAccess
?
谢谢,
秀
如 document 在 Note
中所示:
The AllowBlobPublicAccess property is not set by default and does not return a value until you explicitly set it. The storage account permits public access when the property value is null or when it is true.
您需要禁用它并保存,然后再启用它。 属性 将是您想要的 true
。