1
votes

I am developing an ARM template for an API Management resource.

Some of the api operations return a payload that is defined as a schema (i.e. "type":"Microsoft.ApiManagement/service/apis/schemas") in the ARM template.

I used the Extract Template function from the Azure portal to create the initial template. For the operations that reference the schema, it failed to include a dependsOn for the schema resource and I can't figure out exactly what the correct parameters need to be provided in the [resourceId()] function.

What happens is that the arm template fails on first execution (schema is not available for the operations that depend on it), but works the second time (because the scheme got created in the previous execution).

So, any pointers to the correct parameters would be greatly appreciated.

1

1 Answers

1
votes

OK, that didn't take long !

The correct syntax is:

[resourceId('Microsoft.ApiManagement/service/apis/schemas', 'Api Management Resource Name', 'Api Name', 'Schema Name')]