azure - 如何解决 ARM 模板中的“无法加载架构”错误?
问题描述
我正在尝试使用以下 ARM 模板创建资源组。
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.1",
"parameters": {
"rgName": {
"type": "string"
},
"rgLocation": {
"type": "string"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2018-05-01",
"location": "[parameters('rgLocation')]",
"name": "[parameters('rgName')]",
"properties": {}
}
],
"outputs": {}
}
参数文件是
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"rgName": {
"value": "sriram"
},
"rgLocation": {
"value": "southcentralus"
}
}
}
上面的json文件有没有错误。因为我收到以下错误。
Unable to load schema from 'https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json'. No schema request service available(768)
我忽略了这个错误并尝试在 Azure 管道中运行这些模板并收到以下错误。
"No HTTP resource was found that matches the request URI 'https://management.azure.com/subscriptions/****-****-*****-****/resourcegroups/<Rsource Group Name>/providers/Microsoft.Resources/resourceGroups/<new RG name>?api-version=2018-05-01'
谁能帮我吗?谢谢你。
解决方案
您的参数文件应将其https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentParameters.json#
用作架构参考。
推荐阅读
- flutter - 可滑动的小部件需要太大的尺寸颤动
- python - 字典 = dict( 1="Some_value") 不起作用。但是 dictionary = { 1 : "Some_Value" } 确实有效
- python - 尝试遍历多个文件对每个文件执行命令并将输出连接到相同的 str 变量
- python - 如何结合 str 和 int 返回月末的日期?
- mysql - 在 STR_TO_DATE 中运行 MySQL REGEXP_SUBSTR 以从文本中提取日期时遇到问题
- python - 在 Python 中按顺序执行多个 if 语句?
- sql - (SQL 初学者问题)帮助理解 HAVING 和 GROUP BY 是如何应用的
- django - Make it so url can only be accessed through redirect
- javascript - 将表情符号添加到输入
- vue.js - Vue日期选择日期时间不适用于模态