azure - azure "scopes"的格式是什么?

标签 azure azure-cli

description az ad sp create-for-rbac 命令有一个 --scopes 参数。其定义为:

--scopes Space-separated list of scopes the service principal's role assignment applies to. Defaults to the root of the current subscription.

还给出了一个例子:

--scopes /subscriptions/{SubID}/resourceGroups/{ResourceGroup1}

但是尚不清楚范围的一般格式是什么。也就是说,级别可以是资源组之外的其他内容吗?我们可以深入了解资源组中的各个资源吗?怎么办?

如何获取此参数的正确值,以便能够将帐户访问范围限制到特定的单个资源?如何指定路径?

是否可以以某种方式列出任意范围的子项?

最佳答案

范围是您要授予访问权限的资源的 ID。它们可以在az resource list的帮助下获得。命令。例如:

az resource list --location westus

结果将包含一个 id 字段,其中包含您要查找的范围,例如:

"/subscriptions/0db1a886-c5b6-49fb-a7de-23f5cd6579d3/resourceGroups/hugo-blog/providers/microsoft.cdn/profiles/hugo-cdn"

关于azure - azure "scopes"的格式是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56388126/

相关文章:

Azure 流处理使用数组将其更新插入到 DocumentDB

json - Azure逻辑应用标准解析JSON错误

azure - Powershell循环直到输出一行

bash - 使用 .publishsettings 文件登录 Azure

azure - PowerShell 或 Azure CLI - 显示/创建已设置 PIM 的 Azure 安全组

Azure 认知搜索查询结果不是 JSON,而是用双引号括起来的 Unicode 表示法字符串

azure - 使用 Azure KeyVault,无法在 Azure Active Directory 租户中找到对象

visual-studio - 无法安装 Azure Functions 扩展

macos - Azure CLI 存储批量复制无法在 mac Seira 上运行

azure - 无需登录即可使用 Azure API(使用角色)