Questions tagged [azure-cli]

The Azure CLI allows Azure users to manage their Azure assets and interact with their Azure services, applications, containers, and infrastructure in an idiomatic way.

Learn more here!

2057 questions
0
votes
1 answer

How to add & condition for jmespath query with az command

I want to filter out two types in the query expression Json file : [ { "name": "name0", "tags": { "env": "dev" }, "type": "Microsoft.OperationsManagement/solutions" }, { "name": "name1", "tags": { "env":…
Uday Kiran
  • 487
  • 2
  • 9
  • 29
0
votes
1 answer

Azure Service Principal gets "Authorization_RequestDenied" when used in Terraform

I have a service principal that is used when running my Terraform scripts that works for 99% of what I need to do. However I then need to run the following script with terraform to update a property on an App Registration - as this is the only way…
user3407039
  • 1,285
  • 5
  • 25
  • 51
0
votes
2 answers

How to get Azure FunctionApp list using python SDK

I am trying to get details of function apps using python SDK and finding suitable client and methods. I can use ResourceManagementClient and get basic info on them but does not get runtime and other details. I can run CLI az functionapp list and get…
John Smith
  • 261
  • 1
  • 3
  • 8
0
votes
2 answers

Bitbucket pipeline to deploy to Azure VM using Azure-cli command cannot access to script file

I have my source code in Bitbucket and I'm using bitbucket pipeline to build and deploy my Web application to Azure VM. I'm not using Azure Web Application because of constraint into the use of third parties tools. I'm stuck on how to use a script…
Jerome2606
  • 933
  • 20
  • 42
0
votes
1 answer

application insights traces query doesn't work from azure cli command

I would like to execute my application insights traces from my vscode's azure cli command. I could get all details with the below command. az monitor app-insights query --app myappinsight1 --analytics-query traces --resource-group myRG But I need…
0
votes
1 answer

azure ad cli - how to query multiple parameter from output

I am trying to query my azure ad group and wants to print multiple parameter. However, nothing is working. Following works to print only displayName az ad group member list -g xxx --query [].displayName I want to print displayName and…
Gaurang Shah
  • 11,764
  • 9
  • 74
  • 137
0
votes
1 answer

How to remove duplicates in the az command output using --query

Command az resource list --resource-group MYRG --query "[].{type:type}" output [ { "type": "Microsoft.Network/networkInterfaces" }, { "type": "Microsoft.Network/networkInterfaces" }, { "type": "Microsoft.Network/networkSecurityGroups" }, { "type":…
Uday Kiran
  • 487
  • 2
  • 9
  • 29
0
votes
1 answer

how to create auto scale rule for HttpQueueLength with az monitor

I can create basic auto sacle rule such as memory easily az monitor autoscale rule create -g xx --autoscale-name xxxx --scale out 2 --condition "CpuPercentage > 60 avg 1m" But I want to create a rule base on Http Queue Length or Http5xx error,…
daxu
  • 3,514
  • 5
  • 38
  • 76
0
votes
1 answer

Azure cli to run Query Pack query

I can connect to log-analytics using azure cli ok but when listing the saved queries: az monitor log-analytics workspace saved-search list the Query Pack query I created doesn't show. The Query Pack query works in the Azure Portal when I load…
codebrane
  • 4,290
  • 2
  • 18
  • 27
0
votes
1 answer

Delete every VM including Resources Group in Azure

I am trying to make a bash script to delete every VM with it's associated Resources group available in all of the subscriptions. A one liner code. So, far I have made is this: for i in `az account list --query "[].{id:id}" --output tsv`; do az…
0
votes
1 answer

Fetch a service principle client ID having only its display name

The following bash script code used to work to get a service principal's client ID via AZ CLI, by passing its display name to the script. az ad sp show --id http://$SP_NAME But now I am getting the following error : Service principal ... doesn't…
ccoutinho
  • 3,308
  • 5
  • 39
  • 47
0
votes
1 answer

Azure App Config adding JSON through Azure CLI

I've created an Azure App Config and am calling the following to add a key / value pair through an Azure Cloud Shell: az appconfig kv set -n $appConfigName --content-type application/json --key "tenantXYZ:1" --value…
auburg
  • 1,373
  • 2
  • 12
  • 22
0
votes
1 answer

What is the default chunk size used when uploading blobs using the Azure CLI, and can this be changed?

I am using the Azure Command Line Interface az command to upload data to an Azure storage account: az storage blob upload ... I note the documentation refers to "automatic chunking": Upload a file to a storage blob. Creates a new blob from a file…
jl6
  • 6,110
  • 7
  • 35
  • 65
0
votes
2 answers

How to add tags to existing azure resources using PowerShell

I have created number of resources in azure via portal. how to add the tags to each existing resource using PowerShell or CLI?
Pradeep
  • 5,101
  • 14
  • 68
  • 140
0
votes
1 answer

Forking a repository using the Azure az repos CLI

Azure provides an az repos CLI for Azure DevOps that allows convenient programmatic management of repositories. However, it seems that there is no obvious way to fork a repository using the az repos CLI. The intended usage pattern here is to fork a…