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

这篇文章将为大家详细讲解有关查询抢占式实例近 30 天内历史价格的方法,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

DescribeSpotPriceHistory

请求参数

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

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

返回参数

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

示例

请求示例

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":"2017-09-18T11:00:00Z",
            "ZoneId":"cn-hangzhou-c","SpotPrice":0.006,
            "InstanceType":"ecs.t1.xsmall"
            }
        ]
    }
}

错误码

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

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

关于查询抢占式实例近 30 天内历史价格的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。