Python Other
Switch branches/tags
azure-cli-vm-2.0.16 azure-cli-vm-2.0.15 azure-cli-vm-2.0.14 azure-cli-vm-2.0.13 azure-cli-vm-2.0.12 azure-cli-vm-2.0.11 azure-cli-vm-2.0.10 azure-cli-vm-2.0.9 azure-cli-vm-2.0.8 azure-cli-vm-2.0.7 azure-cli-vm-2.0.6 azure-cli-vm-2.0.5 azure-cli-vm-2.0.4 azure-cli-vm-2.0.3 azure-cli-vm-2.0.2 azure-cli-vm-2.0.1 azure-cli-vm-2.0.0 azure-cli-vm-0.1.2rc2 azure-cli-vm-0.1.2rc1 azure-cli-vm-0.1.1b3 azure-cli-vm-0.1.1b2 azure-cli-vm-0.1.1b1 azure-cli-taskhelp-0.1.7 azure-cli-taskhelp-0.1.6 azure-cli-taskhelp-0.1.5 azure-cli-taskhelp-0.1.4 azure-cli-taskhelp-0.1.3 azure-cli-taskhelp-0.1.2 azure-cli-taskhelp-0.1.1b4 azure-cli-taskhelp-0.1.1b3 azure-cli-taskhelp-0.1.1b1 azure-cli-storage-2.0.17 azure-cli-storage-2.0.16 azure-cli-storage-2.0.15 azure-cli-storage-2.0.14 azure-cli-storage-2.0.13 azure-cli-storage-2.0.12 azure-cli-storage-2.0.11 azure-cli-storage-2.0.10 azure-cli-storage-2.0.9 azure-cli-storage-2.0.8 azure-cli-storage-2.0.7 azure-cli-storage-2.0.6 azure-cli-storage-2.0.5 azure-cli-storage-2.0.4 azure-cli-storage-2.0.3 azure-cli-storage-2.0.2 azure-cli-storage-2.0.1 azure-cli-storage-2.0.0 azure-cli-storage-0.1.2rc2 azure-cli-storage-0.1.2rc1 azure-cli-storage-0.1.1b2 azure-cli-storage-0.1.1b1 azure-cli-sql-2.0.13 azure-cli-sql-2.0.12 azure-cli-sql-2.0.11 azure-cli-sql-2.0.10 azure-cli-sql-2.0.9 azure-cli-sql-2.0.8 azure-cli-sql-2.0.7 azure-cli-sql-2.0.6 azure-cli-sql-2.0.5 azure-cli-sql-2.0.4 azure-cli-sql-2.0.3 azure-cli-sql-2.0.2 azure-cli-sql-2.0.1 azure-cli-sql-2.0.0 azure-cli-sql-0.1.1b6 azure-cli-sql-0.1.1b5 azure-cli-sql-0.1.1b4 azure-cli-sql-0.1.1b3 azure-cli-sql-0.1.1b2 azure-cli-sql-0.1.1b1 azure-cli-sf-1.0.8 azure-cli-sf-1.0.7 azure-cli-sf-1.0.6 azure-cli-sf-1.0.5 azure-cli-sf-1.0.4 azure-cli-sf-1.0.3 azure-cli-sf-1.0.2 azure-cli-sf-1.0.1 azure-cli-sf-1.0.0 azure-cli-servicefabric-0.0.4 azure-cli-servicefabric-0.0.3 azure-cli-servicefabric-0.0.2 azure-cli-role-2.0.13 azure-cli-role-2.0.12 azure-cli-role-2.0.11 azure-cli-role-2.0.10 azure-cli-role-2.0.9 azure-cli-role-2.0.8 azure-cli-role-2.0.7 azure-cli-role-2.0.6 azure-cli-role-2.0.5 azure-cli-role-2.0.4 azure-cli-role-2.0.3 azure-cli-role-2.0.2 azure-cli-role-2.0.1 azure-cli-role-2.0.0 azure-cli-role-0.1.2rc2
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github Update PULL_REQUEST_TEMPLATE.md (#5874) Mar 21, 2018
.vscode added vscode config for running azdev scripts (#6000) Apr 4, 2018
bin Update license header comments block for PEP8 (#1333) Nov 15, 2016
build_scripts Snapcraft yaml for Azure CLI (#5904) Mar 26, 2018
doc Switch ldash to dash for better cut/paste (#5992) Apr 19, 2018
scripts Verify package versions with last CLI release (as well as pyPI) (#6066) Apr 10, 2018
src Msi: consolidate provision logics and related authentication support (#… Apr 21, 2018
tools lint unrecognized help parameters (#6172) Apr 20, 2018
.coveragerc Update test scripts and mechanisms Jul 5, 2017
.dockerignore Support local builds for all installers (Docker, MSI, Pip, Debian, RP… Oct 18, 2017
.flake8 Convert Monitor module. (#5125) Dec 18, 2017
.gitattributes Fixes line endings and adds some INFO and TODO comments Feb 9, 2016
.gitignore Command and Parameter Test Coverage Script (#6039) Apr 10, 2018
.snapcraft.yaml 'az' snap package cryptography fix: --no-binary cryptography (#5971) Apr 4, 2018
.travis.yml Fix CI (#6156) Apr 19, 2018
CONTRIBUTING.rst Add LICENSES and update README (#537) Jul 21, 2016
Dockerfile Docker image no wget (#5840) Mar 22, 2018
Jenkinsfile Reverse Jenkins build cadence to daily (#3303) May 10, 2017
LICENSE.txt Refactor LICENSE.txt to make GitHub happy. (#3909) Jun 28, 2017
MANIFEST.in Create all component packages Mar 25, 2016
README.md Docker image moved to microsoft/azure-cli (#5291) Jan 13, 2018
appveyor-dev.yml add steps to generate extension yml (#6002) Apr 4, 2018
appveyor-mooncake.yml Update Approver file content for deleting generated *.yml files befor… Feb 13, 2018
appveyor.yml add steps to generate extension yml (#6002) Apr 4, 2018
az.completion Support local builds for all installers (Docker, MSI, Pip, Debian, RP… Oct 18, 2017
azure-cli.pyproj [Core] Limited Positional Argument Support (#6055) Apr 12, 2018
azure-cli.sln [KeyVault] KeyVault Round 3 Commands (#1215) Nov 4, 2016
azure-cli2017.pyproj [Core] Limited Positional Argument Support (#6055) Apr 12, 2018
azure-cli2017.sln Create VS2017 version of proj file. (#2450) Mar 9, 2017
cli_license_terms.md Add legal note to --version (#4242) Aug 16, 2017
nose.cfg Fix #2513: Update logging effect in automation (#3437) May 24, 2017
pylintrc Overhaul Travis build configuration Sep 12, 2017
requirements.txt update requirements to use the latestadal (#5415) Jan 26, 2018

README.md

Microsoft Azure CLI 2.0

Python Travis Slack

A great cloud needs great tools; we're excited to introduce Azure CLI 2.0, 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 2.0

Azure CLI 2.0 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

Creating a VM

The following block creates a new resource group in the 'westus' region, then creates a new Ubuntu VM. We automatically provide a series of smart defaults, such as setting up SSH with your ~/.ssh/id_rsa.pub key. For more details, try az vm create -h.

$ az group create -l westus -n MyGroup
Name     Location
-------  ----------
MyGroup  westus

$ az vm create -g MyGroup -n MyVM --image ubuntults
MacAddress         ResourceGroup    PublicIpAddress    PrivateIpAddress
-----------------  ---------------  -----------------  ------------------
00-0D-3A-30-B2-D7  MyGroup          52.160.111.118     10.0.0.4

$ ssh 52.160.111.118
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.19.0-65-generic x86_64)

System information as of Thu Sep 15 20:47:31 UTC 2016

System load: 0.39              Memory usage: 2%   Processes:       80
Usage of /:  39.6% of 1.94GB   Swap usage:   0%   Users logged in: 0

jasonsha@MyVM:~$

More Samples and Snippets

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

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 -v ${HOME}:/root -it microsoft/azure-cli:<version>

For automated builds triggered by pushes to this repo, see azuresdk/azure-cli-python.
For example:

docker run -v ${HOME}:/root -it azuresdk/azure-cli-python:dev

Edge Builds

If you want to get the latest build from the master branch, you can use our "edge" builds feed. Here's an example of installing edge dev builds with pip in a virtual environment.

$ virtualenv env
$ . env/bin/activate
$ pip install --pre azure-cli --extra-index-url https://azurecliprod.blob.core.windows.net/edge

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

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

The edge build is generated for each push to the master branch as a part of the Travis CI build. The version of the edge build follows

Developer Setup

If you would like to setup a development environment and contribute to the CLI, see Configuring Your Machine.

Contribute Code

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

For more information see the Code of Conduct FAQ or contact opencode@microsoft.com 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 Azure Projects Contribution Guidelines.

License

Azure CLI

Copyright (c) Microsoft Corporation

All rights reserved. 

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Automation