Member-only story
Extract Committed use discount details from Recommendation Hub
Committed use discounts are discounts applied to usage of compute engines in Google cloud when you purchase a committed contract of compute usage (vCPU, Memory) for period of 12 months or 36 months. This contract can be purchased for a single project or you can purchase multiple contracts which can be shared across all of the projects under your Org. The recommendation hub provides details on the committed use discounts you can get when you purchase these contracts. This post discusses on how to retrieve those committed use discount details from the google cloud recommender across all GCP Projects in an Org.
In my last post, we saw how to retrieve recommendation details across all projects, taking “google.compute.instance.machinetyperecommender” as an example. This post contains the code details on how to use “google.compute.commitment.UsageCommitmentRecommender” to retrieve committed use discount details.
The details of the script are given below
Step:1 — The shell script will create a csv file with the required headers for…