Queries the price of an image in Alibaba Cloud Marketplace.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ehpc:DescribeImagePrice |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageId |
string |
Yes |
The image ID. |
m-bp198jigq7l1ga11**** |
| PriceUnit |
string |
Yes |
The unit of the subscription duration. Valid values:
Default value: Day. |
Day |
| SkuCode |
string |
Yes |
The stock keeping unit (SKU) of the image. Valid value: package. |
package |
| Period |
integer |
Yes |
The subscription duration. Valid values:
Default value: 1. |
1 |
| Amount |
integer |
Yes |
The number of images to purchase. Valid values: 1 to 1000. Default value: 1. |
2 |
| OrderType |
string |
No |
The order type. Only purchase orders are supported. Valid value: INSTANCE-BUY. |
INSTANCE-BUY |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Amount |
integer |
The number of purchased images. |
1 |
| RequestId |
string |
The request ID. |
47ca3ac4-2a03-48f1-8bf2-ba6de0f3**** |
| DiscountPrice |
number |
The discount amount. |
0 |
| TradePrice |
number |
The final price of the image. |
0.8 |
| OriginalPrice |
number |
The original price of the image. |
0.8 |
| ImageId |
string |
The ID of the custom image. |
m-bp198jigq7l1ga11**** |
Examples
Success response
JSON format
{
"Amount": 1,
"RequestId": "47ca3ac4-2a03-48f1-8bf2-ba6de0f3****",
"DiscountPrice": 0,
"TradePrice": 0.8,
"OriginalPrice": 0.8,
"ImageId": "m-bp198jigq7l1ga11****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
| 500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
| 404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API call error. %s |
| 406 | DbError | A database service error occurred. | Database request failed. |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | Alibaba Cloud product error. %s |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.