Domain name for API request: mongodb.intl.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.
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 | Region and AZ information of the instance. For details, please see Regions and Availability Zones. |
| NodeNum | Yes | Integer |
|
| Memory | Yes | Integer | Instance memory size.
|
| Volume | Yes | Integer | Instance disk size.
|
| MongoVersion | Yes | String | Instance version information. The DescribeSpecInfo API can be called to obtain specific supported versions. The MongoVersionCode parameter in the returned data structure SpecItems indicates the information on versions supported by instances. The corresponding relationship between version information and version number is as follows:
|
| MachineCode | Yes | String | Recommended product specification types:
Product allowlist specification types:
Note: Allowlist specification types are under allowlist control. If needed, submit a ticket to apply. |
| GoodsNum | Yes | Integer | Number of instances. Value range: [1,10]. |
| ClusterType | Yes | String | Instance type.
|
| ReplicateSetNum | Yes | Integer |
|
| Period | No | Integer |
|
| InstanceChargeType | No | String | Instance payment method.
|
| MongosCpu | No | Integer | Number of Mongos node CPU cores. Valid values: 1, 2, 4, 8, and 16. This parameter is required during sharded cluster instance purchase. If this parameter is left blank, the default value 2 is used. |
| MongosMemory | No | Integer | Mongos node memory size. - This parameter is required during sharded cluster instance purchase. - Unit: GB. Valid values: 2 (for 1 core), 4 (for 2 cores), 8 (for 4 cores), 16 (for 8 cores), and 32 (for 16 cores). If this parameter is left blank, the default value 4 is used. |
| MongosNum | No | Integer | Specifies the number of Mongos nodes. Value range: [3,32]. For querying the price of sharded cluster instances, this parameter is required. If it is left blank, the default value 3 is used. |
| ConfigServerCpu | No | Integer | Refers to the number of ConfigServer CPU cores, value fixed at 1, unit: GB. This parameter can be left blank. |
| ConfigServerMemory | No | Integer | Specifies the ConfigServer memory size. The value is fixed as 2. Unit: GB. This parameter can be left blank. |
| ConfigServerVolume | No | Integer | Specifies the ConfigServer disk size. The value is fixed at 20. Unit: GB. This parameter can be left blank. |
| ReadonlyNodeNum | No | Integer |
|
| Cpu | No | Integer | CPU size of the instance.
|
| Parameter Name | Type | Description |
|---|---|---|
| Price | DBInstancePrice | Price |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: mongodb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: InquirePriceCreateDBInstances
<Common request parameters>
{
"GoodsNum": 2,
"Zone": "ap-guangzhou-4",
"Memory": 4,
"Period": 1,
"ClusterType": "REPLSET",
"Volume": 100,
"NodeNum": 3,
"ReplicateSetNum": 1,
"MachineCode": "HIO10G",
"MongoVersion": "MONGO_50_WT"
}
{
"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 sub-account has no permission to perform this operation. |
| InvalidParameterValue.MachineTypeError | Incorrect model. |
| InvalidParameterValue.MongoVersionError | The instance version is incorrect. |
| 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 |
피드백