Home > Article > Operation and Maintenance > How to query the historical price of a preemptible instance in the past 30 days
The content of this article is about how to query the historical prices of preemptible instances in the past 30 days. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
DescribeSpotPriceHistory
Request Parameters
Return parameters
##Example
Request example
https://ecs.aliyuncs.com/?Action=DescribeSpotHistory &RegionId=cn-hangzhou &ZoneId=cn-hanghzhou-c &NetworkType=vpc &InstanceType=ecs.t1.xsmall &IoOptimized=none &UtcStartTime=2017-08-22T08:45:08Z... &<公共请求参数>
Return example
XML format
<DescribeSpotPriceHistoryResponse> <RequestId>xxxxxxxxxxxxxx</RequestId> <NextOffset>1000</NextOffset> <SpotPrices> <SpotPriceType> <IoOptimized>none</IoOptimized> <OriginPrice>0.028</OriginPrice> <NetworkType>classic</NetworkType> <Timestamp>2017-09-18T11:00:00Z</Timestamp> <ZoneId>cn-hangzhou-c</ZoneId> <SpotPrice>0.006</SpotPrice> <InstanceType>ecs.t1.xsmall</InstanceType> </SpotPriceType> <SpotPriceType> <IoOptimized>none</IoOptimized> <OriginPrice>0.028</OriginPrice> <NetworkType>classic</NetworkType> <Timestamp>2017-09-18T12:00:00Z</Timestamp> <ZoneId>cn-hangzhou-c</ZoneId> <SpotPrice>0.006</SpotPrice> <InstanceType>ecs.t1.xsmall</InstanceType> </SpotPriceType> </SpotPrices> </DescribeSpotPriceHistoryResponse>
JSON Format
{ "RequestId":"xxxxxxxxxxxxxx", "NextOffset":1000, "SpotPrices": { "SpotPriceType":[ { "IoOptimized":"none", "OriginPrice":0.028, "NetworkType":"classic", "Timestamp":"2017-09-18T11:00:00Z", "ZoneId":"cn-hangzhou-c","SpotPrice":0.006, "InstanceType":"ecs.t1.xsmall" } ] } }
Error code
The following are the error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to query the historical price of a preemptible instance in the past 30 days. For more information, please follow other related articles on the PHP Chinese website!