The official documentation states that the Cloud Billing Catalog API is available for use:
Get a list of all available SKUs for a service, such as:
The SKU's human accessible description.
The SKU's retail price.
locations where the SKU can be purchased.
information on the SKU's categories.
a case in point
Request:
GET https://cloud.google.com/billing/v1/how-tos/catalog-api
Where SERVICE_ID is the identifier of the parent service.
Response:
{
"skus": [
{
"name": "[SKU_NAME]",
"skuId": "[SKU_ID]",
"description": "[SKU_DESCRIPTION]",
"category": {
"serviceDisplayName": "[SVC_DISPLAY_NAME]",
"resourceFamily": "[FAMILY]",
"resourceGroup": "[GROUP]",
"usageType": "[USAGE]",
},
"serviceRegions": [
"[REGION]"
],
"pricingInfo": [
{
"effectiveTime": "[TIME]",
"summary": "[SUMMARY]",
"pricingExpression": {
"usageUnit": "[UNIT]",
"usageUnitDescription": "[UNIT_DESCRIPTION]",
"displayQuantity": [DISPLAY_QUANTITY],
"tieredRates": [
{
"startUsageAmount": [START_AMOUNT],
"unitPrice": {
"currencyCode": "[CURRENCY_CODE]",
"units": [UNITS],
"nanos": [NANOS],
},
}
],
},
"aggregationInfo": {
"aggregationLevel": enum("[AGGREGATION_LEVEL]"),
"aggregationInterval": enum("[AGGREGATION_INTERVAL]"),
"aggregationCount": [AGGREGATION_COUNT],
},
"currencyConversionRate": [CONVERSION_RATE],
}
],
"serviceProviderName": "[SERVICE_PROVIDER]",
}
]
}
You should employ the following answer objects in response to your query:
The abbreviation [UNIT] stands for the unit of consumption for which the pricing is provided. Usage is stated in "Gibibytes," for instance, if usage unit of GiBy is used.
The suggested number of units for showing pricing information is [DISPLAY QUANTITY]. It is advised to display (unitPrice * displayQuantity) per display quantity usageUnit when displaying pricing information. This field is just used for display purposes and has no bearing on the price formula. For instance, if the usage unit is "GB," the unitPrice is "0.0001 USD," and the display quantity is "1000," the suggested way to display the pricing information is "0.10 USD per 1000 GB."
I hope this helps!
Join our GCP Certification online program and learn about google price calculator API in detail.
Thanks!