如何按租户查询所有密钥保管库(在 Azure 中)?
How to query all key vaults by tenant (in Azure)?
为了避免 Azure 中各种资源(如密钥保管库)的名称重复,我希望能够查询我们租户中的所有订阅以查看已“使用”的名称。例如,我们的订阅中是否已经有一个名为 usw2-mkt-kv-001
的密钥保管库?
This article 展示了如何按订阅查询所有密钥保管库,但跨所有订阅又如何呢?或者我们租户中所有订阅的所有服务(包括 RG、存储帐户、密钥保管库、vms 等)——有没有办法查询?
谢谢
没有直接的方法,这些资源相关的REST API都是基于订阅的,也就是说你应该指定一个订阅id。
您的选择是在订阅中使用 Subscriptions - List
to list the subscriptions and loop specific REST APIs to query the keyvaults/other resources, make sure the user/service principal you used to get the token has an RBAC role。
为了避免 Azure 中各种资源(如密钥保管库)的名称重复,我希望能够查询我们租户中的所有订阅以查看已“使用”的名称。例如,我们的订阅中是否已经有一个名为 usw2-mkt-kv-001
的密钥保管库?
This article 展示了如何按订阅查询所有密钥保管库,但跨所有订阅又如何呢?或者我们租户中所有订阅的所有服务(包括 RG、存储帐户、密钥保管库、vms 等)——有没有办法查询?
谢谢
没有直接的方法,这些资源相关的REST API都是基于订阅的,也就是说你应该指定一个订阅id。
您的选择是在订阅中使用 Subscriptions - List
to list the subscriptions and loop specific REST APIs to query the keyvaults/other resources, make sure the user/service principal you used to get the token has an RBAC role。