我正在使用API获取ec2现货价格历史记录,但是除了最近90天左右,我什么也无法获取,也无法指定观察频率。有没有一种方法可以获取完整的现货价格历史记录,最好是每分钟或每小时一次?
最佳答案
尽管没有为DescribeSpotPriceHistory API操作明确记录,但至少对于AWS Management Console(依次使用该API)提到了此限制,请参见Viewing Spot Price History:
You can view the Spot Price history over a period from one to 90 days based on the instance type, the operating system you want the instance to run on, the time period, and the Availability Zone in which it will be launched.
同样,没有选项可以更改频率,因此您需要使用客户端代码进行每小时汇总。
关于amazon-ec2 - ec2现货完整价格历史记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14406579/