Microsoft Azure CLI - Azure Command-Line Interface

Overview

Microsoft Azure CLI

Python Build Status Slack

A great cloud needs great tools; we're excited to introduce Azure CLI, our next generation multi-platform command line experience for Azure.

Take a test run now from Azure Cloud Shell!

Installation

Please refer to the install guide for detailed install instructions.

A list of common install issues and their resolutions are available at install troubleshooting.

Developer installation (see below)

Usage

$ az [ group ] [ subgroup ] [ command ] {parameters}

Get Started

Please refer to the "get started" guide for in-depth instructions.

For usage and help content, pass in the -h parameter, for example:

$ az storage -h
$ az vm create -h

Highlights

Here are a few features and concepts that can help you get the most out of the Azure CLI.

Azure CLI Highlight Reel

The following examples are showing using the --output table format, you can change your default using the az configure command.

Tab completion

We support tab-completion for groups, commands, and some parameters

# looking up resource group and name
$ az vm show -g [tab][tab]
AccountingGroup   RGOne  WebPropertiesRG

$ az vm show -g WebPropertiesRG -n [tab][tab]
StoreVM  Bizlogic

$ az vm show -g WebPropertiesRG -n Bizlogic

Query

You can use the --query parameter and the JMESPath query syntax to customize your output.

$ az vm list --query "[?provisioningState=='Succeeded'].{ name: name, os: storageProfile.osDisk.osType }"
Name                    Os
----------------------  -------
storevm                 Linux
bizlogic                Linux
demo32111vm             Windows
dcos-master-39DB807E-0  Linux

Exit codes

For scripting purposes, we output certain exit codes for differing scenarios.

Exit Code Scenario
0 Command ran successfully.
1 Generic error; server returned bad status code, CLI validation failed, etc.
2 Parser error; check input to command line.
3 Missing ARM resource; used for existence check from show commands.

Common scenarios and use Azure CLI effectively

Please check Tips for using Azure CLI effectively. It describes some common scenarios:

More samples and snippets

For more usage examples, take a look at our GitHub samples repo or https://docs.microsoft.com/cli/azure/overview.

Write and run commands in Visual Studio Code

With the Azure CLI Tools Visual Studio Code extension, you can create .azcli files and use these features:

  • IntelliSense for commands and their arguments.
  • Snippets for commands, inserting required arguments automatically.
  • Run the current command in the integrated terminal.
  • Run the current command and show its output in a side-by-side editor.
  • Show documentation on mouse hover.
  • Display current subscription and defaults in status bar.
  • To enable IntelliSense for other file types like .ps1 or .sh, see microsoft/vscode-azurecli#48.

Azure CLI Tools in Action

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

Telemetry Configuration

Telemetry collection is on by default. To opt out, please run az config set core.collect_telemetry=no to turn it off.

Reporting issues and feedback

If you encounter any bugs with the tool please file an issue in the Issues section of our GitHub repo.

To provide feedback from the command line, try the az feedback command.

Developer installation

Docker

We maintain a Docker image preconfigured with the Azure CLI. See our Docker tags for available versions.

$ docker run -u $(id -u):$(id -g) -v ${HOME}:/home/az -e HOME=/home/az --rm -it mcr.microsoft.com/azure-cli:<version>

Edge builds

If you want to get the latest build from the dev branch, you can use our "edge" builds.

You can download the latest builds by following the links below:

Package Link
MSI https://aka.ms/InstallAzureCliWindowsEdge
Homebrew Formula https://aka.ms/InstallAzureCliHomebrewEdge
Ubuntu Xenial Deb https://aka.ms/InstallAzureCliXenialEdge
Ubuntu Bionic Deb https://aka.ms/InstallAzureCliBionicEdge
RPM https://aka.ms/InstallAzureCliRpmEdge

You can easily install the latest Homebrew edge build with the following command:

