little-apple-76419
05/27/2025, 10:34 AMon_demand
instance though
Example Query:
query {
products(
filter: {
vendorName: "aws"
service: "AmazonEC2"
productFamily: "Compute Instance"
region: "us-east-1"
attributeFilters: [
{ key: "instanceType", value: "i7i.2xlarge" }
{ key: "operatingSystem", value: "Linux" }
{ key: "licenseModel", value: "No License required" }
{ key: "tenancy", value: "Shared" }
{ key: "capacitystatus", value: "Used" }
{ key: "preInstalledSw", value: "NA" }
]
}
) {
prices(filter: { purchaseOption: "spot" }) {
USD
}
}
}
what is the reason for this?little-apple-76419
05/27/2025, 6:20 PMswift-furniture-85673
05/27/2025, 7:38 PMlittle-apple-76419
05/28/2025, 3:26 AMlittle-author-61621
little-apple-76419
05/28/2025, 1:29 PM{
"data": {
"products": [
{
"prices": []
}
]
}
}
little-author-61621
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Api-Key: $INFRACOST_API_KEY" \
-d '{
"query": "query($productFilter: ProductFilter!, $priceFilter: PriceFilter) { products(filter: $productFilter) { region, prices(filter: $priceFilter) { priceHash USD } } }",
"variables": {
"priceFilter": {
"purchaseOption": "spot"
},
"productFilter": {
"vendorName": "aws",
"service": "AmazonEC2",
"productFamily": "Compute Instance",
"region": "us-east-1",
"attributeFilters": [
{
"key": "instanceType",
"value": "i7i.xlarge"
},
{
"key": "operatingSystem",
"value": "Linux"
},
{
"key": "licenseModel",
"value": "No License required"
},
{
"key": "tenancy",
"value": "Shared"
},
{
"key": "capacitystatus",
"value": "Used"
},
{
"key": "preInstalledSw",
"value": "NA"
}
]
}
}
little-apple-76419
05/28/2025, 3:25 PMlittle-author-61621