[英]Creating Azure Function Key using ARM template fails
I cannot figure out how to create azure function key for my function using ARM我不知道如何使用 ARM 为我的 function 创建 azure function 密钥
I am creating a child resource inside the function itself, so this resource block lives within the main resource block of the function.我在 function 本身内部创建了一个子资源,所以这个资源块位于 function 的主资源块中。
"resources": [
{
"type": "Microsoft.Web/sites/functions/keys",
"apiVersion": "2021-03-01",
"name": "slapifd-dev",
"properties": {
"value": "xxxxxxx"
}
}
]
but I get this error message但我收到此错误消息
##[error]Deployment template validation failed: 'The template resource 'slapifd-dev' for type 'Microsoft.Web/sites/functions/keys' at line '1' and column '1633' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-template/#resources for usage details.'.
What am I missing here?我在这里错过了什么?
The 'name' property should be set with the nested resource names too, according to the resource type hierarchy.根据资源类型层次结构,“名称”属性也应设置为嵌套的资源名称。 In your scenario, the 'name' property should be {site name}/{function name}/{key name}.
在您的场景中,“名称”属性应为{站点名称}/{函数名称}/{键名}。 For example: slapifd-dev/MyFunction/MyKey
例如:slapifd-dev/MyFunction/MyKey
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.