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.5.tar.gz
.
File metadata
- Download URL: az-account-switcher-0.0.5.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.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee784294aa24df354c330ab0d33a45aae87469fc18b15e7ae3b5a4e8624cfc43 |
|
MD5 | 8cb45f71da44030b7a714df0ac78f23f |
|
BLAKE2b-256 | 7273825e07d0a0aa2f94ff5933ba9f17e03b3c40e515bc3ef986a7d439f78c20 |
File details
Details for the file az_account_switcher-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: az_account_switcher-0.0.5-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.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 068896c4fdbc5defbb9fb7dbda912267ce28e3877255958d86459cf485ad87ef |
|
MD5 | 7a820cec4b1f182778c7c8879c02a6e1 |
|
BLAKE2b-256 | 0cb244bf0659c7b5f0303554c1c2645c0d5ff0248a39bd8d2100203ccea55dbb |