如何查询抢占式实例近 30 天内的历史价格

本篇文章给大家带来的内容是关于如何查询抢占式实例近 30 天内的历史价格,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。

DescribeSpotPriceHistory

请求参数

微信截图_20180920092836.png

微信截图_20180920092852.png

返回参数

微信截图_20180920092859.png

示例

请求示例

算家云 算家云

高效、便捷的人工智能算力服务平台

算家云 228 查看详情 算家云
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...
&<公共请求参数>

返回示例

XML 格式

<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 格式

{
    "RequestId":"xxxxxxxxxxxxxx",
    "NextOffset":1000,
    "SpotPrices":
    {
        "SpotPriceType":[
        {
            "IoOptimized":"none",
            "OriginPrice":0.028,
            "NetworkType":"classic",
            "Timestamp":&quot;2017-09-18T11:00:00Z",
            "ZoneId":"cn-hangzhou-c","SpotPrice":0.006,
            "InstanceType":"ecs.t1.xsmall"
            }
        ]
    }
}

错误码

以下为本接口特有的错误码。更多错误码,请访问 API 错误中心。

微信截图_20180920092908.png

以上就是如何查询抢占式实例近 30 天内的历史价格的详细内容,更多请关注其它相关文章!

本文转自网络,如有侵权请联系客服删除。