調用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. | 介面調用出錯。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。