![](/img/trans.png)
[英]Boto3 get_products pricing returning 0.00 USD for some instance types
[英]Available filter for AWS boto3 Pricing API - get_products
我正在尝试获取不同 EC2 实例的定价。 我必须指定不同的过滤器才能获得最准确的价格。 例如,
import boto3
client = boto3.client('pricing')
response = client.get_products(
ServiceCode='string',
Filters=[
{
'Type': 'TERM_MATCH',
'Field': 'string',
'Value': 'string'
},
],
FormatVersion='string',
NextToken='string',
MaxResults=123
)
我想知道 EC2 实例的所有可用字段和值。 我无法在这方面找到任何东西,因此我们将不胜感激。
谢谢你们!
使用方法describe_services()和服务代码来获取所有可用属性。
使用方法get_attribute_values()获取属性值列表
来自描述 get_products() 的同一 API 文档的更多信息: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/pricing.html#pricing
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.