azure - 如何为具有 f 权限的 azure blob 存储容器创建 SAS token

标签 azure azure-blob-storage azure-cli azure-sas shared-access-signatures

These docs请参阅需要 f SAS 权限才能执行过滤操作。如何生成具有这些权限的 SAS token ?我无法从网络界面执行此操作,并且 az 工具不会将 f 视为有效的 --permissions 标志。

最后,我希望能够使用curl 的其余API 来摆弄按标签查找功能。

最佳答案

根据 Az CLI documentation , f 是有效权限:

--permissions: The permissions the SAS grants. Allowed values: (a)dd (c)reate (d)elete (e)xecute (f)ilter_by_tags (i)set_immutability_policy (l)ist (m)ove (r)ead (t)ag (w)rite (x)delete_previous_version (y)permanent_delete. Do not use if a stored access policy is referenced with --id that specifies this value. Can be combined.

您可能应该升级您的 CLI 版本(我使用的是 v2.38.0):

az upgrade

我能够使用以下命令生成 SAS:

az storage container generate-sas `
  --name "<container-name>" `
  --account-name <account-name> `
  --auth-mode login --as-user `
  --permissions f --expiry 2022-08-01

关于azure - 如何为具有 f 权限的 azure blob 存储容器创建 SAS token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73126462/

相关文章:

azure - 如何通过 CLI 列出所有 AKS 的状态(正在运行/已停止)

azure - 触发警报时不会触发操作

Azure 文件复制任务 - [错误]未将对象引用设置为对象的实例

azure - 一段时间后自动删除/过期 Azure Blob

azure - 通过Azure发布删除Azure管道blob存储的内容

azure - 使用 AZ 命令行列出 CosmosDB 实例中的数据库

angular - MSAL(Angular)弹出登录

azure - PublishCucumberReport - 找不到 cucumber 报告的输出路径

azure - 如何在Azure数据资源管理器查询中按字段排序?

Azure CLI 获取 Azure Pipeline 中的当前服务主体详细信息