Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure资源管理器(ARM)模板参数未定义_Azure_Azure Resource Manager_Arm Template - Fatal编程技术网

Azure资源管理器(ARM)模板参数未定义

Azure资源管理器(ARM)模板参数未定义,azure,azure-resource-manager,arm-template,Azure,Azure Resource Manager,Arm Template,我创建了一个带有参数的ARM模板用户定义函数。但是它得到了一个错误“参数'testParam'未定义”。这是我的用户定义函数内容 "functions": [ { "namespace": "testns", "members": { "keyVaultAccessPolicyFunc": { "parameters": [ { "name": "testParam", "type": "string"

我创建了一个带有参数的ARM模板用户定义函数。但是它得到了一个错误“参数'testParam'未定义”。这是我的用户定义函数内容

"functions": [
{
  "namespace": "testns",
  "members": {
    "keyVaultAccessPolicyFunc": {
      "parameters": [
        {
          "name": "testParam",
          "type": "string"
        }
      ],
      "output": {
        "type": "array",
        "value": [
          {
            "objectId": "[reference(concat('Microsoft.Web/Sites',parameters('testParam'))).identity.principalId]",
            "permissions": {
              "keys": [
                "all"
              ],
              "secrets": [
                "all"
              ]
            },
            "tenantId": "[reference(concat('Microsoft.Web/Sites',parameters('testParam'))).identity.tenantId]"
          }
        ]
      }
    }
  }
}
]

我引用此文档是为了在ARM模板中创建此用户定义函数。

您不能在UDF中使用reference()函数(或任何运行时函数)。

您不能在UDF中使用reference()函数(或任何运行时函数)。

您如何调用它?您如何调用它?