You can call this operation to check whether sufficient resources are available in the region where you want to create or upgrade an ApsaraDB for MongoDB instance.
This operation applies to replica set instances and sharded cluster instances. You can call this operation to check whether resources are sufficient for creating an instance, upgrading an instance, or upgrading a single node of a sharded cluster instance.
Debugging
Request parameters
Parameter | Location | Type | Required | Example | Description |
---|---|---|---|---|---|
Action | Query | String | Yes | EvaluateResource |
The operation that you want to perform. Set the value to EvaluateResource. |
Engine | Query | String | Yes | MongoDB |
The database engine. Set the value to MongoDB. |
EngineVersion | Query | String | Yes | 4.0 |
The version of the database engine. Valid values:
|
RegionId | Query | String | Yes | cn-hangzhou |
The ID of the region. You can call DescribeRegions to query the region ID. |
ZoneId | Query | String | Yes | cn-hangzhou-h |
The ID of the zone. You can call DescribeRegions to query the zone ID. |
DBInstanceClass | Query | String | No | dds.mongo.mid |
The instance type. This parameter is required when you check whether resources are sufficient for creating or upgrading a replica set instance. For more information, see Instance types. |
ShardsInfo | Query | String | No | {"NodeId": "d-xxx", "NodeClass": "dds.shard.standard"} |
The node information. This parameter is required when you check whether resources are sufficient for creating or upgrading a sharded cluster instance.
|
DBInstanceId | Query | String | No | dds-bpxxxxxxxx |
The ID of the ApsaraDB for MongoDB instance. This parameter is required when you check whether resources are sufficient for upgrading an instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DBInstanceAvailable | String | 1 |
Indicates whether the resources are sufficient in the region. Valid values:
|
Engine | String | MongoDB |
The database engine. The returned value is MongoDB. |
EngineVersion | String | 4.0 |
The version of the database engine. |
RequestId | String | AE2DE465-E45F-481F-ABD8-37D641738660 |
The ID of the request. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/? Action=EvaluateResource
&Engine=MongoDB
&EngineVersion=4.0
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-h
&DBInstanceClass=dds.mongo.mid
&<Common request parameters>
Sample success responses
XML
format
<DBInstanceAvailable>1</DBInstanceAvailable>
<EngineVersion>4.0</EngineVersion>
<RequestId>AE2DE465-E45F-481F-ABD8-37D641738660</RequestId>
<Engine>MongoDB</Engine>
JSON
format
{
"DBInstanceAvailable": 1,
"EngineVersion": "4.0",
"RequestId": "AE2DE465-E45F-481F-ABD8-37D641738660",
"Engine": "MongoDB"
}
Error codes
For a list of error codes, visit the API Error Center.