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

Azure pipeline showing OSError: [Errno 22] Invalid argument:

I am running this task in azure pipeline with microsoft hosted windows-latest agent but this step shows OSError: [Errno 22] Invalid argument: 'D:\a\1\a\**\*.zip' error. - task: AzureCLI@2 displayName: Azure CLI inputs: azureSubscription:…
0
votes
2 answers

AKS start/stop cluster in PowerShell

Is it possible to run this two commands as a PowerShell cmdlet? az aks stop --name myAKSCluster --resource-group myResourceGroup az aks start --name myAKSCluster --resource-group myResourceGroup I cannot find the PowerShell equivalent here:…
0
votes
1 answer

Azure pipeline CLI task with acr purge getting failed

Getting below error ERROR: The command failed with an unexpected error. Here is the traceback: ERROR: 'NoneType' object is not callable Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in…
Rajesh174u
  • 29
  • 1
  • 6
0
votes
1 answer

Listing azure webapp name of a group by powershell

Is there any way to list all webapp service of a certain group by azure cli or azure powershell script?
0
votes
1 answer

Restoring IP access restrictions to an Azure WebApp from Azure Devops release pipeline

I have an Azure Devops release pipeline in place for deploying files to a webapp. At the beginning of this process, the current IP addresses are stored in a variable ($ipJson in script below). I then remove all existing IP addresses and add the…
Neo_
  • 282
  • 2
  • 6
0
votes
1 answer

Az disk delete not deleting the disk

I'm trying to delete a disk in a resource group that my account has permission to delete. When running this command no errors happen and the script finishes, but the disk is not deleted when checking the portal (-n and -g are filled in with correct…
ESH
  • 1
0
votes
1 answer

How to enable "MySQL in App" in an App Service using the Azure CLI

I have created an App Service in Azure using the CLI. But, I cannot see any CLI options to enable "MySQL in App". I have checked here: https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest and see no mention of it. What is the CLI…
Mark
  • 480
  • 1
  • 5
  • 18
0
votes
1 answer

Azure Application Insights CLI event types

Referencing the Microsoft Azure CLI Docs for Application Insights queries I see a parameter --type but I don't see a list of all the available types. re:…
0
votes
0 answers

Azure CLI returning second array when only expecting one

I'm working with azure CLI to script out a storage upgrade as well as add a policy, all in a python script. However, when I run the script I'm getting some expected and some very NOT expected output. What I'm using so far: from azure.cli.core import…
MattsM
  • 3
  • 2
0
votes
1 answer

Azure CLI | list resources

Team, I'm using the below query to list all the resources in my subscription. But whereas resourcetype is coming as null. but all other parameters are coming fine. Can someone help to suggest. az resource list --query…
Rajesh
  • 1
0
votes
1 answer

How to do this query (az --query "custom-headers host")

I can't just print the (value) information. ], "id": "/subscriptions/x/resourceGroups/x/providers/Microsoft.Network/trafficManagerProfiles/x", "location": "global", "maxReturn": null, "monitorConfig": { "customHeaders": [ { "name":…
0
votes
1 answer

How to convert --query return to string (az-devops cli with Powershell)

I'm trying to assign a --query's returned id value into a variable as a string so that I can use the variable to input the id in other commands in Windows Powershell: $repoID = az repos list --query "`"[?contains(name,'$Name')].id`"" az repos policy…
Vince
  • 15
  • 3
0
votes
1 answer

How to import a specification into a versionset of Azure APIM using Azure-CLI

I'm trying to update an existing version in a versionset inside an Azure API Management service with a new specification using Azure CLI. I know it does support importing it as an API without a versionset: az apim api import ` --path "/as" ` …
Andries
  • 175
  • 1
  • 9
0
votes
1 answer

Is there any way to fix azure cli import pyparsing error on mac?

I'm trying to run azure CLI after reinstalling it I'm getting: $ az Traceback (most recent call last): File "/usr/local/Cellar/python@3.8/3.8.11/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 185, in _run_module_as_main …
0
votes
1 answer

Python3 failing to `az login`

What specific changes need to be made to the syntax below in order for the Python3 function below to report that the az login cli command has succeeded, or to report useful error message if it has not? CURRENT FUNCTION: Here is the function we are…
CodeMed
  • 9,527
  • 70
  • 212
  • 364