gpt4 book ai didi

azure - 我们可以在 ARM createUIdefinition.json 中限制部署的 Azure 区域/位置吗?

转载 作者:行者123 更新时间:2023-12-05 08:07:50 28 4
gpt4 key购买 nike

是否可以仅允许在 Azure 的选定区域/位置部署 ARM 模板。如果是这样,我们如何在 createUIdefinition.json ARM 模板中实现它?

最佳答案

我从以下位置找到了答案:https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-resource-manager/managed-applications/create-uidefinition-overview.md

For location, specify the properties for the location control you wishto override. Any properties not overridden are set to their defaultvalues. resourceTypes accepts an array of strings containing fullyqualified resource type names. The location options are restricted toonly regions that support the resource types. allowedValues accepts anarray of region strings. Only those regions appear in thedropdown. You can set both allowedValues and resourceTypes. The resultis the intersection of both lists. Lastly, the visible property can beused to conditionally or completely disable the location dropdown.

我测试了这个并且它有效:

 "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"config": {
"isWizard": true,
"basics": {
"location": {
"resourceTypes": [
"microsoft.insights/components",
"microsoft.insights/components/CurrentBillingFeatures",
"Microsoft.Sql/servers",
"Microsoft.Web/sites",
"Microsoft.Web/serverfarms"
]
}
}
},

“microsoft.insights/components”目前在美国中西部不可用,已从位置选项中删除。

关于azure - 我们可以在 ARM createUIdefinition.json 中限制部署的 Azure 区域/位置吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53011783/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com