按照创建blob的Azure CLI“快速启动”的说明执行。
看起来,默认存储帐户中的某些内容阻碍了创建新容器的能力;然而,"defaultAction"
是Allow
。
以下Azure CLI:
az storage container create --account-name meaningfulname --name nancy --auth-mode login
..。结果,解释存储帐户的网络规则可能是造成以下问题的原因:
The request may be blocked by network rules of storage account. Please check network rule set using 'az storage account show -n accountname --query networkRuleSet'.
If you want to change the default action to apply when no rule matches, please use 'az storage account update'.
使用上述消息中的建议,帐户名称上的“显示”命令提供:
> az storage account show -n meaningfulname --query networkRuleSet
{
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": []
}
我认为Azure CLI将是可以绕过并执行操作的“服务”之一。而且,在我看来,默认的行为似乎是相当宽容的。
我已经通过错误消息和命令(和变体)进行了搜索。我不知道Azure CLI的奇怪之处,所以这可能是很明显的,人们没有写任何东西。我不认为我在重复
发布于 2021-01-19 00:18:43
从命令中删除--auth-mode login
。像这样使用它:
az storage container create \
--account-name helloworld12345 \
--name images \
--public-access container
如果我们不设置--auth-mode
,它将使用默认的auth模式key
。,它将查询存储帐户中的帐户密钥。
https://learn.microsoft.com/en-us/azure/storage/blobs/authorize-data-operations-cli
如果命令中需要RBAC角色,则使用--auth-mode login
。有关存储中RBAC角色的更多信息,请访问https://learn.microsoft.com/en-us/azure/storage/common/storage-auth-aad-rbac-cli。
https://stackoverflow.com/questions/61397786
复制相似问题