Azure Logic App creation of Redis Cache requires x-ms-api-version

639 views Asked by At

I'm building an Azure Logic App and try to automate the creation of an Azure Redis Cache. There is a specific action for this (Create or update resource) which I was able to bring up:

Defintion in Logic App

As you can see I entered 2016-02-01 as the api version. I was trying different values here just guessing from other api versions I know from Microsoft. I can't find any resource on this on the internet. The result of this step will be:

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

What is the correct value for x-ms-api-version and where can I find the history for this value based on the resource provider?

1

There are 1 answers

2
Paco de la Cruz On BEST ANSWER

Try

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

One easy way to know the supported versions for each resource type is using CLI on your Azure Portal, e.g.

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

would return:

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

I made it work with:

enter image description here

HTH