Get Function & Host Keys of Azure Function In Powershell -


i have deployed azure function using arm template. need function key & host key of deployed azure function in powershell. trying keys output section of arm template

 "outputs": { "functionappname": {   "type": "string",   "value": "[variables('functionappname')]" }, "key": {   "type": "string",   "value": "[listkeys(resourceid('microsoft.web/sites', '[variables('functionappname')]'),'2015-08-01').keys]" } 

}

i tried different combinations failing. there way retrieve keys in powershell?

i got working using following:

    "outputs": {     "functionappname": {         "type": "string",         "value": "[parameters('functionname')]"     },     "key": {         "type": "string",         "value": "[listsecrets(resourceid('microsoft.web/sites/functions', parameters('existingfunctionappname'), parameters('functionname')),'2015-08-01').key]"     },             "url": {         "type": "string",         "value": "[listsecrets(resourceid('microsoft.web/sites/functions', parameters('existingfunctionappname'), parameters('functionname')),'2015-08-01').trigger_url]"     }         } 

i couldn't find examples either. using above, quickstart sample @ github , documentation of resource functions along trial , error, got out.

please note variables/parameters , names have been changed.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -