Git Product home page Git Product logo

azure-billing's Introduction

Azure Billing

This pulls a rate card and the usage data from a subscription for a specified period of time. Note that not all subscription types (most notably enterprise subscriptions) are not supported by this API.

Usage

  1. Install Node.js and install dependencies (ie. npm install).
  2. Install the Azure CLI 2.0.
  3. Login using the Azure CLI.
  4. Select the appropriate subscription using the Azure CLI.
  5. Look in the Azure portal under "Subscriptions" to get the offer type of the subscription (this is not currently exposed by API).
  6. Run the application.

Example:

az login
az account set --subscription 1111111-2222-3333-4444-555555555555
node billing --offer MS-AZR-0036P --from 2018-04-30 --to 2018-05-02

Notes

  • The parameters "offer", "from", and "to" are all required.
  • A rate card can take several minutes to download so it is saved as ".rates" and then that saved file is used. You must delete it to pull new rates.
  • The API queries the data set by when entries are reported but aggregates the data by when they were used. Due to this discrepency, this tool fetches data 1 day before and 2 days after you requested by report date and then filters to the usage dates.

azure-billing's People

Contributors

plasne avatar

Watchers

 avatar

Forkers

jicecold

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.