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.
Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: mongodb.ap-shanghai-fsi.tencentcloudapi.com
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 parameter. The value used for this API: InquirePriceCreateDBInstances. |
Version | Yes | String | Common parameter. The value used for this API: 2019-07-25. |
Region | Yes | String | Common parameter. 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 | Number of nodes in each replica set. Currently, the number of nodes per replica set is fixed at 3, while the number of secondary nodes per shard is customizable. For more information, please see the parameter returned by 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 (10-gigabit high IO), STDS5 (standard). |
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. |
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. |
https://mongodb.tencentcloudapi.com/?Action=InquirePriceCreateDBInstances
&Zone=ap-guangzhou-4
&NodeNum=3
&Memory=4
&Volume=100
&MongoVersion=MONGO_36_WT
&MachineCode=HIO10G
&GoodsNum=2
&Period=1
&ClusterType=REPLSET
&ReplicateSetNum=1
&<Common request parameters>
{
"Response": {
"Price": {
"DiscountPrice": 1340,
"OriginalPrice": 1340,
"UnitPrice": 670
},
"RequestId": "fb8b4646-389d-44cc-ab8c-98c081cbdad3"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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.ZoneError | Invalid availability zone |
Was this page helpful?