Azure 逻辑应用创建 Redis 缓存需要 x-ms-api-version

标签 azure azure-resource-manager azure-logic-apps azure-redis-cache

我正在构建一个 Azure 逻辑应用程序,并尝试自动创建 Azure Redis 缓存。我可以提出一个具体的操作(创建或更新资源):

Defintion in Logic App

如您所见,我输入了 2016-02-01 作为 api 版本。我在这里尝试了不同的值,只是根据我从 Microsoft 了解到的其他 api 版本进行猜测。我在互联网上找不到任何这方面的资源。此步骤的结果将是:

{
    "error": 
    {
        "code": "InvalidResourceType",
        "message": "The resource type could not be found in the namespace 'Microsoft.Cache' for api version '2016-02-01'."
    }
}

x-ms-api-version 的正确值是什么?在哪里可以找到基于资源提供程序的该值的历史记录?

最佳答案

尝试

Resource Provider: Microsoft.Cache
Name: Redis/<yourrediscachename>
x-ms-api-version: 2017-02-01

了解每种资源类型支持的版本的一种简单方法是在 Azure 门户上使用 CLI,例如

az provider show --namespace Microsoft.Cache --query "resourceTypes[?resourceType=='Redis'].apiVersions | [0]"

将返回:

[
  "2017-02-01",
  "2016-04-01",
  "2015-08-01",
  "2015-03-01",
  "2014-04-01-preview",
  "2014-04-01"
]

我让它工作:

enter image description here

HTH

关于Azure 逻辑应用创建 Redis 缓存需要 x-ms-api-version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46035986/

相关文章:

azure - 使用 ARM 模板部署多个资源

连接到逻辑应用 Webhook 的 Azure 警报操作每次触发警报时都会触发两次

azure - 如何限制应用程序端点在浏览器中加载?

c# - 事件处理器主机未接收消息

video - Azure 媒体服务 - 如何获取视频分辨率?

azure - VSTS 部署失败,错误为 "Authorization failed for ... of type ' Microsoft.Storage/storageAccounts/providers/locks'"

azure - 是否可以通过 ARM 模板将 API 导入 Azure API 管理?

azure - 发现 Azure RM API 属性

azure - 逻辑应用程序 - 使用函数/表达式获取 Azure 租户、客户端 ID、 secret ?