0
votes

I'm looking at the following documentation which Azure has provided for creating an API Management user and "subscription key":https://docs.microsoft.com/en-us/azure/api-management/scripts/powershell-add-user-and-get-subscription-key?toc=/powershell/module/toc.json

so it would seem that there would be some way of triggering user creation via http request or something like that. Like you know how Google Cloud Functions lets you trigger a python script whenever it gets a pub/sub message? I need that except for this API Management Azure shell script, and I also need the output subscription key to be returned somehow.

Is there support in Azure for shell script batch jobs that can access Azure CLI and also return the generated subscription key?

1

1 Answers

1
votes

I think you are looking for PowerShell Azure Functions.

Using Azure CLI in Azure Functions (if this is what you really need) requires some additional work, but Azure PS modules are immediately available and in most cases sufficient. The script you are referring to uses Azure PS, not Azure CLI. Running it in Azure Functions should be easy.