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

如何查找特定区域下ARM模板部署PostgreSQL灵活服务器的可用API版本

解决Azure PostgreSQL Flexible Server部署前查询区域支持的API版本问题

方法1:使用Azure CLI查询

直接通过命令行查询目标区域、目标资源类型支持的API版本:

  1. 查询flexibleServers支持的所有API版本:
az provider show --namespace Microsoft.DBforPostgreSQL --query "resourceTypes[?name=='flexibleServers'].apiVersions | [0]"
  1. 筛选指定区域(如eastus)的可用版本:
az provider show --namespace Microsoft.DBforPostgreSQL --query "resourceTypes[?name=='flexibleServers'].locations[?name=='eastus'] | [0].apiVersions"

方法2:使用PowerShell查询

通过Azure PowerShell模块获取资源支持信息:

  1. 查看flexibleServers所有区域及对应API版本:
Get-AzResourceProvider -ProviderNamespace Microsoft.DBforPostgreSQL | 
  Select-Object -ExpandProperty ResourceTypes | 
  Where-Object ResourceTypeName -eq 'flexibleServers' | 
  Select-Object Locations, ApiVersions
  1. 筛选指定区域(如eastus)的可用版本:
$resourceType = (Get-AzResourceProvider -ProviderNamespace Microsoft.DBforPostgreSQL).ResourceTypes | 
  Where-Object ResourceTypeName -eq 'flexibleServers'
$resourceType.ApiVersions | Where-Object { $_ -in $resourceType.Locations.Where({$_ -eq 'eastus'}, 'First').ApiVersions }

方法3:Azure门户查询(需订阅有权限访问目标区域)

  1. 登录Azure门户,搜索并进入资源提供者页面
  2. 在列表中找到Microsoft.DBforPostgreSQL并点击进入
  3. 展开flexibleServers资源类型,即可查看该资源支持的所有区域及对应API版本

针对你更新的订阅无法在EastUS部署的问题,更换区域后,使用上述方法针对新区域查询API版本,确保Bicep/ARM模板中使用的版本为该区域支持的有效版本即可。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.17 14:47:10