All Products
Search
Document Center

:Details of the DBInstances parameter in the DescribePrice operation

Last Updated:Mar 18, 2024

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.

Parameters

Parameter

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:

  • 3.4

  • 4.0

  • 4.2

  • 4.4

  • 5.0

  • 6.0

  • 7.0

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: Virtual Private Cloud (VPC)

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: pay-as-you-go

  • PrePaid: subscription

PostPaid

AutoPay

String

No

Specifies whether to enable auto-renewal for the instance. Valid values:

  • True: enables auto-renewal for the instance.

  • False: disables auto-renewal for the instance.

True

pricingCycle

String

No

The unit of the subscription period of the instance. Valid values:

  • Month

  • Year

Note
  • This parameter is required when the billing method of the instance is subscription.

  • This parameter is available only for replica set instances.

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:

  • If the instance is a sharded cluster instance, the period unit is months.

  • If the instance is a replica set instance, the period unit is the value of the pricingCycle parameter.

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:

  • nodeClass: the instance type of the Configserver node. Set the value to 1 core, 2 GB (general-purpose).

  • nodeStorage: the storage capacity of the Configserver node. Set the value to 20 GB.

[{"nodeClass":"dds.cs.mid","nodeStorage":"20"}]

mongos

JSON

No

The specifications of the mongos node in the sharded cluster instance. The following subparameters are included:

  • nodeClass: the instance type of the mongos node.

For more information, see Instance types.

[{"nodeClass":"dds.mongos.mid"},{"nodeClass":"dds.mongos.mid"}]

shards

JSON

No

The specifications of the shard node. The following subparameters are included:

  • nodeClass: the instance type of the shard node.

  • nodeStorage: the storage capacity of the shard node. Minimum value: 10. Unit: GB.

    Note

    If you need to specify the shards parameter, the nodeStorage parameter is required.

  • ReadonlyReplicas: the number of read-only nodes. Valid values: 0, 1, 2, 3, 4, and 5.

For more information, see Instance types.

[{"nodeClass":"dds.shard.mid","ReadonlyReplicas":"1","nodeStorage":"10"},{"nodeClass":"dds.shard.mid","ReadonlyReplicas":"1","nodeStorage":"10"}]

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:

  • local_ssd: local SSD

  • cloud_essd1: PL1 enhanced SSD (ESSD)

  • cloud_essd2: PL2 ESSD

  • cloud_essd3: PL3 ESSD

Note
  • ApsaraDB for MongoDB instances that run MongoDB 4.2 or earlier support local SSDs.

  • ApsaraDB for MongoDB instances that run MongoDB 4.4 or later support PL1 ESSDs, PL2 ESSDs, and PL3 ESSDs.

cloud_essd1

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"
    }
]