Checks whether sufficient resources are available in the region where you want to create or upgrade an ApsaraDB for MongoDB instance.
This operation is applicable 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 | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | EvaluateResource |
The operation that you want to perform. Set the value to EvaluateResource. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the region ID of the instance. |
ZoneId | String | Yes | cn-hangzhou-h |
The zone ID of the instance. You can call the DescribeRegions operation to query the most recent zone list. |
Engine | String | No | MongoDB |
The database engine of the instance. Set the value to MongoDB. |
EngineVersion | String | Yes | 4.0 |
The database engine version of the instance. Valid values:
|
DBInstanceClass | String | No | dds.mongo.mid |
The instance type. Note This parameter is required when you check whether resources are sufficient for creating
or upgrading a replica set instance. For more information about instance types, see
Instance types.
|
ShardsInfo | String | No | null |
The node information. This parameter is required when you check whether resources are sufficient for creating or upgrading a sharded cluster instance.
|
DBInstanceId | String | No | dds-bp14bf67a76d**** |
The ID of the instance. This parameter is required when you check whether resources are sufficient for upgrading an instance. |
ReplicationFactor | String | No | 3 |
The number of nodes in the instance.
|
ReadonlyReplicas | String | No | 1 |
The number of read-only nodes. Valid values: 1 to 5. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DBInstanceAvailable | String | 1 |
Indicates whether the resources are sufficient in the region. Valid values:
|
EngineVersion | String | 4.0 |
The database engine version of the instance. |
RequestId | String | AE2DE465-E45F-481F-ABD8-37D64173**** |
The ID of the request. |
Engine | String | MongoDB |
The database engine of the instance. The returned value is MongoDB. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=EvaluateResource
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-h
&EngineVersion=4.0
&DBInstanceClass=dds.mongo.mid
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<EvaluateResourceResponse>
<DBInstanceAvailable>1</DBInstanceAvailable>
<EngineVersion>4.0</EngineVersion>
<RequestId>AE2DE465-E45F-481F-ABD8-37D64173****</RequestId>
<Engine>MongoDB</Engine>
</EvaluateResourceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"DBInstanceAvailable" : 1,
"EngineVersion" : "4.0",
"RequestId" : "AE2DE465-E45F-481F-ABD8-37D64173****",
"Engine" : "MongoDB"
}
Error codes
For a list of error codes, visit the API Error Center.