azure-cli

listKeys for Azure function app

断了今生、忘了曾经 提交于 2019-12-01 01:19:28
How do I list the keys of an azure function app using the listKeys ARM function? My template: { "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {}, "resources": [], "outputs": { "referenceOutput": { "type": "object", "value": "[listkeys(resourceId('Microsoft.Web/sites/functions', 'my-function-app','my-function'),'2016-08-01').key]" } } And then run with: az group deployment create -g my-rg --template-file ./arm.json --mode incremental Error: No route registered for '/api/functions/my-function/listkeys?api

Azure CLI vs Powershell?

强颜欢笑 提交于 2019-11-30 14:27:26
问题 Not precisely able to understand the merit of Azure CLI on Windows environment. Is it targetted for the audience who want to manage Azure IAAS from Linux environment? I thought Powershell core is going to be the way for non-Windows admins. Is PowerShell Core not going to be ported to well on all platforms, to serve the cross-platform audience? In a nutshell, is it worth learning Azure CLI? 回答1: Azure CLI is a PowerShell-like-tool available for all platforms. You can use the same commands no

Set Output Variable in Azure CLI task on VSTS

落爺英雄遲暮 提交于 2019-11-27 07:51:39
问题 I am getting crazy to achieve this very simple task. I need to set an Output Variable in an Azure CLI task on Visual Studio Team Services, because next task in the Release definition will be executed according to the value of this variable. I wrote this simple code call az extension add --name azure-cli-iot-ext call echo ##vso[task.setvariable variable=iotEdgeExists;]$(az iot hub query -n $(iotHub) -q "select * from devices.modules where devices.deviceId ='$(iotEdge)'") which works, but not

Retrieve the host keys from an azure function app

◇◆丶佛笑我妖孽 提交于 2019-11-26 16:55:46
问题 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 created automatically. The azure cli has no support at all for this. There seems to be an api (documentation for it seems to be sparse) on the function itself that allows me to get the keys, however you need a key to use it so.. no help there. https://github.com/Azure/azure-webjobs-sdk-script/wiki/Key-management-API Eg: