You can call this operation to query the prices of creating, upgrading, and renewing apsaradb for MongoDB instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribePrice

The parameter specified by the system. Value: DescribePrice.

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 multiple dbinstances. The following table describes the related parameters.

  • DBInstanceId: the ID of the instance. This parameter is optional. You can call DescribeDBInstances queries the instance list. Required when OrderType is UPGRADE or RENEW.
  • RegionId: the ID of the region. This parameter is required. You can use DescribeRegions view available regions.
  • ZoneId: Required. It is the zone ID. You can use DescribeRegions view available zones.
  • Engine: the type of the database. This parameter is required. Unique value: MongoDB.
  • EngineVersion: the version of the database engine. This parameter is required. Valid values:
    • 3.4
    • 4.0
    • 4.2
  • DBInstanceClass: the instance type. Such as dds.mongo.mid. For more information, see Primary instance types.
  • DBInstanceStorage: the storage space. This parameter is required. Unit: GB.
  • ReplicationFactor: Optional. The number of nodes. Valid values:
    • 1
    • 3
    • 5
    • 7
  • NetworkType: The network type. Valid values:
    • VPC
    • The network type of the instance. Valid values: Classic: classic network.

      Default value: Classic.

  • VPCId: the ID of the VPC. If the NetworkType is VPC, then this parameter is required, otherwise it is not needed.
  • VSwitchId: the ID of the VSwitch. If the NetworkType is VPC, then this parameter is required, otherwise it is not needed.
  • ChargeType: the payment type. This parameter is optional. Valid values:
    • PostPaid: pay-as-you-go
    • PrePaid: subscription
  • AutoPay: automatic payment. This parameter is optional. Valid values:
    • true: turn on the automatic payment.
    • False: turn off the automatic payment.
  • Period: The number of months. If the ChargeType is PrePaid then this parameter is required, otherwise it is not needed.
  • configServers: the node specifications of the configserver. This parameter is optional. For example: [{"nodeClass":"dds.cs.mid","nodeStorage":"20"}].
  • mongos: the mongos node specifications of the sharded cluster instance. This parameter is optional. For example: [{"nodeClass":"dds.mongos.mid"},{"nodeClass":"dds.mongos.mid"}].
  • shards: the node specifications of shards on a sharded cluster instance. This parameter is optional. For example: [{"nodeStorage":10,"nodeClass":"dds.shard.mid"},{"nodeStorage":10,"nodeClass":"dds.shard.mid"}].
OrderType String Yes BUY

The type of the order. Valid values:

  • BUY: Create an instance
  • UPGRADE: Change configuration
  • RENEW: RENEW an instance
RegionId String No cn-hangzhou

The ID of the region. You can call DescribeRegions queries the available regions and zones of an apsaradb for MongoDB instance.

CommodityCode String No dds_sharding

Code of the cluster. Valid values:

  • dds: pay-as-you-go
  • badds: Replica Set Edition subscription
  • dds_sharding: pay-as-you-go sharded Cluster Edition
  • badds_sharding: sharded Cluster Edition subscription
  • badds_sharding_intl: subscription-based sharded Cluster Edition
  • badds_sharding_jp: subscription-based sharded Cluster Edition (Japanese site)
ProductCode String No dds

The code of the product. Default value: dds.

BusinessInfo String No {"AccountPassword":"Pw123456","DBInstanceDescription":"test"}

The business information. It 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 order parameters. Valid values:

  • false: not returns the script output information in the result.
  • true: returns the script output information in the result.

Default value: false.

Response parameters

Parameter Type Example Description
Order Struct

The list of order information.

Coupons Array

The list of coupons.

Coupon
CouponNo String youhuiquan_promotion_option_id_for_blank

The coupon number.

Description String Sample remarks.

The invitation note.

IsSelected String true

Indicates whether the coupon was selected.

Name String youhuiquan111

The name of the coupon.

Currency String CNY

The currency of the coupon.

DiscountAmount Float 322.4

The discount amount of the order.

OriginalAmount Float 322.4

The original price of the order.

RuleIds List {"RuleId": [11111111,11111111,11111111]}

Activity rule ID collection.

TradeAmount Float 0

The actual price of the order.

OrderParams String {\"autoPay\":false}"

Order parameters. It returned when input parameters OrderParamOut is true.

RequestId String 82530058-D4 CF-49A4-96FB-9DD2DF3CE93E

The ID of the request.

Rules Array

The list of coupon rules.

Rule
Name String demoname

The name of the rule.

RuleDescId Long 11111111

The ID of the rule.

Title Integer demo

Rule title.

SubOrders Array

The list of rules associated with the coupon.

SubOrder
DiscountAmount Float 322.4

The discount amount of the order.

InstanceId String dds-bpxxxxxxxx

The ID of the RDS instance.

OriginalAmount Float 322.4

The original price of the order.

RuleIds List {"RuleId": [11111111,11111111,11111111]}

Activity rule ID collection.

TradeAmount Float 0

The actual price of the order.

TraceId String 11111111111111111111111111111111

The ID of the trace.

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

<Order>
    <Currency>CNY</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,"autousecopon":false,"bid":"26842","buyerId":140xxxxxxxxxxxxx,"commodities":[{"chargeType":"PREPAY","commodityCode":"badds","components":[{"componentCode":"dds_region","free":false,"moduleAttrStatus":3,"moduleParams" :// region, "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": optional values, "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

{
    "Order": {
        "Currency": "CNY",
        "RuleIds": {
            "RuleId": [
                "102xxxxxxxxxxxxx"
            ]
        },
        "TradeAmount": 0,
        "OriginalAmount": 4.62,
        "Coupons": {
            "Coupon": []
        },
        "DiscountAmount": 4.62
    },
    "RequestId": "82530058-D4CF-49A4-96FB-9DD2DF3CE93E",
    "SubOrders": {
        "SubOrder": []
    },
    "OrderParams": "{\" autoPay\":false,\" autousecopon \":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.