Using this command:
az staticwebapp functions link --function-resource-id "/subscriptions/[sub-id]/resourceGroups/[resource-group-name]/providers/Microsoft.Web/sites/[func-name]/slots/[slot-name]" -n [swa-name] -g [swa-rg-name] --environment-name "[env-name]" --force
I get error:
ERROR: --function-resource-id must specify a function resource ID. To get resource ID, use the following commmand, inserting the function group/name as needed:
az functionapp show --resource-group "[FUNCTION_RESOURCE_GROUP]" --name "[FUNCTION_NAME]" --query id
How do I specify the Azure Function deployment slot?
2
Answers
You should be able to use the generic
az staticwebapp backends link
command. It should accept any valid resourceIdIn the resource id place you have to keep resource id of function app as below:
Then you can use below commad:
You can also use backend command as @Thomas mentioned :