This topic describes the subparameters of the DBInstances parameter that is used in the DescribePrice operation and provides examples. You can call the DescribePrice operation to query the fees incurred when you create, upgrade, or renew an ApsaraDB for MongoDB instance.
Subparameters
Subparameter | Type | Required | Description | Example |
DBInstanceId | String | No | The instance ID. You can call the DescribeDBInstances operation to query the list of instances. Note This parameter is required when the order type is configuration change or instance renewal. | dds-bp13bbf2407f**** |
RegionId | String | Yes | The region ID of the instance, You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ZoneId | String | No | The zone ID of the instance. You can call the DescribeRegions operation to query the zone IDs. | cn-hangzhou-h |
Engine | String | Yes | The database engine of the database. Set the value to MongoDB. | MongoDB |
EngineVersion | String | Yes | The database engine version of the instance. Valid values:
| 4.2 |
DBInstanceClass | String | No | The instance type of the replica set instance. For more information, see Instance types. Note This parameter is required when you query the fees for creating instances, such as purchasing or cloning instances. | dds.mongo.mid |
DBInstanceStorage | String | No | The storage capacity of the instance. Unit: GB. Note This parameter is required if the instance is a replica set instance. | 20 |
ReplicationFactor | String | No | The number of nodes in the instance. Valid values: 1, 3, 5, and 7. Note This parameter is available only for replica set instances. | 3 |
NetworkType | String | No | The network type of the instance. Valid value:
| VPC |
VpcId | String | No | The ID of the VPC. | vpc-bp1q2qqm4vxo6e6zl**** |
VSwitchId | String | No | The ID of the vSwitch. | vsw-bp1lb40helio22b6d**** |
ChargeType | String | Yes | The billing method of the instance. Valid values:
| PostPaid |
AutoPay | String | No | Specifies whether to enable auto-renewal for the instance. Valid values:
| True |
pricingCycle | String | No | The unit of the subscription period of the instance. Valid values:
Note
| Month |
Period | String | No | The subscription period of the instance. The value must be an integer that is greater than 1. The period unit is determined based on the following rules:
Note This parameter is required when the billing method of the instance is subscription. | 1 |
configServers | JSON | No | The specifications of the Configserver node in the sharded cluster instance. The following subparameters are included:
|
|
mongos | JSON | No | The specifications of the mongos node in the sharded cluster instance. The following subparameters are included:
For more information, see Instance types. |
|
shards | JSON | No | The specifications of the shard node. The following subparameters are included:
For more information, see Instance types. |
|
ReadonlyReplicas | String | No | The number of read-only nodes. Valid values: 0, 1, 2, 3, 4, and 5. Note This parameter is available only for replica set instances. | 1 |
StorageType | String | Yes | The storage type of the instance. Valid values:
Note
| cloud_essd1 |
ProvisionedIops | String | No | The provisioned IOPS of the instance. Valid values: 0 to 50000. This parameter is valid only when the StorageType parameter is set to cloud_auto. | 0 |
Examples
Purchase a sharded cluster instance
The following example shows how to purchase a sharded cluster instance that uses the subscription billing method:
[
{
"period": 24,
"EngineVersion": "7.0",
"StorageType": "cloud_essd1",
"ZoneId": "cn-hangzhou-i",
"chargeType": "PrePaid",
"configServers": [
{
"nodeClass": "mdb.shard.2x.xlarge.d",
"nodeStorage": "20"
}
],
"mongos": [
{
"nodeClass": "mdb.shard.2x.xlarge.d"
},
{
"nodeClass": "mdb.shard.2x.xlarge.d"
}
],
"shards": [
{
"shard_ordernum": "1",
"nodeClass": "mdb.shard.2x.xlarge.d",
"ReadonlyReplicas": "0",
"nodeStorage": "20"
}
],
"NetworkType": "VPC",
"RegionId": "cn-hangzhou",
"Engine": "MongoDB"
}
]
Change the configurations of a sharded cluster instance
The following example shows how to change the configurations of a mongos node in a sharded cluster instance that uses the subscription billing method:
[
{
"DBInstanceId": "dds-2zeefc0eb52a****",
"StorageType": "cloud_essd1",
"RegionId": "cn-beijing",
"ZoneId": "cn-beijing-h",
"Engine": "MongoDB",
"EngineVersion": "4.4",
"NetworkType": "VPC",
"ChargeType": "PrePaid",
"mongos": [
{
"nodeClass": "mdb.shard.2x.xlarge.d"
}
]
}
]
Purchase a replica set instance
The following example shows how to purchase a replica set instance that uses the subscription billing method:
[
{
"period": 1,
"EngineVersion": "7.0",
"StorageType": "cloud_essd1",
"ZoneId": "cn-hangzhou-i",
"ReplicationFactor": "3",
"ReadonlyReplicas": "0",
"DBInstanceClass": "mdb.shard.2x.xlarge.d",
"chargeType": "PrePaid",
"NetworkType": "VPC",
"DBInstanceStorage": "20",
"pricingCycle": "Month",
"RegionId": "cn-hangzhou",
"Engine": "MongoDB"
}
]
Change the configurations of a replica set instance
The following example shows how to change the configurations of a replica set instance that uses the pay-as-you-go billing method:
[
{
"StorageType": "cloud_essd1",
"EngineVersion": "5.0",
"ReplicationFactor": "3",
"ZoneId": "cn-hangzhou-h",
"ReadonlyReplicas": "1",
"DBInstanceClass": "mdb.shard.2x.2xlarge.d",
"chargeType": "PostPaid",
"ProvisionedIops": "0",
"DBInstanceId": "dds-bp13053cfa2a****",
"NetworkType": "VPC",
"DBInstanceStorage": "20",
"RegionId": "cn-hangzhou",
"Engine": "MongoDB"
}
]