Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
Please provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible please provide a summary of what steps or workarounds you have already tried, and any docs or articles you found (un)helpful.
Problem you have encountered:
I'm trying to pull back OnDemand CPU prices for the n2d instance type across all regions using the cloud billing API.
I'm pulling the list using
but it's missing some prices e.g. N2D OnDemand CPU pricing for europe-west1
Using the online calculator (https://cloud.google.com/products/calculator ) I can see pricing for the region so I know that instance type is available
We would like to be able to query one instance type prices for all regions in one query in GCP .
What you expected to happen:
I expected to get all the prices for one type of instances for all regions
Steps to reproduce: I have tried the following : 1) curl -X GEThttps://cloudbilling.googleapis.com/v1/services/6F81-5844-456A/skus?key= <KEY>" | jq -r '.skus[] | select(.description | contains("N2")) | {skuId, description, region: .serviceRegions[], usageType: .category.usageType , priceUSD: (.pricingInfo[].pricingExpression.tieredRates[].unitPrice.nanos * 0.000000001), resourceGroup: .category.resourceGroup} | "(.skuId),(.region),(.resourceGroup),(.usageType),(.priceUSD)" ' > gcp.n2.skus.csv
"
"https://cloudbilling.googleapis.com/v1/services/6F81-5844-456A/skus?key= <KEY>"
I have used the following document as a reference :https://cloud.google.com/billing/docs/how-to/get-pricing-information-api#curl_1
Other information (workarounds you have tried, documentation consulted, etc):
IN AWS we are using the following command and we are getting what we need, We would like a similar approch in GCP : aws pricing get-products
--service-code AmazonEC2
--filters Type=TERM_MATCH,Field=instanceType,Value=m6i.2xlarge
Type=TERM_MATCH,Field=productFamily,Value='Compute Instance' Type=TERM_MATCH,Field=tenancy,Value=Shared Type=TERM_MATCH,Field=operatingSystem,Value=Linux Type=TERM_MATCH,Field=capacityStatus,Value=Used Type=TERM_MATCH,Field=operation,Value=RunInstances
--region us-east-1 --max-results=100
--output json