Queries the fees that you must pay when you create, upgrade, or renew an ApsaraDB for Redis instance.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
kvstore:DescribePrice |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Capacity | long | No | The storage capacity of the instance. Unit: MB. This parameter is used only to query ApsaraDB for Redis Community Edition instances that are deployed in classic mode. We recommend that you use the InstanceClass parameter to specify an exact instance type. Note
If you specify the InstanceClass parameter, you do not need to specify the Capacity parameter.
| 1024 |
InstanceClass | string | No | The instance type.**** To view the instance type, perform the following steps:
When you query cloud-native cluster instances, you must set this parameter to one of the following values and use the Instances parameter to specify the instance type that you want to query.
| redis.master.small.default |
OrderType | string | Yes | The order type. Valid values:
| BUY |
ZoneId | string | No | The zone ID of the instance. You can call the DescribeZones operation to query the most recent zone list. | cn-hangzhou-e |
ChargeType | string | No | The billing method of the instance. Valid values:
| PostPaid |
NodeType | string | No | The node type. Valid values:
| MASTER_SLAVE |
Period | long | No | The subscription duration. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. | 3 |
Quantity | long | No | The number of instances that you want to purchase. Valid values: 1 to 30. Default value: 1. | 1 |
InstanceId | string | No | The instance ID. Note
This parameter is required when the OrderType parameter is set to UPGRADE or RENEW.
| r-bp1zxszhcgatnx**** |
Instances | string | No | A JSON string that contains information about one or more cloud-native cluster instances. For more information, see the "Additional description of the Instances parameter" section of this topic. | Instances=[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default","Period": "1","Quantity": "1","Capacity": "4096"}] |
BusinessInfo | string | No | The extended information such as the promotional event ID and business information. | 000000000000 |
CouponNo | string | No | The coupon code. Default value: youhuiquan_promotion_option_id_for_blank. This value indicates that no coupon code is available. | youhuiquan_promotion_option_id_for_blank |
ForceUpgrade | boolean | No | Specifies whether to forcefully change the configurations of the instance. Valid values:
| true |
OrderParamOut | string | No | Specifies whether to return parameters related to the order. Valid values:
| true |
Additional description of the Instances parameter
The following description applies only to the Instances parameter of the DescribePrice operation.
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
InstanceId | String | No | r-7xv4s7q131smyx**** | The ID of the instance. This parameter is required if the OrderType parameter is set to UPGRADE or RENEW. |
Capacity | Long | Yes | 16384 | The storage capacity of the instance. Unit: MB.Description: You must specify either this parameter or InstanceClass. |
InstanceClass | String | Yes | redis.master.small.default | The instance type. For more information, see Overview . |
IzNo | String | Yes | cn-hangzhou-b | The zone ID. |
NodeType | String | No | MASTER_SLAVE | The node type. Valid values:
|
Period | Long | No | 1 | The subscription duration. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. |
Quantity | String | No | 1 | The number of instances that you want to purchase. Valid values: 1 to 30. Default value: 1. |
VPCId | String | No | vpc-bp1nme44gek34slfc**** | The VPC ID. |
VSwitchId | String | No | vsw-bp1e7clcw529l773d**** | The vSwitch ID. |
AutoPay | String | No | true | Specifies whether to enable automatic payment. Valid values:
|
InstanceName | String | No | test_123 | The instance name. |
ShardClass | String | No | tair.rdb.2g | The shard type. This parameter is applicable only to cloud-native cluster instances. |
ShardCount | String | No | 2 | The number of shards. This parameter is applicable only to cloud-native cluster instances. You can use this parameter to customize the number of shards. |
ReadOnlyCount | Integer | No | 2 | The total number of read replicas. This parameter is applicable only to read/write splitting instances that use cloud disks. |
Sample requests with Instances configured
Sample request for querying a Tair cloud-native cluster instance:
{
"RegionId": "cn-hangzhou",
"OrderType": "BUY",
"ChargeType": "PostPaid",
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-h", "ShardClass": "tair.rdb.with.proxy.2g", "ShardCount": "3", "Period": "1","Quantity": "1"}]",
"ZoneId": "cn-hangzhou-h",
"SourceIp": "192.168.0.1"
}
Sample request for querying multiple instances:
{
"RegionId": "cn-hangzhou",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default","Period": "1","Quantity": "1"}{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.amber.logic.sharding.1g.2db.0rodb.6proxy.multithread","Period": "1","Quantity": "1"}]",
"SourceIp": "192.168.0.1"
}
Response parameters
Examples
Sample success responses
JSON
format
{
"OrderParams": "String",
"RequestId": "3A40BE4E-1890-4972-889C-FEFA37663635",
"Order": {
"OriginalAmount": "0.21",
"HandlingFeeAmount": "0.1",
"Currency": "CNY",
"DiscountAmount": "0.21",
"TradeAmount": "10",
"Coupons": {
"Coupon": [
{
"IsSelected": "true",
"CouponNo": "youhuiquan_promotion_option_id_for_blank",
"Name": "test",
"Description": "coupondemo"
}
]
},
"RuleIds": {
"RuleId": [
"1001199213"
]
},
"ShowDiscountInfo": true
},
"Rules": {
"Rule": [
{
"RuleDescId": 1111111111,
"Title": "test",
"Name": "test"
}
]
},
"SubOrders": {
"SubOrder": [
{
"OriginalAmount": "0.21",
"InstanceId": "r-bp1xxxxxxxxxxxxx",
"DiscountAmount": "0.21",
"TradeAmount": "10",
"RuleIds": {
"RuleId": [
"RuleId: 1111111111"
]
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | MissingParameter | Period is mandatory for this action. |
400 | MissingParameter | InstanceId is mandatory for this action. |
400 | InvalidInstances.Format | The Specified parameter Instances is not valid. |
400 | AlreadyHadTemporaryBandwidth | This instance have already had temporary bandwidth, please modify instance spec first. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2023-09-18 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||
|