首页 > 解决方案 > 对象中缺少必需的属性:qnaRuntimeEndpoint

问题描述

我无法通过 ARM 模板部署 QnA 制造商

按照我的模板

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "accounts_MyBot_QnAMaker_name": {
            "defaultValue": "MyBot-QnAMaker",
            "type": "String"
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.CognitiveServices/accounts",
            "apiVersion": "2016-02-01-preview",
            "name": "[parameters('accounts_MyBot_QnAMaker_name')]",
            "location": "westus",
            "sku": {
                "name": "S0"
            },
            "kind": "QnAMaker",
            "properties": {}
        }
    ]
}

这是我收到的状态错误消息

"statusMessage": {
            "error": {
                "code": "ApiPropertiesInvalid",
                "message": "The given 'apiProperties' '{}' is invalid. Validation errors: Required properties are missing from object: qnaRuntimeEndpoint. Path ''."
            }
        },

https://github.com/Azure/azure-cli/issues/6888#issuecomment-417817480

标签: azurearm-templateqnamaker

解决方案


您应该以这种方式获取模板。

创建新 QnA Maker 时填写 Azure 门户上的表单(不要单击创建按钮),然后单击自动化选项。

在此处输入图像描述

然后您将获得模板和参数。我以这种方式创建了一个新的。

在此处输入图像描述


推荐阅读