英文:
bicep/arm template how to get display name of location
问题
在 Bicep 或 ARM 模板中,如何获取显示位置名称?
例如,我有输入位置名称 'westus',我想获取其显示名称,如 'West US',因为我需要将位置名称放在警报条件中,如下所示:
{
field: 'properties.impactedServices[*].ImpactedRegions[*].RegionName',
containsAny: [
'west us'
]
}
顺便说一下,listLocations('/subscriptions/${subscriptionId}/providers/Microsoft.Web/locations/${toLower(location)}', '2016-06-01').displayName
似乎不起作用。
英文:
In bicep or arm template, how to get display location name?
Eg, I have input location name 'westus', I want to get its displayName like 'West US' since I have to put location name in an alert condition like:
{
field: 'properties.impactedServices[*].ImpactedRegions[*].RegionName'
containsAny: [
'west us'
]
}
By the way, ``listLocations('/subscriptions/${subscriptionId}/providers/Microsoft.Web/locations/${toLower(location)}', '2016-06-01').displayName
which seems not work.
答案1
得分: 0
我认为那是不可能的。即 此列表 不显示支持该功能,而 list*
操作实际上是 HTTP PUT
请求,而不是 HTTP GET
。
所以我预计您需要将这些数据添加到模板中。
英文:
I dont think thats possible. ie this list doesnt show that is supported. and list*
operations are actually HTTP PUT
requests, not HTTP GET
.
So I'd expect you'd need to add that data to the template
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论