Now Get Programmatic Access to your Billing Data With the New Billing API

Now Get Programmatic Access to your Billing Data With the New Billing API

Tools for monitoring, analyzing and optimizing cost have become an important part of managing cloud services. But these tools are difficult to build if the usage data is only in the Google Cloud Console. We are happy to announce a solution to this problem. The Billing Export feature addresses this need, and it is available in Preview.
Once enabled, your daily Google Cloud Platform usage and cost estimates will be exported automatically to a CSV or JSON file stored in a Google Cloud Storage bucket you specify. You can then access the data via theCloud Storage API, CLI tool or Cloud Console file browser. Usage data is labelled with project Number and resource type. You have full control of who can access this data via ACLs on your Cloud Storage bucket.

"Billing Export is a great new feature of Google Cloud Platform. It allows us to analyze the detailed usage of all our cloud projects in one place and optimize our costs. It also gives us a great tool to monitor our applications over time and understand trends in our usage" said Dave Tucker, Director of Platform Development, WebFilings.
You can manage Billing Export from Cloud Console.

View of the cloud Storage bucket after enabling billing export

As you can see in the example output below, your billing data appears in simple JSON displaying all the important attributes such as service name, date, project number, measurement and cost.


[ {

  "lineItemId" : "com.google.cloud/services/compute-engine/StoragePdCapacity",

  "startTime" : "2013-11-02T00:00:00-07:00",

  "endTime" : "2013-11-03T00:00:00-07:00",

  "projectNumber" : "176782591794",

  "measurements" : [ {

    "measurementId" : "com.google.cloud/services/compute-engine/StoragePdCapacity",

    "sum" : "66325032468480000",

    "unit" : "byte-seconds"

  } ],

  "cost" : {

    "amount" : "2.383101",

    "currency" : "USD"

  }

}, {

  "lineItemId" : "com.google.cloud/services/compute-engine/VmimageN1Highcpu_8",

  "startTime" : "2013-11-02T00:00:00-07:00",

  "endTime" : "2013-11-03T00:00:00-07:00",

  "projectNumber" : "176782591794",

  "measurements" : [ {

    "measurementId" : "com.google.cloud/services/compute-engine/VmimageN1Highcpu_8",

    "sum" : "44220",

    "unit" : "seconds"

  } ],

  "cost" : {

    "amount" : "6.4119",

    "currency" : "USD"

  }

} ]


We would love to hear your feedback and cool ideas on how to improve Google Cloud Platform billing experience.
-Posted by Rae Wang, Product Manager

Source http://googlecloudplatform.blogspot.com/2013/12/ow-get-programmatic-access-to-your-billing-data-with-new-billing-api.html

Previous Post
Next Post

post written by:

0 Comments: