You can call this operation to query the fees incurred by creating, upgrading, or 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 Yes DescribePrice

The operation that you want to perform. Set the value to 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 the information of multiple ApsaraDB for MongoDB instances. The following list describes the parameters:

  • DBInstanceId: the ID of the instance. This parameter is optional. You can call the DescribeDBInstances operation to query the IDs of instances. This parameter is required if you set the OrderType parameter to UPGRADE or RENEW.
  • RegionId: the ID of the region. This parameter is required. You can call the DescribeRegions operation to query available regions.
  • ZoneId: the ID of the zone. This parameter is required. You can call the DescribeRegions operation to query available zones.
  • Engine: the type of the database. This parameter is required. Set the value to MongoDB.
  • EngineVersion: the version of the database. This parameter is required. Valid values:
    • 3.4
    • 4.0
    • 4.2
  • DBInstanceClass: the instance type, for example, dds.mongo.mid. This parameter is optional. <input tabindex="-1" class="dnt" readonly="readonly" value="Do Not Translate"> For more information, see Instance types.
  • DBInstanceStorage: the storage space. This parameter is required. Unit: GB.
  • ReplicationFactor: the number of nodes. This parameter is optional. Valid values:
    • 1
    • 3
    • 5
    • 7
  • NetworkType: the network type. This parameter is optional. Valid values:
    • VPC
    • Classic

      Default value: Classic.

  • VPCId: the ID of the virtual private cloud (VPC). This parameter is optional. This parameter is required if you set the NetworkType parameter to VPC.
  • VSwitchId: the ID of the VSwitch. This parameter is optional. This parameter is required if you set the NetworkType parameter to VPC.
  • ChargeType: the billing method. This parameter is optional. Valid values:
    • PostPaid: pay-as-you-go
    • PrePaid: subscription
  • AutoPay: indicates whether automatic payment is enabled. This parameter is optional. Valid values:
    • True: Automatic payment is enabled.
    • False: Automatic payment is not enabled.
  • Period: the period of subscription in months. This parameter is optional. This parameter is required if you set the ChargeType parameter to PrePaid.
  • configServers: the specification of the config server in the sharded cluster. This parameter is optional. Example: [{"nodeClass":"dds.cs.mid","nodeStorage":"20"}].
  • mongos: the specification of the mongos in the sharded cluster. This parameter is optional. Example: [{"nodeClass":"dds.mongos.mid"},{"nodeClass":"dds.mongos.mid"}].
  • shards: the specification of the shard in the sharded cluster. This parameter is optional. 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: instance creation
  • UPGRADE: instance configuration modification
  • RENEW: instance renewal
RegionId String No cn-hangzhou

The ID of the region where the instance is deployed. You can call the DescribeRegions operation to query available regions and zones where the ApsaraDB for MongoDB instance can be created.

CommodityCode String No dds_sharding

The code of the cluster. Valid values:

  • dds: a replica set instance that uses the pay-as-you-go billing method
  • badds: a replica set instance that uses the subscription billing method
  • dds_sharding: a sharded cluster instance that uses the pay-as-you-go billing method
  • badds_sharding: a sharded cluster instance that uses the subscription billing method
  • badds_sharding_intl: a sharded cluster instance that uses the subscription billing method and is available on the International site (alibabacloud.com)
  • badds_sharding_jp: a sharded cluster instance that uses the subscription billing method and is available on the Japan site
ProductCode String No dds

The code of the product. Default value: dds.

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

The additional information about the cluster.

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: does not return order parameters.
  • true: returns order parameters.

Default value: false.

ResourceGroupId String No sg-bpxxxxxxxxxxxxxxxxxx

The ID of the resource group.

Response parameters

Parameter Type Example Description
Order Struct

The list of orders.

Coupons Array

The list of coupons.

Coupon
CouponNo String youhuiquan_promotion_option_id_for_blank

The code of the coupon.

Description String Example description

The description of the coupon.

IsSelected String true

Indicates whether the coupon is 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]}

The list of promotion rule IDs.

TradeAmount Float 0

The final price of the order.

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

The order parameters. This parameter is returned if the OrderParamOut parameter is set to true.

RequestId String 82530058-D4CF-49A4-96FB-9DD2DF3CE93E

The ID of the request.

Rules Array

The list of promotion rules.

Rule
Name String demoname

The name of the rule.

RuleDescId Long 11111111

The ID of the rule.

Title String demo

The title of the rule.

SubOrders Array

The rules that match the coupon.

SubOrder
DiscountAmount Float 322.4

The discount amount of the order.

InstanceId String dds-bpxxxxxxxx

The ID of the instance.

OriginalAmount Float 322.4

The original price of the order.

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

The list of promotion rule IDs.

TradeAmount Float 0

The final 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,"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

{
    "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,\"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.