Skip to content

Commit

Permalink
Fixed the pricing filter (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma authored Oct 10, 2024
1 parent e4723d0 commit 7abe769
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ def get_ec2_price(self, region_name: str, instance_type: str, operating_system:
service_code = 'AmazonEC2'
filter_dict = [
{"Field": "regionCode", "Value": region_name, "Type": "TERM_MATCH"},
{'Type': 'TERM_MATCH', 'Field': 'servicecode', 'Value': 'AmazonEC2'},
{"Field": "tenancy", "Value": "shared", "Type": "TERM_MATCH"},
{"Field": "operatingSystem", "Value": f"{operating_system_value}", "Type": "TERM_MATCH"},
{"Field": "instanceType", "Value": f"{instance_type}", "Type": "TERM_MATCH"},
{"Field": "capacitystatus", "Value": "Used", "Type": "TERM_MATCH"},
{'Type': 'TERM_MATCH', 'Field': 'capacitystatus', 'Value': 'Used'},
{'Type': 'TERM_MATCH', 'Field': 'preInstalledSw', 'Value': 'NA'},
]
unit_price = self._aws_pricing.get_service_pricing(service_code, filter_dict)
return round(unit_price, DEFAULT_ROUND_DIGITS)

0 comments on commit 7abe769

Please sign in to comment.