【发布时间】:2016-12-07 01:56:22
【问题描述】:
是否有机会在不解析此页面https://aws.amazon.com/ec2/spot/pricing/ 的情况下以编程方式收集 AWS Spot Blocks for Defined-Duration 的价格?
在boto3中拥有这个能力会很神奇,可能是这个 http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.Client.describe_spot_price_history方法可以吗?
【问题讨论】:
-
是的,
describe_spot_pricing就是这样做的,但更详细。请问您有什么问题? -
你的意思是 describe_spot_price_history() ?但它只返回实例点的价格,而不是定义持续时间点的价格,即更高的近似值。 5-6 次。
-
抱歉,我无法理解您的问题。
-
好的,让我们看看这个页面aws.amazon.com/ec2/spot/pricing,在“现货实例”选项卡中,您可以看到价格列表,这与我们可以使用 describe_spot_price_history() 获取的价格相同。但我想从“为 Linux 定义的持续时间”选项卡中获取价格。
标签: python amazon-ec2 boto3