Queries the fees incurred when you create, upgrade, or renew an ApsaraDB for MongoDB instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribePrice |
The operation that you want to perform. Set the value to DescribePrice. |
RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. |
OrderType | String | Yes | BUY |
The type of the order. Valid values:
|
DBInstances | String | Yes | [ { "DBInstanceId":"dds-bp1xxxxxxxxxxxxx", "RegionId":"cn-hangzhou", "ZoneId":"cn-hangzhou-f", "Engine":"MongoDB", "EngineVersion":" 4.2", "DBInstanceClass":"dds.mongo.mid", "DBInstanceStorage":10, "ChargeType":"PrePaid", "Period":1 } ] |
A JSON string that contains the details of the ApsaraDB for MongoDB instance. For more information, see Details of the DBInstances parameter in the DescribePrice operation. |
CommodityCode | String | No | dds_sharding |
The code of the cluster. Valid values:
|
ProductCode | String | No | dds |
The code of the service to which the instance belongs. Default value: dds. |
BusinessInfo | String | No | null |
The business information. This is an additional parameter. |
CouponNo | String | No | youhuiquan_promotion_option_id_for_blank |
The coupon code. Default value: youhuiquan_promotion_option_id_for_blank. |
OrderParamOut | String | No | false |
Specifies whether to return the parameters about the order. Valid values:
Default value: false. |
ResourceGroupId | String | No | rg-acfmyiu4ekp**** |
The ID of the resource group. For more information, see View basic information of a resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Order | Object |
The list of orders. |
|
Coupons | Array of Coupon |
Details about the coupons. |
|
Coupon | |||
Description | String | Example description |
The description of the topic. |
IsSelected | String | true |
Indicates whether the coupon was selected. |
CouponNo | String | youhuiquan_promotion_option_id_for_blank |
The coupon number. |
Name | String | youhuiquan111 |
The name of the coupon. |
OriginalAmount | String | 322.4 |
The original price of the order. |
DiscountAmount | String | 322.4 |
The discount amount of the order. |
RuleIds | Array of String | null |
The list of one or more promotion rule IDs. |
TradeAmount | String | 0 |
The actual price of the order. |
Currency | String | USD |
The type of the currency. Valid values:
|
RequestId | String | 82530058-D4CF-49A4-96FB-9DD2DF3CE93E |
The ID of the request. |
SubOrders | Array of SubOrder |
Details about the rules that match the coupon. |
|
SubOrder | |||
OriginalAmount | String | 322.4 |
The original price of the order. |
DiscountAmount | String | 322.4 |
The discount amount of the order. |
RuleIds | Array of String | null |
The list of one or more promotion rule IDs. |
TradeAmount | String | 0 |
The actual price of the order. |
InstanceId | String | dds-bpxxxxxxxx |
The ID of the instance. |
TraceId | String | 11111111111111111111111111111111 |
The ID of the trace. |
OrderParams | String | {\"autoPay\":false}" |
The order parameters. This parameter is returned if the |
Rules | Array of Rule |
Details about the promotion rules. |
|
Rule | |||
RuleDescId | Long | 11111111 |
The ID of the policy. |
Title | String | demo |
The title of the rule. |
Name | String | demoname |
The name of the rule. Valid values |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=DescribePrice
&DBInstances=
[
{ "DBInstanceId":"dds-bp1xxxxxxxxxxxxx",
"RegionId":"cn-hangzhou",
"ZoneId":"cn-hangzhou-f",
"Engine":"MongoDB",
"EngineVersion":" 4.2",
"DBInstanceClass":"dds.mongo.mid",
"DBInstanceStorage":10,
"VpcId":null,
"VSwitchId":null,
"ChargeType":"PrePaid",
"Period":1
}
]
&OrderType=BUY
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<Order>
<Currency>USD</Currency>
<RuleIds>
<RuleId>102xxxxxxxxxxxxx</RuleId>
</RuleIds>
<TradeAmount>0</TradeAmount>
<OriginalAmount>4.62</OriginalAmount>
<Coupons>
</Coupons>
<DiscountAmount>4.62</DiscountAmount>
</Order>
<RequestId>82530058-D4CF-49A4-96FB-9DD2DF3CE93E</RequestId>
<SubOrders>
</SubOrders>
<OrderParams>{"autoPay":false,"autoUseCoupon":false,"bid":"26842","buyerId":140xxxxxxxxxxxxx,"commodities":[{"chargeType":"PREPAY","commodityCode":"badds","components":[{"componentCode":"dds_region","free":false,"moduleAttrStatus":3,"moduleParams":{},"properties":[{"code":"dds_region","name":"China (Hangzhou)","value":"cn-hangzhou"}]},{"componentCode":"dds_dbtype","free":false,"moduleAttrStatus":3,"moduleParams":{},"properties":[{"code":"dds_dbtype","name":"MongoDB","value":"MongoDB"}]},{"componentCode":"dds_dbversion","free":false,"moduleAttrStatus":3,"moduleParams":{},"properties":[{"code":"dds_dbversion","name":" 4.2","value":" 4.2"}]},{"componentCode":"dds_class","free":false,"moduleAttrStatus":3,"moduleParams":{},"properties":[{"code":"dds_class","name":"dds.mongo.mid","value":"dds.mongo.mid"}]},{"componentCode":"dds_storage","free":false,"moduleAttrStatus":3,"moduleParams":{},"properties":[{"code":"dds_storage","name":"10","value":"10"}]},{"componentCode":"replication_factor","free":false,"moduleAttrStatus":3,"moduleParams":{},"properties":[{"code":"replication_factor","name":"5","value":"5"}]},{"componentCode":"readonly_replicas","free":false,"moduleAttrStatus":3,"moduleParams":{},"properties":[{"code":"readonly_replicas","name":"0","value":"0"}]}],"duration":1,"free":false,"instanceId":"dds-bp1xxxxxxxxxxxxx","migrateOrder":false,"orderParams":{},"orderType":"UPGRADE","periodAlign":false,"prePayPostCharge":false,"pricingCycle":"Day","quantity":1,"renewChange":false,"specUpdate":false,"syncToSubscription":false,"upgradeInquireFinancialValue":true}],"fromApp":"OpenApi","orderParams":{"promotion_input_param":"{\"promotionFilter\":{\"youhui_quan\":true},\"promotionOptionCode\":\"youhui_quan\",\"promotionOptionNo\":\"youhuiquan_promotion_option_id_for_blank\"}"},"rateWithTax":false,"requestId":"82530058-D4CF-49A4-96FB-9DD2DF3CE93E","token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","userId":140xxxxxxxxxxxxx}</OrderParams>
<Rules>
<Rule>
<RuleDescId>102xxxxxxxxxxxxx</RuleDescId>
<Name>Sample coupon</Name>
</Rule>
</Rules>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Order" : {
"Currency" : "USD",
"RuleIds" : {
"RuleId" : [ "102xxxxxxxxxxxxx" ]
},
"TradeAmount" : 0,
"OriginalAmount" : 4.62,
"Coupons" : {
"Coupon" : [ ]
},
"DiscountAmount" : 4.62
},
"RequestId" : "82530058-D4CF-49A4-96FB-9DD2DF3CE93E",
"SubOrders" : {
"SubOrder" : [ ]
},
"OrderParams" : "{\"autoPay\":false,\"autoUseCoupon\":false,\"bid\":\"26842\",\"buyerId\":140xxxxxxxxxxxxx,\"commodities\":[{\"chargeType\":\"PREPAY\",\"commodityCode\":\"badds\",\"components\":[{\"componentCode\":\"dds_region\",\"free\":false,\"moduleAttrStatus\":3,\"moduleParams\":{},\"properties\":[{\"code\":\"dds_region\",\"name\":\"China (Hangzhou)\",\"value\":\"cn-hangzhou\"}]},{\"componentCode\":\"dds_dbtype\",\"free\":false,\"moduleAttrStatus\":3,\"moduleParams\":{},\"properties\":[{\"code\":\"dds_dbtype\",\"name\":\"MongoDB\",\"value\":\"MongoDB\"}]},{\"componentCode\":\"dds_dbversion\",\"free\":false,\"moduleAttrStatus\":3,\"moduleParams\":{},\"properties\":[{\"code\":\"dds_dbversion\",\"name\":\" 4.2\",\"value\":\" 4.2\"}]},{\"componentCode\":\"dds_class\",\"free\":false,\"moduleAttrStatus\":3,\"moduleParams\":{},\"properties\":[{\"code\":\"dds_class\",\"name\":\"dds.mongo.mid\",\"value\":\"dds.mongo.mid\"}]},{\"componentCode\":\"dds_storage\",\"free\":false,\"moduleAttrStatus\":3,\"moduleParams\":{},\"properties\":[{\"code\":\"dds_storage\",\"name\":\"10\",\"value\":\"10\"}]},{\"componentCode\":\"replication_factor\",\"free\":false,\"moduleAttrStatus\":3,\"moduleParams\":{},\"properties\":[{\"code\":\"replication_factor\",\"name\":\"5\",\"value\":\"5\"}]},{\"componentCode\":\"readonly_replicas\",\"free\":false,\"moduleAttrStatus\":3,\"moduleParams\":{},\"properties\":[{\"code\":\"readonly_replicas\",\"name\":\"0\",\"value\":\"0\"}]}],\"duration\":1,\"free\":false,\"instanceId\":\"dds-bp1xxxxxxxxxxxxx\",\"migrateOrder\":false,\"orderParams\":{},\"orderType\":\"UPGRADE\",\"periodAlign\":false,\"prePayPostCharge\":false,\"pricingCycle\":\"Day\",\"quantity\":1,\"renewChange\":false,\"specUpdate\":false,\"syncToSubscription\":false,\"upgradeInquireFinancialValue\":true}],\"fromApp\":\"OpenApi\",\"orderParams\":{\"promotion_input_param\":\"{\\\"promotionFilter\\\":{\\\"youhui_quan\\\":true},\\\"promotionOptionCode\\\":\\\"youhui_quan\\\",\\\"promotionOptionNo\\\":\\\"youhuiquan_promotion_option_id_for_blank\\\"}\"},\"rateWithTax\":false,\"requestId\":\"82530058-D4CF-49A4-96FB-9DD2DF3CE93E\",\"token\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\"userId\":140xxxxxxxxxxxxx}",
"Rules" : {
"Rule" : [ {
"RuleDescId" : "102xxxxxxxxxxxxx",
"Name": "Sample coupon"
} ]
}
}
Error codes
For a list of error codes, visit the API Error Center.