Checks whether sufficient resources are available in a region in which you want to create or upgrade an ApsaraDB for MongoDB instance.
Operation description
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 a replica set or sharded cluster instance, or upgrading a single node of the sharded cluster instance.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dds:EvaluateResource | none |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the region ID. | cn-hangzhou |
ZoneId | string | Yes | The zone ID of the instance. You can call the DescribeRegions operation to query the zone ID. | cn-hangzhou-h |
Engine | string | No | The database engine of the instance. Set the value to MongoDB. | MongoDB |
EngineVersion | string | Yes | The version of the database engine. Enumeration Value:
| 4.0 |
DBInstanceClass | string | No | The type of the instance. 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.
| dds.mongo.mid |
ShardsInfo | string | No | The node information about the sharded cluster instance. This parameter is required when you check whether resources are sufficient for creating or upgrading a sharded cluster instance. To check whether resources are sufficient for creating a sharded cluster instance, specify the specifications of each node in the instance. The value must be a JSON string. Example:
Parameters in the example:
To check whether resources are sufficient for upgrading a single node of a sharded cluster instance, specify only the information about the node to be upgraded. The value must be a JSON string. Example:
Parameters in the example:
| {"NodeId": "d-bp147c4d9ca7****", "NodeClass": "dds.shard.standard"} |
DBInstanceId | string | No | The ID of the instance. This parameter is required when you check whether resources are sufficient for upgrading an instance. | dds-bp14bf67a76d**** |
ReplicationFactor | string | No | The number of nodes in the instance.
Note
This parameter is not required for serverless instances.
| 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 or serverless instances.
| 1 |
Storage | string | No | The storage capacity of the replica set instance. Unit: GB. Note
This parameter is required for the instances that use cloud disks.
| 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"DBInstanceAvailable": "1",
"EngineVersion": "4.0",
"RequestId": "AE2DE465-E45F-481F-ABD8-37D64173****",
"Engine": "MongoDB"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-06-27 | The internal configuration of the API is changed, but the call is not affected | View Change Details |