You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Azure门户获取Frontdoor标准/高级版子资源的资源ID?

获取Azure Frontdoor 标准/高级版子资源ID的几种方法

方法1:使用Azure CLI命令

直接通过CLI查询对应子资源的ID,替换命令中的<>占位符为实际名称即可:

查询源组(origin groups)

az afd origin-group list --profile-name <你的配置文件名> --resource-group <资源组名> --query "[].{Name:name, ID:id}"

查询源(origins)

az afd origin list --origin-group-name <源组名> --profile-name <配置文件名> --resource-group <资源组名> --query "[].{Name:name, ID:id}"

查询终结点(endpoints)

az afd endpoint list --profile-name <配置文件名> --resource-group <资源组名> --query "[].{Name:name, ID:id}"

查询路由(routes)

az afd route list --endpoint-name <终结点名> --profile-name <配置文件名> --resource-group <资源组名> --query "[].{Name:name, ID:id}"

方法2:通过Azure门户的资源JSON视图

通过配置文件的完整JSON定义获取子资源ID:

  • 进入Frontdoor配置文件的概述页面,点击顶部的JSON视图按钮(位于“导出模板”旁)。
  • 在打开的JSON文件中,找到resources数组,里面包含该配置文件下所有子资源(源组、源、终结点、路由等)的完整信息,每个子资源的id字段即为对应的资源ID。

方法3:使用Azure Resource Graph批量查询

如果需要批量查询订阅内的Frontdoor子资源:

  • 进入Azure门户的Resource Graph Explorer。
  • 执行以下Kusto查询(可按需添加过滤条件):
resources
| where type in ("Microsoft.Cdn/profiles/originGroups", "Microsoft.Cdn/profiles/endpoints", "Microsoft.Cdn/profiles/endpoints/routes", "Microsoft.Cdn/profiles/originGroups/origins")
| where name contains "<你的配置文件名>" // 可选,过滤特定配置文件
| project name, id, type

查询结果会直接列出匹配的子资源及其ID。

内容的提问来源于stack exchange,提问作者jarodsmk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.03 00:32:36