首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用ARM模板创建Azure函数键失败

使用ARM模板创建Azure函数键失败
EN

Stack Overflow用户
提问于 2022-04-24 06:02:57
回答 1查看 176关注 0票数 0

我想不出如何使用ARM为我的函数创建天蓝色函数键。

我在函数本身内创建一个子资源,因此这个资源块位于函数的主资源块中。

代码语言:javascript
复制
 "resources": [
        {
          "type": "Microsoft.Web/sites/functions/keys",
          "apiVersion": "2021-03-01",
          "name": "slapifd-dev",
          "properties": {
            "value": "xxxxxxx"
          }
        }
      ]

但是我得到了这个错误信息

代码语言:javascript
复制
##[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.'.

我在这里错过了什么?

EN

回答 1

Stack Overflow用户

发布于 2022-04-24 07:01:56

根据资源类型层次结构,也应该使用嵌套的资源名称来设置“name”属性。在您的方案中,“name”属性应该是{site name}/{function name}/{key name}。例如:slapifd/MyFunction/MyKey

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71985913

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档