{"id":6,"date":"2021-09-22T09:19:00","date_gmt":"2021-09-22T09:19:00","guid":{"rendered":""},"modified":"2021-09-23T19:45:37","modified_gmt":"2021-09-23T17:45:37","slug":"get-function-token-cli","status":"publish","type":"post","link":"http:\/\/panahy.nl\/index.php\/2021\/09\/22\/get-function-token-cli\/","title":{"rendered":"Get Function Token CLI"},"content":{"rendered":"\r\n<p>\u00a0Notice the name of the token which is created as\u00a0<b>App keys<\/b>\u00a0in the function.<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">function GetFunctionToken {\r\n    param (\r\n        [string[]]$funcResGroupName,\r\n        [string[]]$funcName\r\n    )\r\n\r\n    # Get function token\r\n    $url = \"\/subscriptions\/$subscriptionId\/resourceGroups\/$funcResGroupName\/providers\/Microsoft.Web\/sites\/$funcName\/host\/default\/listKeys?api-version=2018-11-01\"\r\n\r\n    $functionCode = az rest --method post --uri $url --query functionKeys.appkeyName --output tsv\r\n    return $functionCode\r\n}<\/pre>\r\n","protected":false},"excerpt":{"rendered":"<p>\u00a0Notice the name of the token which is created as\u00a0App keys\u00a0in the function. function GetFunctionToken { param ( [string[]]$funcResGroupName, [string[]]$funcName ) # Get function token $url = &#8220;\/subscriptions\/$subscriptionId\/resourceGroups\/$funcResGroupName\/providers\/Microsoft.Web\/sites\/$funcName\/host\/default\/listKeys?api-version=2018-11-01&#8221; $functionCode = az rest &#8211;method post &#8211;uri $url &#8211;query functionKeys.appkeyName &#8211;output tsv return $functionCode }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,13],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Pouya Panahy","author_link":"http:\/\/panahy.nl\/index.php\/author\/pouya\/"},"uagb_comment_info":0,"uagb_excerpt":"\u00a0Notice the name of the token which is created as\u00a0App keys\u00a0in the function. function GetFunctionToken { param ( [string[]]$funcResGroupName, [string[]]$funcName ) # Get function token $url = \"\/subscriptions\/$subscriptionId\/resourceGroups\/$funcResGroupName\/providers\/Microsoft.Web\/sites\/$funcName\/host\/default\/listKeys?api-version=2018-11-01\" $functionCode = az rest --method post --uri $url --query functionKeys.appkeyName --output tsv return $functionCode }","_links":{"self":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/6"}],"collection":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":6,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":164,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/6\/revisions\/164"}],"wp:attachment":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}