Home  >  Article  >  Operation and Maintenance  >  How to query the historical price of a preemptible instance in the past 30 days

How to query the historical price of a preemptible instance in the past 30 days

坏嘻嘻
坏嘻嘻Original
2018-09-20 09:35:282089browse

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

How to query the historical price of a preemptible instance in the past 30 days

How to query the historical price of a preemptible instance in the past 30 days

Return parameters

How to query the historical price of a preemptible instance in the past 30 days

##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.

How to query the historical price of a preemptible instance in the past 30 days

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn