调用DescribePrice查询云服务器ENS资源的最新价格。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:DescribePrice |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceType |
string |
是 |
实例规格。 |
ens.sn1.tiny |
| EnsRegionId |
string |
是 |
节点 ID。 |
cn-shanghai-unicom |
| Period |
integer |
是 |
购买资源的时长。
|
1 |
| SystemDisk.Size |
integer |
是 |
系统盘大小,单位:GB |
20 |
| Quantity |
integer |
是 |
数量。 |
1 |
| DataDisk.1.Size |
integer |
否 |
数据盘大小,单位 GB。如果此字段不为空,则以此段为准。 |
50 |
| InternetChargeType |
string |
是 |
ENS 带宽计费方式。取值:
|
95BandwidthByMonth |
| DataDisks |
array<object> |
否 |
如果 DataDisk.1.Size 为空且本字段不为空时的则以本字段为准。 |
|
|
object |
否 |
|||
| Category |
string |
否 |
磁盘类型 |
cloud_efficiency |
| Size |
integer |
否 |
数据盘大小,单位:GB。 |
50 |
| PeriodUnit |
string |
否 |
查询云服务器 ENS 不同计费周期的价格。取值范围:
|
Month |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| PriceInfo |
object |
价格信息列表。 |
|
| Price |
object |
价格信息。 |
|
| Currency |
string |
币种。
|
USD |
| DiscountPrice |
number |
折扣。 |
1 |
| OriginalPrice |
number |
原价。 |
16125.00 |
| TradePrice |
number |
交易价格。 |
126.75 |
| RequestId |
string |
请求 ID。 |
694EB8FF-446C-5B1E-8146-9629E492551F |
示例
正常返回示例
JSON格式
{
"PriceInfo": {
"Price": {
"Currency": "USD",
"DiscountPrice": 1,
"OriginalPrice": 16125,
"TradePrice": 126.75
}
},
"RequestId": "694EB8FF-446C-5B1E-8146-9629E492551F"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter | The input parameter that is mandatory for processing this request is not supplied. | |
| 400 | InstanceIdNotFound | The input parameter instancdId that is not found. | 指定的实例ID不存在。 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter | The input parameter is Invalid. | |
| 400 | StockNotEnough | The specified configuration is unavailable. Reconfigure and try again. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | |
| 400 | CallInterface | Call Interface Happen Error. | 接口调用出错。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。