0

I try to understand deeply Google billing, especially the rules you follow.

Considering the case for "Managed Zones" on the Google Cloud Platform. According to the documentation "Managed Zones" in Google DNS is an hourly billing on a monthly basis

Managed zone pricing is calculated based on the number of managed zones that exist at a time, prorated by the percentage of the month they exist. This prorating is measured by hour. Zones that exist for a fraction of an hour are counted as having existed for the whole hour.

Google Cloud DNS – Pricing

However, according to "Cloud Billing Catalog API" the unit "services/FA26-5236-B8B5/skus/8C22-6FC3-D478" is billed per second on a monthly basis.

{
    "name": "services/FA26-5236-B8B5/skus/8C22-6FC3-D478",
    "skuId": "8C22-6FC3-D478",
    "description": "ManagedZone",
    "category": {
        "serviceDisplayName": "Cloud DNS",
        "resourceFamily": "Network",
        "resourceGroup": "DNS",
        "usageType": "OnDemand"
    },
    "serviceRegions": [
        "global"
    ],
    "pricingInfo": [
        {
            "summary": "",
            "pricingExpression": {
                "usageUnit": "mo",
                "usageUnitDescription": "month",
                "baseUnit": "s",
                "baseUnitDescription": "second",
                "baseUnitConversionFactor": 2505600,
                "displayQuantity": 1,
                "tieredRates": [
                    {
                        "startUsageAmount": 0,
                        "unitPrice": {
                            "currencyCode": "USD",
                            "units": "0",
                            "nanos": 200000000
                        }
                    },
                    {
                        "startUsageAmount": 25,
                        "unitPrice": {
                            "currencyCode": "USD",
                            "units": "0",
                            "nanos": 100000000
                        }
                    },
                    {
                        "startUsageAmount": 10000,
                        "unitPrice": {
                            "currencyCode": "USD",
                            "units": "0",
                            "nanos": 30000000
                        }
                    }
                ]
            },
            "aggregationInfo": {
                "aggregationLevel": "ACCOUNT",
                "aggregationInterval": "MONTHLY",
                "aggregationCount": 1
            },
            "currencyConversionRate": 1,
            "effectiveTime": "2020-02-07T17:41:49.051Z"
        }
    ],
    "serviceProviderName": "Google"
}

Field pricingInfo.0.pricingExpression.baseUnit mention s as base unit.

In this case, it seems to me that the documentation is inconsistent with the API response.

Does it interpret the API response incorrectly? If so, how to determine in a general way - through the API - what is the basic unit of measurement of usage for billing?

Adam Dobrawy
  • 1,145
  • 13
  • 14

1 Answers1

0

The document “Cloud DNS pricing” is the only valid reference document for the managed dns zones pricing and as per the document “ The Managed zone pricing is calculated based on the number of managed zones that exist at a time, prorated by the percentage of the month they exist. This prorating is measured by hour. Zones that exist for a fraction of an hour are counted as having existed for the whole hour.

The "Cloud Billing Catalog API" also mentioned the "baseUnitConversionFactor" which is Conversion factor for converting from price per usage_unit to price per base_unit. Please see the this document for details.

If you need any further assistance regarding the price calculation for your managed DNS , you may contact GCP sales representative.

rsalinas
  • 1,507
  • 8
  • 9
Sohail Alvi
  • 380
  • 1
  • 6
  • In other words, I can't get this information from the API? I'm interested in analyzing more services than just Google Cloud DNS, which was an example. The value of "baseUnitConversionFactor" in the case of "Managed Zons" is "2505600", which is equal to the number of seconds in 29 days, so this value in no way concerns to 1 hour "minimum measured period for billing of a resource", which I indicated in the question. – Adam Dobrawy Feb 14 '20 at 01:10