Menanyakan biaya yang dihasilkan oleh operasi seperti membuat, meningkatkan konfigurasi, atau memperpanjang instans ApsaraDB for Tair (kompatibel dengan Redis OSS).
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:DescribePrice |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID region. Anda dapat memanggil operasi DescribeRegions untuk menanyakan ID region. |
cn-hangzhou |
| Capacity |
integer |
No |
Kapasitas penyimpanan yang digunakan oleh instans, dalam MB. Parameter ini hanya berlaku untuk kueri instans mode penerapan klasik Redis Open-Source Edition. Kami menyarankan agar Anda menggunakan parameter InstanceClass untuk menentukan jenis instans secara tepat. Catatan
Setelah parameter InstanceClass ditentukan, Anda tidak perlu menentukan parameter ini. |
1024 |
| InstanceClass |
string |
No |
Menentukan jenis instans menggunakan kode InstanceClass. Langkah-langkah untuk menanyakan InstanceClass:
Catatan
Mengambil skenario kueri pembelian baru sebagai contoh, selain parameter kunci lainnya, Anda setidaknya harus meneruskan parameter berikut:
|
redis.master.small.default |
| OrderType |
string |
Yes |
Jenis pesanan. Nilai yang valid:
|
BUY |
| ZoneId |
string |
No |
ID zona. Anda dapat memanggil operasi DescribeZones untuk menanyakan ID zona. |
cn-hangzhou-e |
| SecondaryZoneId |
string |
No |
ID zona sekunder. Anda dapat memanggil operasi DescribeZones untuk menanyakan ID zona sekunder. Catatan
Nilai parameter ini tidak boleh sama dengan nilai parameter ZoneId. |
cn-hangzhou-g |
| ChargeType |
string |
No |
Metode penagihan. Nilai yang valid:
|
PostPaid |
| NodeType |
string |
No |
Jenis node. Nilai yang valid:
|
MASTER_SLAVE |
| Period |
integer |
No |
Durasi berlangganan, dalam bulan. Nilai yang valid: 1 hingga 9, 12, 24, dan 36. |
3 |
| Quantity |
integer |
No |
Jumlah instans yang akan dibeli. Nilai yang valid: 1 hingga 30. Nilai default: 1. |
1 |
| InstanceId |
string |
No |
ID instans. Catatan
Parameter ini diperlukan ketika OrderType disetel ke UPGRADE atau RENEW. |
r-bp1zxszhcgatnx**** |
| Instances |
string |
No |
Anda harus meneruskan parameter ini ketika menanyakan instans arsitektur read/write splitting cloud-native, instans Tair ESSD, atau beberapa instans dengan spesifikasi yang berbeda. Nilainya adalah string berformat JSON. Untuk informasi selengkapnya, lihat Deskripsi tambahan parameter Instances di bawah. |
[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","ShardClass": "tair.scm.with.proxy.standard.2m.8d","ShardCount": "3","Period": "1","Quantity": "1"}] |
| BusinessInfo |
string |
No |
Informasi tambahan seperti ID aktivitas dan informasi bisnis. |
000000000000 |
| CouponNo |
string |
No |
Kode kupon. Nilai default: youhuiquan_promotion_option_id_for_blank, yang menunjukkan bahwa tidak ada kode kupon yang digunakan. |
youhuiquan_promotion_option_id_for_blank |
| ForceUpgrade |
boolean |
No |
Menentukan apakah akan memaksa perubahan konfigurasi. Nilai yang valid:
|
true |
| OrderParamOut |
string |
No |
Menentukan apakah akan mengembalikan parameter pesanan. Nilai yang valid:
|
true |
| ShardCount |
integer |
No |
Jumlah node shard data dalam instans klaster cloud-native. |
2 |
| EngineVersion |
string |
No |
Versi engine instans Redis. Nilai yang valid: 2.8, 4.0, dan 5.0. |
5.0 |
Deskripsi tambahan parameter Instances
Deskripsi berikut hanya berlaku untuk parameter Instances dari operasi DescribePrice dan tidak berlaku untuk operasi lain.
| Nama | Jenis | Wajib | Contoh | Deskripsi |
|---|---|---|---|---|
| RegionId | String | Ya | cn-hangzhou | ID region. |
| InstanceId | String | Tidak | r-7xv4s7q131smyx**** | ID instans. Parameter ini diperlukan ketika OrderType disetel ke UPGRADE atau RENEW. |
| InstanceClass | String | Ya | redis.master.small.default | Jenis instans dari instans klasik. Untuk informasi selengkapnya, lihat Navigator Kueri Spesifikasi. |
| ShardClass | String | Ya | tair.rdb.2g | Jenis instans dari instans cloud-native. Untuk informasi selengkapnya, lihat Navigator Kueri Spesifikasi. Salah satu dari parameter ini dan InstanceClass harus ditentukan. |
| IzNo | String | Tidak | cn-hangzhou-b | ID zona. |
| NodeType | String | Tidak | MASTER_SLAVE | Jenis node. Nilai yang valid:
|
| Period | Long | Tidak | 1 | Durasi berlangganan, dalam bulan. Nilai yang valid: 1 hingga 9, 12, 24, dan 36. |
| Quantity | String | Tidak | 1 | Jumlah instans yang akan dibeli. Nilai yang valid: 1 hingga 30. Nilai default: 1. |
| VPCId | String | Tidak | vpc-bp1nme44gek34slfc**** | ID VPC. |
| VSwitchId | String | Tidak | vsw-bp1e7clcw529l773d**** | ID vSwitch. |
| AutoPay | String | Tidak | true | Menentukan apakah akan mengaktifkan pembayaran otomatis. Nilai yang valid:
|
| InstanceName | String | Tidak | test_123 | Nama instans. |
| ShardCount | String | Tidak | 2 | Jumlah node shard. Nilai default: 1. Parameter ini tidak diperlukan ketika menanyakan instans arsitektur standar atau arsitektur read/write splitting. Parameter ini hanya berlaku untuk kueri instans arsitektur klaster cloud-native. Anda dapat menggunakan parameter ini untuk menyesuaikan jumlah shard. |
| ReadOnlyCount | Integer | Tidak | 2 | Jumlah total node hanya-baca. Parameter ini hanya berlaku untuk membuat instans arsitektur read/write splitting cloud-native. |
| StorageType | String | Tidak | essd_pl2 | Jenis penyimpanan dari jenis disk Tair ESSD. Nilai yang valid: essd_pl0, essd_pl1, essd_pl2, dan essd_pl3. Ketika parameter ini ditentukan, Anda juga harus menentukan Capacity sebagai kapasitas disk kustom. Untuk informasi selengkapnya, lihat Spesifikasi instans berbasis disk. |
| Capacity | Long | Tidak | 512000 | Kapasitas disk dari jenis disk Tair ESSD. Unit: MB. |
Contoh parameter permintaan
Contoh menanyakan pembelian baru arsitektur klaster cloud-native Tair (parameter Instances tidak diperlukan dalam skenario ini):
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.2g",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"ShardCount": 3
}
Contoh menanyakan pembelian baru jenis disk Tair ESSD dengan jenis penyimpanan kustom:
{
"RegionId": "cn-hangzhou",
"OrderType": "BUY",
"ChargeType": "PostPaid",
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-h", "ShardClass": "tair.essd.standard.2xlarge", "ShardCount": "1","Capacity": "512000","StorageType": "essd_pl2"}]",
}
Contoh menanyakan pembelian baru arsitektur read/write splitting cloud-native Tair:
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.2g",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","ShardClass":"tair.rdb.with.proxy.2g","ReadOnlyCount":"2"}]"
}
Contoh permintaan untuk menanyakan pembelian baru beberapa instans:
{
"RegionId": "cn-hangzhou",
"OrderType": "BUY",
"ChargeType": "PrePaid",
"Period": 1,
"Instances": "[{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.master.small.default"}{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","InstanceClass": "redis.amber.logic.sharding.1g.2db.0rodb.6proxy.multithread"}{"RegionId": "cn-hangzhou","ZoneId": "cn-hangzhou-b","ShardClass":"tair.rdb.with.proxy.2g","ShardCount":"3"}]"
}
Contoh menanyakan perpanjangan arsitektur klaster cloud-native Tair (parameter Instances tidak diperlukan dalam skenario ini):
{
"RegionId": "cn-hangzhou",
"InstanceClass": "tair.rdb.with.proxy.1g",
"OrderType": "RENEW",
"ChargeType": "PrePaid",
"Period": 12,
"InstanceId": "r-d7****l3v0xmorw1xp",
"ShardCount": 3
}
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| OrderParams |
string |
Parameter pesanan. Parameter ini dikembalikan ketika OrderParamOut disetel ke |
String |
| RequestId |
string |
ID permintaan. |
3A40BE4E-1890-4972-889C-FEFA37663635 |
| Order |
object |
Informasi pesanan. |
|
| OriginalAmount |
string |
Harga asli pesanan. |
0.21 |
| HandlingFeeAmount |
string |
Biaya penanganan. |
0.1 |
| Currency |
string |
Mata uang. Nilainya adalah CNY (yuan Tiongkok) untuk situs Tiongkok dan USD (dolar AS) untuk situs internasional. |
CNY |
| DiscountAmount |
string |
Jumlah diskon pesanan. |
0.21 |
| TradeAmount |
string |
Harga transaksi aktual pesanan. |
10 |
| Coupons |
object |
||
| Coupon |
array<object> |
Details about coupons. |
|
|
object |
Details about the coupon. |
||
| IsSelected |
string |
Indicates whether the coupon is selected. |
true |
| CouponNo |
string |
The coupon ID. |
youhuiquan_promotion_option_id_for_blank |
| Name |
string |
The coupon name. |
test |
| Description |
string |
The coupon description. |
coupondemo |
| RuleIds |
object |
||
| RuleId |
array |
The rule IDs. |
|
|
string |
The rule ID. |
[202] |
|
| ShowDiscountInfo |
boolean |
Menunjukkan apakah akan menampilkan informasi diskon. |
|
| DepreciateInfo |
object |
Informasi promosi. |
|
| ListPrice |
integer |
The list price. |
1* |
| OriginalStandAmount |
integer |
The original total price displayed on the official website. |
12* |
| CheapStandAmount |
integer |
The new total price displayed on the official website. |
9* |
| CheapRate |
integer |
The price reduction rate. |
30% |
| Differential |
integer |
The promotional offer (displayed in the total order amount). |
** |
| DifferentialName |
string |
The name of the promotional offer. |
XXXXX |
| MonthPrice |
integer |
The monthly price. |
** |
| IsContractActivity |
boolean |
Indicates whether eligibility for the contracted discount is met. |
false |
| IsShow |
boolean |
Indicates whether the price reduction rate is displayed. |
true |
| ContractActivity |
object |
The activity information. |
|
| FinalPromFee |
number |
The total discount amount. |
|
| FinalFee |
number |
The preferential price. |
|
| ProdFee |
number |
The original price. |
**** |
| ActivityId |
integer |
The activity ID. |
**** |
| OptionCode |
string |
The promotion code. |
**** |
| ActivityName |
string |
The activity name. |
合同优惠_整单_xxx折 |
| OptionIds |
object |
||
| OptionId |
array |
The promotion IDs. |
|
|
integer |
The promotion ID. |
***** |
|
| StandDiscountPrice |
integer |
Harga setelah diskon. |
**** |
| IsContractActivity |
boolean |
Menunjukkan apakah diskon kontrak diterapkan. |
false |
| StandPrice |
integer |
Harga setelah diskon. |
0 |
| Code |
string |
Kode pesanan. |
"" |
| Message |
string |
Pesan pesanan. |
"" |
| Rules |
object |
||
| Rule |
array<object> |
Spesifikasi aktivitas. |
|
|
object |
|||
| RuleDescId |
integer |
The ID of the rule. |
1111111111 |
| Title |
string |
The title of the rule. |
test |
| Name |
string |
The name of the rule. |
test |
| SubOrders |
object |
||
| SubOrder |
array<object> |
Kebijakan yang sesuai dengan kupon. |
|
|
array<object> |
|||
| OriginalAmount |
string |
The original price of the order. |
0.21 |
| InstanceId |
string |
The instance ID. |
r-bp1xxxxxxxxxxxxx |
| DiscountAmount |
string |
The discount amount of the order. |
0.21 |
| TradeAmount |
string |
The transaction price of the order. |
10 |
| RuleIds |
object |
||
| RuleId |
array |
The hit rule IDs. |
|
|
string |
The ID of the hit rule. |
RuleId: 1111111111 |
|
| OptionalPromotions |
object |
||
| OptionalPromotion |
array<object> |
The optional promotions. |
|
|
array<object> |
|||
| Selected |
boolean |
Indicates whether the promotion option is selected. |
false |
| CouponNo |
string |
Indicates whether coupons are used. Valid values:
|
default |
| Name |
string |
The coupon name. |
**** |
| Description |
string |
The description of the coupon. |
**** |
| Show |
boolean |
Indicates whether the discount is displayed. |
False |
| ActivityExtInfo |
object |
The additional activity information. |
**** |
| OptionCode |
string |
The promotion code. |
**** |
| PromotionName |
string |
The promotion name. |
**** |
| PromotionOptionNo |
string |
The promotion ID. |
youhuiquan_promotion_option_id_for_blank |
| CanPromFee |
string |
The amount that can be deducted by using the coupon. |
**** |
| DepreciateInfo |
object |
The price reduction information. |
|
| ListPrice |
integer |
The list price. |
**** |
| OriginalStandAmount |
integer |
The original total price displayed on the official website. |
**** |
| CheapStandAmount |
integer |
The new total price displayed on the official website. |
**** |
| CheapRate |
integer |
The price reduction rate. |
**** |
| Differential |
integer |
The promotional offer (displayed in the total order amount). |
**** |
| DifferentialName |
string |
The name of the promotional offer. |
**** |
| MonthPrice |
integer |
The monthly price. |
**** |
| IsContractActivity |
boolean |
Indicates whether eligibility for the contracted discount is met. |
false |
| ContractActivity |
object |
The contract promotion. |
|
| FinalPromFee |
number |
The total discount amount. |
**** |
| FinalFee |
number |
The preferential price. |
**** |
| ProdFee |
number |
The original price. |
**** |
| ActivityId |
integer |
The activity ID. |
1412025702634847 |
| OptionCode |
string |
The promotion ID. |
**** |
| ActivityName |
string |
The activity name. |
**** |
| OptionIds |
object |
||
| OptionId |
array |
The promotion IDs. |
|
|
integer |
The promotion ID. |
|
|
| StartTime |
string |
The start time of the activity. |
2024-11-18T00:00:00Z |
| StandDiscountPrice |
integer |
The discounted price. |
**** |
| IsContractActivity |
boolean |
Indicates whether eligibility for the contracted discount is met. |
**** |
| StandPrice |
integer |
The discounted price. |
**** |
| ModuleInstance |
object |
||
| ModuleInstance |
array<object> |
The configuration details for each instance of an order line item. |
|
|
array<object> |
The configuration sub-item of the instance in the order. |
||
| ModuleCode |
string |
The module code. |
**** |
| ModuleId |
string |
The module ID. |
**** |
| StandPrice |
number |
The discounted price. |
**** |
| PricingModule |
boolean |
Indicates whether the item is billed. |
**** |
| ModuleName |
string |
The module name. |
**** |
| DiscountFee |
number |
The discount. |
**** |
| TotalProductFee |
number |
The original price of the instance. |
0.0 |
| NeedOrderPay |
boolean |
Indicates whether the order is paid. |
true |
| PayFee |
number |
The actual amount paid. |
0.0 |
| ModuleAttrs |
object |
||
| moduleAttr |
array<object> |
The module attributes. |
|
|
object |
The module attribute. |
||
| Type |
integer |
The attribute type. |
**** |
| Value |
string |
The attribute value. |
**** |
| Code |
string |
The attribute code. |
**** |
| Name |
string |
The attribute name. |
**** |
| ContractActivity |
boolean |
Indicates whether eligibility for the contracted discount is met. |
**** |
| DepreciateInfo |
object |
The price reduction information. |
|
| ListPrice |
number |
The list price. |
**** |
| OriginalStandAmount |
number |
The original total price displayed on the official website. |
**** |
| CheapStandAmount |
number |
The new total price displayed on the official website. |
**** |
| CheapRate |
number |
The price reduction rate. |
****** |
| Differential |
number |
The promotional offer (displayed in the total order amount). |
**** |
| DifferentialName |
string |
The name of the promotional offer. |
**** |
| MonthPrice |
number |
The monthly price. |
**** |
| IsContractActivity |
boolean |
Indicates whether eligibility for the contracted discount is met. |
**** |
| IsShow |
boolean |
Indicates whether the price reduction rate is displayed. |
true |
| StartTime |
string |
The start time of the activity. |
2024-09-23T14:00:01Z |
| PromDetailList |
object |
||
| PromDetail |
array<object> |
Details about promotions. |
|
|
array<object> |
Details about the promotion. |
||
| PromotionName |
string |
The promotion name. |
**** |
| PromotionId |
integer |
The promotion ID. |
**** |
| FinalPromFee |
number |
The discount amount. |
**** |
| OptionCode |
string |
The coupon code. |
**** |
| PromType |
string |
The promotion type. |
**** |
| ActivityExtInfo |
object |
The additional activity information. |
**** |
| DerivedPromType |
string |
The derived promotion type. |
**** |
| PromotionCode |
string |
The promotion code. |
**** |
| ContractActivity |
boolean |
Indicates whether eligibility for the contracted discount is met. |
**** |
Contoh
Respons sukses
JSONformat
{
"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": [
"[202]"
]
},
"ShowDiscountInfo": false,
"DepreciateInfo": {
"ListPrice": 0,
"OriginalStandAmount": 0,
"CheapStandAmount": 0,
"CheapRate": 0,
"Differential": 0,
"DifferentialName": "XXXXX",
"MonthPrice": 0,
"IsContractActivity": false,
"IsShow": true,
"ContractActivity": {
"FinalPromFee": 0,
"FinalFee": 0,
"ProdFee": 0,
"ActivityId": 0,
"OptionCode": "****",
"ActivityName": "合同优惠_整单_xxx折",
"OptionIds": {
"OptionId": [
0
]
}
}
},
"StandDiscountPrice": 0,
"IsContractActivity": true,
"StandPrice": 0,
"Code": "\"\"\n",
"Message": "\"\""
},
"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"
]
},
"OptionalPromotions": {
"OptionalPromotion": [
{
"Selected": false,
"CouponNo": "default",
"Name": "****",
"Description": "****",
"Show": true,
"ActivityExtInfo": {
"test": "test",
"test2": 1
},
"OptionCode": "****",
"PromotionName": "****",
"PromotionOptionNo": "youhuiquan_promotion_option_id_for_blank",
"CanPromFee": "****"
}
]
},
"DepreciateInfo": {
"ListPrice": 0,
"OriginalStandAmount": 0,
"CheapStandAmount": 0,
"CheapRate": 0,
"Differential": 0,
"DifferentialName": "****",
"MonthPrice": 0,
"IsContractActivity": false,
"ContractActivity": {
"FinalPromFee": 0,
"FinalFee": 0,
"ProdFee": 0,
"ActivityId": 1412025702634847,
"OptionCode": "****",
"ActivityName": "****",
"OptionIds": {
"OptionId": [
0
]
}
},
"StartTime": "2024-11-18T00:00:00Z"
},
"StandDiscountPrice": 0,
"IsContractActivity": true,
"StandPrice": 0,
"ModuleInstance": {
"ModuleInstance": [
{
"ModuleCode": "****",
"ModuleId": "****",
"StandPrice": 0,
"PricingModule": true,
"ModuleName": "****",
"DiscountFee": 0,
"TotalProductFee": 0,
"NeedOrderPay": true,
"PayFee": 0,
"ModuleAttrs": {
"moduleAttr": [
{
"Type": 0,
"Value": "****",
"Code": "****",
"Name": "****"
}
]
},
"ContractActivity": true,
"DepreciateInfo": {
"ListPrice": 0,
"OriginalStandAmount": 0,
"CheapStandAmount": 0,
"CheapRate": 0,
"Differential": 0,
"DifferentialName": "****",
"MonthPrice": 0,
"IsContractActivity": true,
"IsShow": true,
"StartTime": "2024-09-23T14:00:01Z"
}
}
]
},
"PromDetailList": {
"PromDetail": [
{
"PromotionName": "****",
"PromotionId": 0,
"FinalPromFee": 0,
"OptionCode": "****",
"PromType": "****",
"ActivityExtInfo": {
"test": "test",
"test2": 1
},
"DerivedPromType": "****",
"PromotionCode": "****"
}
]
},
"ContractActivity": true
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | Period 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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.