tencent cloud



Last updated: 2022-06-15 16:12:19

1. API Description

Domain name for API request: mongodb.tencentcloudapi.com.

This API is used to query price of instance creation. The region parameter must be passed in this API, otherwise verification will fail. This API allows queries only for purchasable instance specifications.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: InquirePriceCreateDBInstances.
Version Yes String Common Params. The value used for this API: 2019-07-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Zone Yes String Instance region name in the format of ap-guangzhou-2.
NodeNum Yes Integer The number of nodes in each replica set. The value range is subject to the response parameter of the DescribeSpecInfo API.
Memory Yes Integer Instance memory size in GB.
Volume Yes Integer Instance disk size in GB.
MongoVersion Yes String Version number. For the specific purchasable versions supported, please see the return result of the DescribeSpecInfo API. The correspondences between parameters and versions are as follows: MONGO_3_WT: MongoDB 3.2 WiredTiger Edition; MONGO_3_ROCKS: MongoDB 3.2 RocksDB Edition; MONGO_36_WT: MongoDB 3.6 WiredTiger Edition; MONGO_40_WT: MongoDB 4.0 WiredTiger Edition.
MachineCode Yes String Server type. Valid values: HIO (high IO), HIO10G (ten-gigabit high IO)
GoodsNum Yes Integer Number of instances. Minimum value: 1. Maximum value: 10.
Period Yes Integer Instance validity period in months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36.
ClusterType Yes String Instance type. Valid values: REPLSET (replica set), SHARD (sharded cluster), STANDALONE (single-node).
ReplicateSetNum Yes Integer Number of replica sets. To create a replica set instance, set this parameter to 1; to create a shard instance, see the parameters returned by the DescribeSpecInfo API; to create a single-node instance, set this parameter to 0.

3. Output Parameters

Parameter Name Type Description
Price DBInstancePrice Price.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying purchase price of an instance

Input Example

&<Common request parameters>

Output Example

  "Response": {
    "Price": {
      "DiscountPrice": 1340,
      "OriginalPrice": 1340,
      "UnitPrice": 670
    "RequestId": "fb8b4646-389d-44cc-ab8c-98c081cbdad3"

5. Developer Resources


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error
InvalidParameter Parameter error
InvalidParameter.PermissionDenied The current subaccount has no permission to perform this operation.
InvalidParameterValue.ReplicaSetNumError Incorrect number of replica sets (shards).
InvalidParameterValue.SpecNotOnSale Incorrect purchasable specification.
InvalidParameterValue.ZoneClosed Instances are not purchasable in this AZ.
InvalidParameterValue.ZoneError Invalid availability zone
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support