调用DescribeImagePrice查询E-HPC支持的镜像市场的镜像价格。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeImagePrice

系统规定参数。取值:DescribeImagePrice

Amount Integer 2

购买数量。取值范围:1~1000

默认值:1

ImageId String m-bp198jigq7l1ga11****

镜像ID。

Period Integer 1

购买时长。取值范围:

  • 当参数PriceUnit取值为Month时:1~9
  • 当参数PriceUnit取值为Year时:1~3
  • 当参数PriceUnit取值为Week时:1~4
  • 当参数PriceUnit取值为Hour时:1

默认值:1

PriceUnit String Month

购买时长的单位。取值范围:

  • Month:月
  • Year:年
  • Hour:小时
  • Week:周

默认值:Hour

SkuCode String ECS

商品规格码。取值范围:

-ECS:按量付费

-package:预付费

OrderType String instance-buy

订单类型,仅支持设置为商品购买。取值:instance-buy

返回数据

名称 类型 示例值 描述
Amount Integer 1

购买数量。

DiscountPrice Float 0

折扣。

ImageId String m-bp198jigq7l1ga11****

镜像ID。

OriginalPrice Float 0.8

原价。

RequestId String 47ca3ac4-2a03-48f1-8bf2-ba6de0f3fd5a

请求ID。

TradePrice Float 0.8

交易价格。

示例

请求示例

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=DescribeImagePrice
&Amount=2
&ImageId=m-bp198jigq7l1ga11****
&Period=1
&PriceUnit=Month
&SkuCode=ECS
&<公共请求参数>

正常返回示例

XML格式

<DescribeImagePriceResponse>
      <OriginalPrice>0.8</OriginalPrice>
      <RequestId>47ca3ac4-2a03-48f1-8bf2-ba6de0f3fd5a</RequestId>
      <DiscountPrice>0</DiscountPrice>
      <Amount>1</Amount>
      <ImageId>m-bp198jigq7l1ga11****</ImageId>
      <TradePrice>0.8</TradePrice>
</DescribeImagePriceResponse>

JSON格式

{
    "DescribeImagePrice": {
    "OriginalPrice":"0.8",
    "RequestId":"47ca3ac4-2a03-48f1-8bf2-ba6de0f3fd5a",
    "DiscountPrice":"0",
    "Amount":"1",
    "ImageId":"m-bp198jigq7l1ga11****",
    "TradePrice":"0.8"
    }
}

错误码

HttpCode 错误码 错误信息 描述
503 ServiceUnavailable The request has failed due to a temporary failure of the server 请求失败,服务暂时不可用

访问错误中心查看更多错误码。