Utility to switch Azure subscriptions
Project description
Switch Azure subscriptions
Problem: Switching subscriptions using the Azure CLI involves too much typing.
# Type a lot...
az account list --output table
# Use mouse to select the subscription-id in the console
# Use ctrl-c to copy the text, this might be optional
# Type a lot...
az account set --subscription-id <paste subscription-id>
Solution: I simplified this task with the command-line utility az-switch! The active subscription is bold and green and selected as default argument. Just select the subscription you want to activate.
Install
pip install az-account-switcher
Usage
Usage: az-switch [OPTIONS]
Show all Azure Subscriptions in current profile using the `az` command-
line utility. Ask user input for switching to another subscription.
Options:
-n INTEGER Switch to this subscription number directly.
--help Show this message and exit.
Example
az-switch
[1]: 5ddxxc0-xxxx-44c1-b12a-xxxb5dexxx: CompanyY PayAsYouGo
[2]: 882xx6c-xxxx-4121-912a-xxx25c8xxx: PersonalSubscription
[3]: d3fxx79-xxxx-4b11-812d-xxx974axxx: CompanyX INNOVATION
[4]: 8c1xx9e-xxxx-4e91-912c-xxx1842xxx: CompanyX Production
[5]: 26axxfb-xxxx-4ad1-8128-xxxf0eexxx: CompanyZ - staging
[6]: 463xx72-xxxx-4cf1-8125-xxxa803xxx: CompanyZ - prod
[7]: 29dxxe9-xxxx-4461-9123-xxxd5d5xxx: CompanyZ - dev
Switch [4]: 5
Active: 26axxfb-xxxx-4ad1-8128-xxxf0eexxx: CompanyZ - staging
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file az-account-switcher-0.0.4.tar.gz
.
File metadata
- Download URL: az-account-switcher-0.0.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3006b738c7e7abbeaa6b5a08734d94b670158528dc70f6d9f511789a30598cb3 |
|
MD5 | c769d930d045bbd52caea732c4518d2a |
|
BLAKE2b-256 | e51db521f4527892e65587a201bb8fe727afef315f940c50b50d584219309a08 |
File details
Details for the file az_account_switcher-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: az_account_switcher-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2172f51597f6b0a6489d9a2f841061d3d3d01b6f2eb78cb7ee7dc65c2fde8e8a |
|
MD5 | 99cd03176613cefd86d16667356defe3 |
|
BLAKE2b-256 | 69d28f88dea31ad5f2df8e63aa75728823e460a863c9075299b904a463c5e3d9 |