Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何通过 ARM 模板中的资源显示名称获取名称/资源标识符?
我在资源类型“Microsoft.ApiManagement/service/groups”下有名为“开发人员”的用户组和唯一标识符“xxxxxxxxxxx”
通过资源显示名称“开发人员”,我如何获取标识符(xxxxxxxxxxx)?
您可以resourceId()为此使用功能:
resourceId()
resourceId('Microsoft.ApiManagement/service/groups', 'ApiManagementName', 'Developer')
阅读:https ://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#resourceid