How-To Guides
Azure CLI Authentication
- Install Azure CLI - Command line tool by specifing your attended OS.
- ensure your account have sufficient permission as
Billing Reader
orUsage Billing Contributor
to manage Azure billing. - Check installed package by:
az --version
- Authenticate using your Azure account:
az login
This will open the portal in your default browser to authenticate.
Check installed Python version
- Ensure you Python version is >= 3.12.3 by:
python --version
# Consider update Python version if less than 3
Install eraXplor
- Install eraxplor too by:
pip install eraXplor
How-To use
eraXplor-azure
have multiple arguments set with a default values -explained below-, Adjsut these arguments as required.
eraXplor-azure <--start-date [yyyy,MM,DD]> <--end-date [yyyy,MM,DD]> \
<--subscription_id [SUBSCRIPTION_ID]> \
<--granularity [Daily | Monthly]> \
<--output [FILE_NAME.CSV]>
For Windows/PowerShell users restart your terminal, and you may need to use the following command:
python3 -m eraXplor-azure
# Or
python -m eraXplor-azure
# to avoid using this command, apend the eraXplor to your paths.
# Normaly its under: C:\Users\<YourUser>\AppData\Local\Programs\Python\Python<version>\Scripts\
Note
Ensure you run the command in a place you have sufficient permission to replace file. The eraXport tool sorting cost reult into a CSV file, by default The CSV will replace for next run.
Argument Reference
--start-date
or-s
: (Optional) Default value set as three months before.--end-date
or-e
: (Optional) Default value set as Today date.--subscription_id
or-S
: (Optional) subscription id, Default value set to list all subscriptions with tags.--out
or-o
: (Optional) Default value set asaz_cost_report.csv
.--granularity
or-g
: (Optional) Default value set asMonthly
. The available options are (Monthly
,Daily
)