brew install $(curl -Ls -o /dev/null -w %{url_effective} https://aka.ms/InstallAzureCliHomebrewEdge)

You can install the edge build on Ubuntu Xenial with the following command:

curl -Ls -o azure-cli_xenial_all.deb https://aka.ms/InstallAzureCliXenialEdge && dpkg -i azure-cli_xenial_all.deb

And install the edge build with rpm package on CentOS/RHEL/Fedora:

rpm -ivh --nodeps $(curl -Ls -o /dev/null -w %{url_effective} https://aka.ms/InstallAzureCliRpmEdge)

Here's an example of installing edge builds with pip3 in a virtual environment. The --upgrade-strategy=eager option will install the edge builds of dependencies as well.

$ python3 -m venv env
$ . env/bin/activate
$ pip3 install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge --upgrade-strategy=eager

To upgrade your current edge build pass the --upgrade option. The --no-cache-dir option is also recommended since the feed is frequently updated.

$ pip3 install --upgrade --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge --no-cache-dir --upgrade-strategy=eager

The edge build is generated for each PR merged to the dev branch as a part of the Azure DevOps Pipelines.

Get builds of arbitrary commit or PR

If you would like to get builds of arbitrary commit or PR, see:

Try new features before release

Developer setup

If you would like to setup a development environment and contribute to the CLI, see:

Configuring Your Machine

Authoring Command Modules

Contribute code

This project has adopted the Microsoft Open Source Code of Conduct.

For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

If you would like to become an active contributor to this project please follow the instructions provided in Microsoft Open Source Guidelines.

Issues
  • `pip install --upgrade azure-cli` fails on Cygwin due to psutil

    `pip install --upgrade azure-cli` fails on Cygwin due to psutil

    Describe the bug I tried to upgrade azure-cli from 2.0.31 to the latest (2.0.62 as of writing)

    To Reproduce pip install --upgrade azure-cli

    Expected behavior az should upgrade.

    Environment summary Windows 10 Cygwin (latest)

    Additional context

    Collecting psutil>=5.6.1 (from azure-cli-core==2.0.64->azure-cli)
      Using cached https://files.pythonhosted.org/packages/c6/c1/beed5e4eaa1345901b595048fab1c85aee647ea0fc02d9e8bf9aceb81078/psutil-5.6.2.tar.gz
        ERROR: Complete output from command python setup.py egg_info:
        ERROR: platform cygwin is not supported
        ----------------------------------------
    ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-NwRvbi/psutil/
    
    Feedback Workaround 
    opened by ElvenSpellmaker 70
  • az aks get-credentials not returning access-profile

    az aks get-credentials not returning access-profile

    I am using Azure-CLI version 2.0.24, however az aks get-credentials is not working.

    I am getting the following error:

    'ManagedCluster' object has no attribute 'properties' Traceback (most recent call last): File "/home/xiou/lib/azure-cli/local/lib/python2.7/site-packages/knack/cli.py", line 193, in invoke cmd_result = self.invocation.execute(args) File "/home/xiou/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/commands/init.py", line 319, in execute six.reraise(*sys.exc_info()) File "/home/xiou/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/commands/init.py", line 292, in execute result = cmd(params) File "/home/xiou/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/commands/init.py", line 169, in call return super(AzCliCommand, self).call(*args, **kwargs) File "/home/xiou/lib/azure-cli/local/lib/python2.7/site-packages/knack/commands.py", line 109, in call return self.handler(*args, **kwargs) File "/home/xiou/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/init.py", line 328, in default_command_handler result = op(**command_args) File "/home/xiou/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/command_modules/acs/custom.py", line 1329, in aks_get_credentials access_profiles = mc.properties.access_profiles AttributeError: 'ManagedCluster' object has no attribute 'properties'

    ACS 
    opened by xinyi-joffre 52
  • Support active Debian/Ubuntu distributions from Wheezy up

    Support active Debian/Ubuntu distributions from Wheezy up

    We install the azure cli on an Ubuntu 14.04 VM using apt-get in some of our automation scenarios and we started getting a new error yesterday. After running az login, we see this:

    Please ensure you have network connection. Error detail: Can't connect to HTTPS URL because the SSL module is not available.

    For reference this is how we install the cli:

    sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev
    echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
    sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
    sudo apt-get install -y apt-transport-https
    sudo apt-get -y update && sudo apt-get install -y azure-cli
    

    Like I said, we do this in automation (aka it's a clean VM every time) and we haven't changed anything about how we install the CLI. I tried interactively installing with the https://aka.ms/InstallAzureCli command and did not reproduce this error.

    Packaging 
    opened by ejizba 50
  • az storage blob {upload|copy blob} doesn't support SAS URLs

    az storage blob {upload|copy blob} doesn't support SAS URLs

    Describe the bug My entire complaints about MD and storage accounts seems to actually be already solved by Azure, but not documented. Further, after some time, I still can't piece together if it's actually possible with the CLI.

    azure disk create ... --for-upload true ... returns a SAS URL that looks like this:

    https://md-impexp-t4nfwj1qcc3j.blob.core.windows.net/pk5qjbl3lnhn/abcd?sv=2017-04-17&sr=b&si=1d2b08af-d097-4d3f-b468-a7d4c91c7d04&sig=%2FjClxzQFf3O1ulyHn3xR1287XPdweHLnJKdYfj3ErZI%3D

    Does the CLI support using that SAS url directly with az storage blob upload or az storage blob copy start? If not, I don't really get how this scenario is complete under the CLI.

    Storage feature-request 
    opened by colemickens 48
  • WSL: Why Azure CLI is too slow at each command execution?

    WSL: Why Azure CLI is too slow at each command execution?

    Describe the bug It's not exactly a bug but every command at PowerShell or Bash in WSL is too slow, I know that every command is making a web-api request call but is really sad this api call is causing too much delay.

    I don't know if I am at Brazil and the all api calls is from US and those internet latence is the cause but is really bad.

    To Reproduce Stay at Brazil and call a single command like az acr list.

    Expected behavior I don't know, but some loading indicator or proxy all api request call near Brazil...

    Environment summary Windows 10 with PowerShell and WSL

    λ  az --version
    azure-cli (2.0.46)
    
    acr (2.1.5)
    acs (2.3.4)
    advisor (0.6.0)
    ams (0.2.3)
    appservice (0.2.4)
    backup (1.2.1)
    batch (3.4.0)
    batchai (0.4.3)
    billing (0.2.0)
    botservice (0.1.1)
    cdn (0.1.1)
    cloud (2.1.0)
    cognitiveservices (0.2.3)
    command-modules-nspkg (2.0.2)
    configure (2.0.18)
    consumption (0.4.0)
    container (0.3.4)
    core (2.0.46)
    cosmosdb (0.2.1)
    dla (0.2.3)
    dls (0.1.3)
    dms (0.1.1)
    eventgrid (0.2.0)
    eventhubs (0.2.4)
    extension (0.2.1)
    feedback (2.1.4)
    find (0.2.12)
    interactive (0.3.30)
    iot (0.3.2)
    iotcentral (0.1.2)
    keyvault (2.2.3)
    lab (0.1.1)
    maps (0.3.2)
    monitor (0.2.3)
    network (2.2.5)
    nspkg (3.0.3)
    policyinsights (0.1.0)
    profile (2.1.1)
    rdbms (0.3.2)
    redis (0.3.2)
    relay (0.1.2)
    reservations (0.4.0)
    resource (2.1.4)
    role (2.1.5)
    search (0.1.1)
    servicebus (0.2.3)
    servicefabric (0.1.3)
    signalr (1.0.0)
    sql (2.1.4)
    storage (2.2.2)
    telemetry (1.0.0)
    vm (2.2.3)
    
    Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
    Extensions directory 'C:\Users\alexs\.azure\cliextensions'
    
    Python (Windows) 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]
    
    Legal docs and information: aka.ms/AzureCliLegal
    

    Additional context Every was slow here at Brazil, I don't know if it is slow in another region, I'm posting it right now because I'm starting use Azure CLI constantly and I wish a better user experience.

    Thank's!

    Service Attention Performance customer-reported DevOps feature-request 
    opened by alexsandro-xpt 43
  • Issue pushing to azure git with cli created user

    Issue pushing to azure git with cli created user

    Hi, I create a deployment user using: az webapp deployment user set --user-name --password

    Then I try to push to the deployment git using: git push azure master and receive the 403 error that I am forbidden from pushing to that. If I use an incorrect password I receive a 401 error.

    When I check the front end, I see that deployment credentials are empty. When I try to add the same username as I created using the above user set command, the platform tells me its a taken user name. Running: az webapp deployment user show

    returns

    { "id": null, "kind": null, "name": "web", "publishingPassword": null, "publishingPasswordHash": null, "publishingPasswordHashSalt": null, "publishingUserName": "testUser1234441212", "type": "Microsoft.Web/publishingUsers/web", "userName": null }

    When I change the settings manually in the front end "Deployment credentials" under "App Services" and try pushing to git, it all works.

    To conclude, the credentials I create using az webapp deployment user set --user-name --password do not work when pushing to deployment-local-git. Creating a user manually on the front end under "App Services" > "Deployment credentials" and trying that user and password works fine.


    Environment summary

    Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

    Web Apps 
    opened by kristaps5 38
  • [RDBMS] Added tests for flexible server team pipeline

    [RDBMS] Added tests for flexible server team pipeline

    Description No customer facing changes. Added tests for Flexible Server stability check testing pipeline.

    Testing Guide

    History Notes

    [Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change. [Component Name 2] az command b: Add some customer-facing feature.


    This checklist is used to make sure that common guidelines for a pull request are followed.

    opened by DaeunYim 37
  • [Monitor] alert-rule create exposes 'alert-rule-resource-name' and 'name'

    [Monitor] alert-rule create exposes 'alert-rule-resource-name' and 'name'

    Description

    Command
        az monitor alert-rules create: Creates or updates an alert rule.
    
    Arguments
        --alert-rule-resource-name [Required]: The name of the alert rule.
        --condition                [Required]: JSON encoded condition configuration. Use @{file} to load
                                               from a file.
        --is-enabled               [Required]: The flag that indicates whether the alert rule is
                                               enabled.
        --name -n                  [Required]: The name of the rule.
        --actions                            : JSON encoded array of actions that are performed when the
                                               alert rule becomes active, and when an alert condition is
                                               resolved. Use @{file} to load from a file.
        --description                        : The description of the alert rule that will be included
                                               in the alert email.
        --location -l                        : Location. You can configure the default location using
                                               `az configure --defaults location=<location>`.  Default:
                                               westus.
        --resource-group -g                  : Name of resource group. You can configure the default
                                               group using `az configure --defaults group=<name>`.
                                               Default: tjp-vm.
        --tags                               : Resource tags.
    

    This exposes two required parameters: --alert-rule-resource-name and --name. Both refer to the same thing and NEITHER refer to the name or ID of the target resource (which is actually buried deep inside the condition object--FUN TIMES).

    Also, in general this command is painfully unusable.


    Environment summary

    Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
    Answer here: dev_setup.py

    CLI Version: What version of the CLI and modules are installed? (Use az --version)
    Answer here: latest master

    OS Version: What OS and version are you using?
    Answer here: Windows 10 CU

    Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
    Answer here: cmd.exe

    bug Monitor 
    opened by tjprescott 37
  • az webapp config ssl bind results in error when webapp is in different rg than app service plan

    az webapp config ssl bind results in error when webapp is in different rg than app service plan

    Description az webapp config ssl bind command fails with: certificate "xyz" not found when pfx cert is uploaded to webapp in different resource group than app service plan

    To Reproduce Create App Service Plan in resource group 'A' Create WebApp 'myApp' on Plan in new resource group 'B' Upload .pfx cert to WebApp

    az webapp config ssl list --resource-group 'B' #This shows certificate with thumbprint 'xyz' found

    az webapp config ssl bind --certificate-thumbprint 'xyx' --ssl-type SNI --name 'myApp' --resource-group 'B' #Results in Error certificate 'xyz' not found

    --debug shows az webapp config ssl bind is searching for pfx cert in resource group 'A' where the AppService plan is located.

    Capture

    .pfx cert is actually located in resource group 'B' alongside WebApp.

    Expected behavior Command should run successfully.

    Uploaded private key certs are located in the rg of the WebApp they are initially uploaded to. Uploaded private key certs can be shared across all WebApps in the same App Service Plan regardless of resource group.

    Suggested Fix: az webapp config ssl bind should search for a certificate with matching a thumbprint in all resource groups containing WebApps of the parent App Service Plan to the bind target.

    Workaround Uploading the .pfx cert to a WebApp in the same resource group as the App Service Plan works as expected.

    question 
    opened by owenmather 36
  • Capacity Reservation, VM and VM ScaleSets (high priority)

    Capacity Reservation, VM and VM ScaleSets (high priority)

    Is your feature request related to a problem? Please describe. This feature request is for introducing a new resource called Capacity Reservation. Today Azure provides capacity for the virtual machines in most scenarios and provides availability SLA for virtual machines once deployed in that capacity. But we currently lack features to provide SLA for the capacity availability prior to VM/VMSS deployment. In recent days, we saw the need for this capacity Reservation more due to the increasing capacity needs due to Covid-19 like scenarios and it will be useful if we can provide a feature for Customers to be able to reserve the capacities for critical workloads that couldn’t handle the delayed downtime.
    Full Problem statement and design information is here: [https://microsoft.sharepoint.com/:w:/t/ComputeVM/EaUwaQbU3NJGq4U38tiJjHUBqwAhWov9SUSa8rR6RSGQkw?e=HzTeQ3 ](Design documentation)

    Describe the solution you'd like This resource will be used by customers to create and reserve the on-demand capacity slots for future deployments to avoid allocation failures due to out-of-capacity issues for any critical deployments.

    Describe alternatives you've considered Customers can always try to reserve clusters ( which is expensive and can be overwhelming for small-scale customers). Also, they can use the spot VMS which is low priority VMs and can be evicted at any time due to other deployments.

    Additional context

    Complete Swagger changes for this feature request are below

    Capacity Reservation, Single VM:

    1. https://github.com/Azure/azure-rest-api-specs/pull/15058
    2. [https://github.com/Azure/azure-rest-api-specs/pull/15158](Patch changes)

    VMSS : https://github.com/Azure/azure-rest-api-specs/pull/15070

    Resource Provider Compute Resource Provider

    Minimum API Version Required

    2021-04-01

    Target Date

    We would like to for Public Preview in Early August and planning for the GA in September. we are on a tight deadline.

    Compute feature-request 
    opened by hari-bodicherla 36
  • `az cosmosdb` crashes on startup

    `az cosmosdb` crashes on startup

    This is autogenerated. Please review and update as needed.

    Describe the bug

    Command Name az cosmosdb

    Errors:

    The operation 'azure.mgmt.cosmosdb.operations#DatabaseAccountsOperations.regenerate_key' is invalid.
    Traceback (most recent call last):
    azure/cli/core/__init__.py, ln 831, in get_op_handler
        op = getattr(op, part)
    AttributeError: type object 'DatabaseAccountsOperations' has no attribute 'regenerate_key'
    
    ...
    
    azure/cli/core/__init__.py, ln 836, in get_op_handler
        raise ValueError("The operation '{}' is invalid.".format(operation))
    ValueError: The operation 'azure.mgmt.cosmosdb.operations#DatabaseAccountsOperations.regenerate_key' is invalid.
    

    To Reproduce:

    Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

    • Put any pre-requisite steps here...
    • az cosmosdb

    Expected Behavior

    Environment Summary

    Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-glibc2.31
    Python 3.9.2
    Installer: DEB
    
    azure-cli 2.18.0 *
    
    

    Additional Context

    question customer-reported needs-triage 
    opened by cizra 0
  • Typo:

    Typo: "galley" should be "gallery"

    https://github.com/Azure/azure-cli/blob/a8c410f7d610df28cf7ce042d88cc406d2f64859/src/azure-cli/azure/cli/command_modules/vm/_params.py#L166

    question customer-reported needs-triage 
    opened by mbrightcpacket 0
  • az storage blob move is documented but doesn't actually work

    az storage blob move is documented but doesn't actually work

    Attempt to run az storage blob move results in:

    'move' is misspelled or not recognized by the system.
    
    Examples from AI knowledge base:
    https://aka.ms/cli_ref
    

    However, this leads to docs that say this command should work.

    az version says

    {
      "azure-cli": "2.30.0",
      "azure-cli-core": "2.30.0",
      "azure-cli-telemetry": "1.0.6",
      "extensions": {}
    }
    

    Document Details

    Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

    • ID: b8c4e415-fc8d-26d5-3213-da937fd6932c
    • Version Independent ID: dcb2f2d6-fd80-495d-8582-8be859d68792
    • Content: az storage
    • Content Source: latest/docs-ref-autogen/storage.yml
    • Service: storage
    • GitHub Login: @rloutlaw
    • Microsoft Alias: routlaw
    question customer-reported needs-triage 
    opened by dbrennan 0
  • Azure CLI to support connection draining/Health API feature on Load Balancer

    Azure CLI to support connection draining/Health API feature on Load Balancer

    Spec: https://microsoft.sharepoint.com/:w:/t/Aznet/EZehkPTiO6ZBpzBUMHrFbPgBBcY5yJeenD6FoFPCpgh4Pg?e=ZlUuGb API: https://microsoft.sharepoint.com/:p:/t/Aznet/EVk6izgDWn5Ejy23V6nU5BYBdzIQBnL53JpKnOAqPgA37Q?e=ah48gf

    needs-triage 
    opened by irenehua 0
  • virtualMachineScaleSet ARM template fails to deploy if spot restoration fields are present

    virtualMachineScaleSet ARM template fails to deploy if spot restoration fields are present

    az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

    Describe the bug The spot restoration feature is included on a new VMSS via ARM template by including spotRestorePolicy which includes a boolean field called enabled. However, this only works when priority is set to Spot. If priority is set to Regular, the template will fail to deploy with Spot restoration feature is supported only for Azure Spot Virtual Machine Scale Sets, regardless of the whether the boolean enabled field for spotRestorePolicy is set to false.

    The only solution right now is to have 2 separate templates, one for spot and one for regular VMSS

    To Reproduce

    • Create a VMSS ARM template with priority of 'Regular', creating a non-spot VMSS
    • Include the spotRestorePolicy field and try changing the enabled field to true or false. Both will fail.

    Expected behavior Logically, it should be possible to create a template of priority Spot or a template of priority Regular, and still include this field. When priority == Regular and spotRestorePolicy -> false, the template should still deploy.

    Environment summary Mac OS (Big Sur) 11.5.1. Azure CLI version 2.30.0. API version 2021-07-01 for virtualMachineScaleSets in ARM template.

    Additional context N/A

    question customer-reported needs-triage 
    opened by CameronMcAuley 0
  • az servicebus namespace list throws error

    az servicebus namespace list throws error

    This is autogenerated. Please review and update as needed.

    Describe the bug

    Command Name Running az servicebus namespace list provides the following error:

    Errors:

    The command failed with an unexpected error. Here is the traceback:
    Unable to deserialize to object: type, AttributeError: 'list' object has no attribute 'get'
    Traceback (most recent call last):
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1428, in _deserialize
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1172, in rest_key_extractor
    AttributeError: 'list' object has no attribute 'get'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 657, in execute
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 704, in _run_job
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 129, in __next__
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/paging.py", line 84, in __next__
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/servicebus/operations/_namespaces_operations.py", line 367, in extract_data
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1368, in __call__
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1442, in _deserialize
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1618, in deserialize_data
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1649, in deserialize_iter
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1649, in <listcomp>
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1631, in deserialize_data
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1442, in _deserialize
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1631, in deserialize_data
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1442, in _deserialize
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1631, in deserialize_data
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1446, in _deserialize
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/exceptions.py", line 51, in raise_with_traceback
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1428, in _deserialize
      File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msrest/serialization.py", line 1172, in rest_key_extractor
    msrest.exceptions.DeserializationError: Unable to deserialize to object: type, AttributeError: 'list' object has no attribute 'get'
    
    

    To Reproduce:

    Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

    • Put any pre-requisite steps here...
    • az servicebus namespace list

    Expected Behavior

    Environment Summary

    Windows-10-10.0.19041-SP0
    Python 3.8.9
    Installer: MSI
    
    azure-cli 2.30.0
    
    

    Additional Context

    Service Attention Service Bus customer-reported 
    opened by jimmytricks 2
  • {Packaging} Adapt entry script to Mariner

    {Packaging} Adapt entry script to Mariner

    Description

    See code comments.

    References

    • https://github.com/Azure/azure-cli/pull/17491
    • https://github.com/Azure/azure-cli/pull/20061
    opened by jiasli 2
  • unable to create mysql database using aws-cli on ubuntu 20.04

    unable to create mysql database using aws-cli on ubuntu 20.04

    This is autogenerated. Please review and update as needed.

    Describe the bug

    Command Name az mysql flexible-server db create

    Errors:

    The command failed with an unexpected error. Here is the traceback:
    No value for given attribute
    Traceback (most recent call last):
      File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
        cmd_result = self.invocation.execute(args)
      File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
        raise ex
      File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
        results.append(self._run_job(expanded_arg, cmd_copy))
      File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
        result = cmd_copy(params)
      File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
        return self.handler(*args, **kwargs)
      File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
        return op(**command_args)
      File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/rdbms/flexible_server_custom_mysql.py", line 699, in database_create_func
        parameters)
      File "/opt/az/lib/python3.6/site-packages/azure/mgmt/rdbms/mysql_flexibleservers/operations/_databases_operations.py", line 154, in begin_create_or_update
        **kwargs
      File "/opt/az/lib/python3.6/site-packages/azure/mgmt/rdbms/mysql_flexibleservers/operations/_databases_operations.py", line 72, in _create_or_update_initial
        'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
      File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 650, in url
        output = self.serialize_data(data, data_type, **kwargs)
      File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 758, in serialize_data
        raise ValueError("No value for given attribute")
    ValueError: No value for given attribute
    
    

    To Reproduce:

    Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

    • Put any pre-requisite steps here...
    • az mysql flexible-server db create -d {}

    Expected Behavior

    Environment Summary

    Linux-5.10.60.1-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid, Ubuntu 20.04.3 LTS
    Python 3.6.10
    Installer: DEB
    
    azure-cli 2.30.0
    
    Extensions:
    rdbms-connect 0.1.4
    
    

    Additional Context

    Service Attention MySQL customer-reported 
    opened by mahfooz-iiitian 2
  • az rest --uri not support some Graph Endpoints e.g. /deviceManagement/deviceShellScripts

    az rest --uri not support some Graph Endpoints e.g. /deviceManagement/deviceShellScripts

    Per our testing, az rest --uri not support some Graph Endpoints e.g. /deviceManagement/deviceShellScripts, since Azure CLI (1st party app) doesn't have the required delegated permissions.

    However, our document doesn't mention that. May I know if any plan for letting az rest support that? Or can we update the document letting us know that limitation?


    Document Details

    Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

    customer-reported rest Microsoft Graph feature-request 
    opened by weinishen 2
  • "az storage account network-rule list" not available in version 2.24.0 on AML compute instance.

    This is autogenerated. Please review and update as needed.

    Describe the bug

    The documented command "az storage account network-rule list" returns an error: APIVersion 2021-04-01 is not available

    when run on an AML compute instance running azure-cli 2.24.0.

    The command is documented in https://docs.microsoft.com/en-us/cli/azure/release-notes-azure-cli?toc=%2Fcli%2Fazure%2Ftoc.json&bc=%2Fcli%2Fazure%2Fbreadcrumb%2Ftoc.json&view=azure-cli-latest

    for version 2.30.0.

    The release notes mention that az storage account network-rule: GA resource access rules were released 2 March 2021 for version 2.20.0, so the compute instance version should be adequate.

    The actual desired usage is to enable and disable a storage account network rule set programmatically.

    Command Name az storage account network-rule list

    Errors:

    The command failed with an unexpected error. Here is the traceback:
    APIVersion 2021-04-01 is not available
    Traceback (most recent call last):
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
        cmd_result = self.invocation.execute(args)
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
        raise ex
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
        results.append(self._run_job(expanded_arg, cmd_copy))
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
        result = cmd_copy(params)
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
        return self.handler(*args, **kwargs)
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler
        client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 143, in cf_sa
        return storage_client_factory(cli_ctx).storage_accounts
      File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/mgmt/storage/_storage_management_client.py", line 413, in storage_accounts
        raise NotImplementedError("APIVersion {} is not available".format(api_version))
    NotImplementedError: APIVersion 2021-04-01 is not available
    
    

    To Reproduce:

    Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

    • Put any pre-requisite steps here...
    • az storage account network-rule list --account-name {} --resource-group {}

    Expected Behavior

    Environment Summary

    Linux-5.4.0-1056-azure-x86_64-with-debian-buster-sid
    Python 3.6.9
    Installer: PIP
    
    azure-cli 2.24.0 *
    azure-cli-ml 1.33.0
    
    Extensions:
    azure-cli-ml 1.33.0
    
    

    Additional Context

    Storage 
    opened by jmagosta 1
Releases(azure-cli-2.30.0)
Owner
Microsoft Azure
APIs, SDKs and open source projects from Microsoft Azure
Microsoft Azure
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 14 Nov 18, 2021
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 5 Dec 2, 2021
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 4.9k Nov 25, 2021
moviepy-cli: Command line interface for MoviePy.

Moviepy-cli is designed to apply several video editing in a single command with Moviepy as an alternative to Video-cli.

Kentaro Wada 20 Nov 18, 2021
Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications.

Quo is a Python based toolkit for writing Command-Line Interface(CLI) applications. Quo is making headway towards composing speedy and orderly CLI applications while forestalling any disappointments brought about by the failure to execute a CLI API. Simple to code, easy to learn, and does not come with needless baggage.

Secretum Inc. 3 Nov 20, 2021
Program Command Line Interface (CLI) Sederhana: Pemesanan Nasi Goreng Hekel

Program ini merupakan aplikasi yang berjalan di dalam command line (terminal). Program ini menggunakan built-in library python yaitu argparse yang dapat menerima parameter saat program ini dijalankan melalui terminal atau CLI.

Habib Abdurrasyid 5 Nov 19, 2021
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli.

ABOUT A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Janardon Hazarika 14 Nov 18, 2021
Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process of them.

Task Manager Automation Tool (TMAT) CLI Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process

Tiamat 5 Nov 12, 2021
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

Richard Mwewa 13 Nov 26, 2021
This is a CLI utility that allows you to view RedFlagDeals.com on the command line.

RFD Description Motivation Installation Usage View Hot Deals View and Sort Hot Deals Search Advanced View Posts Shell Completion bash zsh Description

Dave G 6 Oct 29, 2021
tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI.

Tox Server tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI. It responds to commands via ZeroMQ

Alexander Rudy 3 Nov 5, 2021
Command line interface for testing internet bandwidth using speedtest.net

speedtest-cli Command line interface for testing internet bandwidth using speedtest.net Versions speedtest-cli works with Python 2.4-3.7 Installation

Matt Martz 11.5k Dec 2, 2021
Universal Command Line Interface for Amazon Web Services

This package provides a unified command line interface to Amazon Web Services.

Amazon Web Services 11.7k Nov 23, 2021
command line interface to manage VALORANT skins

A PROPER RELEASE IS COMING SOON, IF YOU KNOW HOW TO USE PYTHON YOU CAN USE IT NOW! valorant skin manager command line interface simple command line in

colinh 113 Nov 27, 2021
A command line interface to buy things in stregsystemet

Stregsystemet-CLI This repository is the Stregsystemet CLI, to buy things in Stregsystemet, at AAU. Use of this cli-tool is at your own risk and there

F-klubben 9 Nov 25, 2021
Command line interface for unasync

CLI for unasync Command line interface for unasync Getting started Install Run the following command to install the package with pip: pip install unas

Leynier Gutiérrez González 2 Oct 24, 2021
Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Website

?? rover Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Websit

Saketha Ramanjam 3 Oct 23, 2021
Investing library and command-line interface inspired by the Bogleheads philosophy

Lakshmi (Screenshot of the lak command in action) Background This project is inspired by Bogleheads forum. Bogleheads focus on a simple but powerful p

Sarvjeet Singh 69 Nov 27, 2021