EvaluateResource
Evaluates whether sufficient resources are available before you purchase an instance or change instance specifications.
Operation description
This operation applies to resource evaluation for ApsaraDB for MongoDB replica set and sharded cluster instances. It supports resource evaluation for purchasing replica set and sharded cluster instances, changing instance specifications, and adding nodes to sharded clusters.
You can call this operation up to 200 times per minute. Exceeding this limit results in throttling.
To query the list of available instance types in a specified zone (based on sales constraints rather than real-time inventory), use the DescribeAvailableResource operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:EvaluateResource |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query available regions. |
cn-hangzhou |
| ZoneId |
string |
Yes |
The zone ID. You can call DescribeRegions to query available zones. |
cn-hangzhou-h |
| Engine |
string |
No |
The database engine. Set the value to MongoDB. Valid values:
|
MongoDB |
| EngineVersion |
string |
Yes |
The database engine version. Valid values:
|
4.2 |
| DBInstanceClass |
string |
No |
The instance type. Note
This parameter is required when you evaluate resources for a replica set instance. For more information about instance types, see Instance types. |
dds.mongo.mid |
| ShardsInfo |
string |
No |
The shard information of the sharded cluster. This parameter is required when you evaluate resources for a sharded cluster. When you evaluate resources for a new sharded cluster, you must specify the specifications of each shard in a JSON-formatted character string. Example:
Parameter descriptions in the example:
When you evaluate resources for an upgrade or downgrade of a sharded cluster, you only need to specify the node information in a JSON-formatted character string. Example:
Parameter descriptions in the example:
|
{"NodeId": "d-bp147c4d9ca7****", "NodeClass": "dds.shard.standard"} |
| DBInstanceId |
string |
No |
The instance ID. This parameter is required when you evaluate resources for changing instance specifications. |
dds-bp14bf67a76d**** |
| ReplicationFactor |
string |
No |
The number of nodes in the instance.
Note
This parameter is not required for serverless instances. Valid values:
|
3 |
| ReadonlyReplicas |
string |
No |
The number of read-only nodes in the instance. Valid values: 1 to 5. Note
This parameter is not required for standalone instances or serverless instances. Valid values:
|
1 |
| Storage |
string |
No |
The storage capacity of the replica set instance. Unit: GB. Note
This parameter is required when the instance uses cloud disks. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| DBInstanceAvailable |
string |
Indicates whether resources are available in the current region. Valid values:
|
1 |
| EngineVersion |
string |
The database engine version. |
4.0 |
| RequestId |
string |
The request ID. |
AE2DE465-E45F-481F-ABD8-37D64173**** |
| Engine |
string |
The database engine. The value is fixed to MongoDB. |
MongoDB |
Examples
Success response
JSON format
{
"DBInstanceAvailable": "1",
"EngineVersion": "4.0",
"RequestId": "AE2DE465-E45F-481F-ABD8-37D64173****",
"Engine": "MongoDB"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.