Get SKUs information from Google Cloud Billing API in BigQuery

109 views Asked by At

In Google CLoud, it's possible to export some pricing data from Cloud Billing to BigQuery... The structure of this pricing data export is displayed here. Among other things, there are some information regarding the "list of product categories that apply to the SKU" in a column called product_taxonomy.

| product_taxonomy | Array of Strings | List of product categories that apply to the SKU, such as Serverless, Cloud Run, TaskQueue, VMs On Demand, Cores: Per Core, and others.

But, in the billing API, there are other information regarding the SKUs that seems to be more detailed and easier to understand "Getting the list of SKUs for a service"

Especially in the key category:

    "category": {
        "serviceDisplayName": "[SVC_DISPLAY_NAME]",
        "resourceFamily": "[FAMILY]",
        "resourceGroup": "[GROUP]",
        "usageType": "[USAGE]",
    },

I have two questions:

  1. Is it possible to get the "SKU category" data directly in the "pricing data export" exported to BQ?
  2. Otherwise, what you be a good, eazy-to-maintain solution to fetch those data from the API in a BQ dataset so I can merge them with the "pricing data export"? This article proposes a method using Cloud Functions & Cloud Scheduler but I was wondering if there wasn't a more elegant solution?
0

There are 0 answers