对象缺少必需的属性:qnaRuntimeEndpoint

时间:2019-05-07 05:32:17

标签: azure arm-template qnamaker

我无法通过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

1 个答案:

答案 0 :(得分:2)

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

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

enter image description here

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

enter image description here