Retrieve the host keys from an azure function app

后端 未结 6 1722
梦如初夏
梦如初夏 2020-12-01 19:03

I am trying to script an environment using the Azure cli. I have created a few function apps and would like to add a host key or at least retrieve the default one that is cr

6条回答
  •  悲&欢浪女
    2020-12-01 19:56

    I was just able to make this work with the Azure CLI using this command:

    az rest --method post --uri \
    "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Web/sites/$FUNCTION_APP_NAME/host/default/listKeys?api-version=2018-11-01" \
    --query functionKeys.default --output tsv
    

    I realize this is a couple years late on the answer, but it might help people who are searching now.

提交回复
热议问题