Queries the pricing information of a cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribePrice |
The operation that you want to perform. Set the value to DescribePrice. |
PriceUnit | String | Yes | Hour |
The billing cycle of the Elastic Compute Service (ECS) instances. This parameter takes effect only when the ChargeType parameter is set to PrePaid. Valid values:
Default value: Hour Valid values of N: 1 to 10 |
ChargeType | String | No | PostPaid |
The billing method of the ECS instances. Valid values:
Default value: PostPaid |
OrderType | String | No | instance-buy |
The type of the order. The order can be set only as a purchase order. Valid value: INSTANCE-BUY. |
Commodities.N.Amount | Integer | Yes | 2 |
The node quantity of the type. Valid values: 1 to 1000. Default value: 1 Valid values of N: 1 to 10 |
Commodities.N.SystemDiskSize | Integer | No | 40 |
The system disk size of the node. Unit: GB. Valid values: 40 to 500 Default value: 40 Valid values of N: 1 to 10 |
Commodities.N.SystemDiskPerformanceLevel | String | No | PL1 |
The performance level of the ESSD used as the system disk. This parameter takes effect only when the Commodities.N.SystemDiskCategory parameter is set to cloud_essd. Valid values:
Default value: PL1 Valid values of N: 1 to 10 |
Commodities.N.NodeType | String | Yes | Compute |
The type of the node. Valid values:
Valid values of N: 1 to 10 |
Commodities.N.SystemDiskCategory | String | No | cloud_ssd |
The system disk type of the node. Valid values:
Default value: cloud_efficiency Valid values of N: 1 to 10 |
Commodities.N.InternetChargeType | String | No | PayByBandwidth |
The EIP billing method of the node. Valid values:
Valid values of N: 1 to 10 |
Commodities.N.NetworkType | String | No | VPC |
The network type of the node. Valid value: VPC. Valid values of N: 1 to 10 |
Commodities.N.InstanceType | String | Yes | ecs.n1.tiny |
The instance type of the node. Valid values of N: 1 to 10 |
Commodities.N.Period | Integer | Yes | 1 |
The subscription duration of the node. Valid values:
Default value: 1 Valid values of N: 1 to 10 |
Commodities.N.InternetMaxBandWidthOut | Integer | No | 100 |
The maximum outbound public bandwidth of the node. Unit: Mbit/s. Valid values: 0 to 100 Default value: 0 Valid values of N: 1 to 10 |
Commodities.N.DataDisks.N.size | Integer | No | 40 |
The size of the data disk. Unit: GB. Valid values: 40 to 500 Default value: 40 Valid values of N: 0 to 4 |
Commodities.N.DataDisks.N.category | String | No | cloud_efficiency |
The type of the data disk. Valid values:
Default value: cloud_efficiency Valid values of N: 0 to 4 |
Commodities.N.DataDisks.N.deleteWithInstance | Boolean | No | true |
Specifies whether the data disk is released when the node is released. Valid values:
Default value: true Valid values of N: 0 to 4 |
Commodities.N.DataDisks.N.performanceLevel | String | No | PL1 |
The performance level of the ESSD used as the data disk. This parameter takes effect only when the Commodities.N.DataDisks.N.category parameter is set to cloud_essd. Valid values:
Default value: PL1 Valid values of N: 0 to 4 |
Commodities.N.DataDisks.N.encrypted | Boolean | No | false |
Specifies whether to encrypt the data disk. Valid values:
Default value: false Valid values of N: 0 to 4 |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TotalTradePrice | Float | 1258 |
The total price. Unit: USD |
RequestId | String | 54FF9025-2C2F-42EB-870D-0DF5B0ACF24E |
The ID of the request. |
Prices | Array of PriceInfo |
The array of cluster prices. If you query the prices of multiple nodes in the cluster, the sequence of the prices in the returned value of PriceInfo is the same as that of the nodes in the request parameters. For example, the first price in the value of PriceInfo is the price of the first node specified in the request parameters. |
|
PriceInfo | |||
OriginalPrice | Float | 1258 |
The original price of the image. Unit: USD |
NodeType | String | Compute |
The type of the node. Valid values:
|
Currency | String | CNY |
The currency that is used to measure the price. Valid values: USD |
TradePrice | Float | 1258 |
The final price. Unit: USD |
Examples
Sample requests
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=DescribePrice
&Commodities.1.Amount=2
&Commodities.1.InstanceType=ecs.n1.tiny
&Commodities.1.1odeType=compute
&Commodities.1.Period=1
&PriceUnit=Hour
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribePriceResponse>
<Prices>
<PriceInfo>
<OriginalPrice>1258</OriginalPrice>
<TradePrice>1258</TradePrice>
<Currency>CNY</Currency>
<NodeType>Compute</NodeType>
</PriceInfo>
</Prices>
<TotalTradePrice>1258</TotalTradePrice>
<RequestId>54FF9025-2C2F-42EB-870D-0DF5B0ACF24E</RequestId>
</DescribePriceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Prices" : {
"PriceInfo" : [ {
"OriginalPrice" : "1258",
"TradePrice" : "1258",
"Currency" : "CNY",
"NodeType" : "Compute"
} ]
},
"TotalTradePrice" : "1258",
"RequestId" : "54FF9025-2C2F-42EB-870D-0DF5B0ACF24E"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The error message returned because the following parameter is invalid: %s. |
404 | ClusterNotFound | The specified cluster does not exist. | The error message returned because the specified cluster does not exist. |
406 | EcsError | An error occurred while calling the ECS API operation. | The error message returned because the ECS API call has failed. |
406 | DbError | A database service error occurred. | The error message returned because the database request has failed. |
406 | AliyunError | An Alibaba Cloud product error occurred. | The error message returned because the operation has failed to call another Alibaba Cloud service. |
407 | NotAuthorized | You are not authorized by RAM for this request. | The error message returned because you are not authorized by RAM for this request. |
500 | UnknownError | An unknown error occurred. | The error message returned because an unknown error has occurred. Try again later. If the error persists, submit a ticket. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The error message returned because the request has failed. The service is temporarily unavailable. |
For a list of error codes, visit the API Error Center.