acoustic-easter-27534
01/04/2023, 11:00 AMlittle-author-61621
volumeApiName
to find the storage costs (https://github.com/infracost/infracost/blob/master/internal/resources/aws/ebs_volume.go#L106)prehistoric-airport-41434
03/01/2023, 6:57 PMgp2
as value for key volumeApiName
but seems to have given wrong value. Extra configurations includes IOPS, Throughput and size for EBS in our scenario. Could You help with this case?little-author-61621
prehistoric-airport-41434
03/02/2023, 4:57 AM<https://pricing.api.infracost.io/graphql>
HEADER=
{
"X-Api-Key": "<API_KEY>",
"content-type": "application/json"
}
Present PAYLOAD=
{"query": "{ products(filter: {vendorName: "aws", service: "AmazonEC2", region: "us-east-1", attributeFilters: [
{key: "instanceType", value: <instance_type>},
{key: "preInstalledSw", value: "NA"},
{key: "tenancy", value: "Shared"},
]
}) { prices(filter: {purchaseOption: <"spot"/"ondemand">
}) { USD
}
}
} "
}
We intend to add in attributeFilters:
{key: "volumeApiName", value: "gp3"},
Along with this we intend to add
IOPS, Throughput and size for EBS also.acoustic-easter-27534
03/02/2023, 5:05 AMlittle-author-61621
Storage
productFamily, e.g:
query {
products(filter: {
vendorName: "aws",
service: "AmazonEC2"
region: "us-east-1"
productFamily: "Storage"
attributeFilters: [
{key: "volumeApiName", value: "gp3"}
]
}) {
attributes {
key, value
}
prices {
USD
}
}
}
prehistoric-airport-41434
03/03/2023, 3:29 AM{'data': {'products': [{'attributes': [{'key': 'location', 'value': 'US East (N. Virginia)'}, {'key': 'operation', 'value': ''}, {'key': 'usagetype', 'value': 'EBS:VolumeUsage.gp3'}, {'key': 'regionCode', 'value': 'us-east-1'}, {'key': 'volumeType', 'value': 'General Purpose'}, {'key': 'servicecode', 'value': 'AmazonEC2'}, {'key': 'servicename', 'value': 'Amazon Elastic Compute Cloud'}, {'key': 'locationType', 'value': 'AWS Region'}, {'key': 'storageMedia', 'value': 'SSD-backed'}, {'key': 'maxIopsvolume', 'value': '16000'}, {'key': 'maxVolumeSize', 'value': '16 TiB'}, {'key': 'volumeApiName', 'value': 'gp3'}, {'key': 'maxThroughputvolume', 'value': '1000 MiB/s'}], 'prices': [{'USD': '0.0800000000'}]}]}}
little-author-61621
query {
products(filter: {
vendorName: "aws",
service: "AmazonEC2"
region: "us-east-1"
productFamily: "System Operation"
attributeFilters: [
{key: "volumeApiName", value: "gp3"}
{key: "groupDescription", value: "IOPS"}
]
}) {
attributes {
key, value
}
prices {
USD
}
}
}
Throughput:
query {
products(filter: {
vendorName: "aws",
service: "AmazonEC2"
region: "us-east-1"
productFamily: "Provisioned Throughput"
attributeFilters: [
{key: "volumeApiName", value: "gp3"},
]
}) {
attributes {
key, value
}
prices {
USD
}
}
}
prehistoric-airport-41434
03/03/2023, 10:47 AMlittle-author-61621
query {
storage: products(filter: {
vendorName: "aws",
service: "AmazonEC2"
region: "us-east-1"
productFamily: "Storage"
attributeFilters: [
{key: "volumeApiName", value: "gp3"}
]
}) {
attributes {
key, value
}
prices {
USD
}
},
iops: products(filter: {
vendorName: "aws",
service: "AmazonEC2"
region: "us-east-1"
productFamily: "System Operation"
attributeFilters: [
{key: "volumeApiName", value: "gp3"},
{key: "groupDescription", value: "IOPS"}
]
}) {
attributes {
key, value
}
prices {
USD
}
}
throughput: products(filter: {
vendorName: "aws",
service: "AmazonEC2"
region: "us-east-1"
productFamily: "Provisioned Throughput"
attributeFilters: [
{key: "volumeApiName", value: "gp3"},
]
}) {
attributes {
key, value
}
prices {
USD
}
}
}
prehistoric-airport-41434
03/04/2023, 4:44 AMaf-south-1
? Except this region, I am able to get cost for others.
Query:
'{ products(filter: {vendorName: "aws", service: "AmazonEC2", region: "af-south-1", attributeFilters: [{key: "instanceType", value: "c6g.16xlarge"}, {key: "operatingSystem", value: "Linux"}, {key: "tenancy", value: "Shared"}, {key: "capacitystatus", value: "Used"}, {key: "preInstalledSw", value: "NA"}]}) { prices(filter: {purchaseOption: "on_demand"}) { USD } } } '}
URL:
"<https://pricing.api.infracost.io/graphql>"
little-author-61621
prehistoric-airport-41434
03/09/2023, 2:44 PM