You can call this operation to check whether an ApsaraDB for MongoDB instance meets the data recovery conditions.
This operation is applicable to replica set instances or sharded cluster instances.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CheckRecoveryCondition |
The operation that you want to perform. Set the value to CheckRecoveryCondition. |
SourceDBInstance | String | Yes | dds-bpxxxxxxxx |
The ID of the source instance. |
DatabaseNames | String | No | ["db1","db2"] |
The name of the source database. The value is a JSON array. Note If you do not specify this parameter, all databases are restored.
|
RestoreTime | String | No | 2019-08-22T08:00:00Z |
The point in time to which the instance is restored. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
|
BackupId | String | No | 5664xxxx |
The ID of the backup. Note
|
ResourceGroupId | String | No | sg-bpxxxxxxxxxxxxxxxxxx |
The ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
IsValid | Boolean | true |
Indicates whether the recovery conditions are met. Valid values:
|
RequestId | String | D563A3E7-6010-45FE-A0CD-9283414C9657 |
The ID of the request. |
DBInstanceName | String | dds-bpxxxxxxxx |
The ID of the instance. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/? Action=CheckRecoveryCondition
&SourceDBInstance=dds-bpxxxxxxxx
&RestoreTime=2019-08-22T08:00:00Z
&<Common request parameters>
Sample success responses
XML
format
<CheckRecoveryConditionResponse>
<IsValid>true</IsValid>
<RequestId>D563A3E7-6010-45FE-A0CD-9283414C9657</RequestId>
<DBInstanceName>dds-bpxxxxxxxx</DBInstanceName>
</CheckRecoveryConditionResponse>
JSON
format
{
"IsValid": true,
"RequestId": "D563A3E7-6010-45FE-A0CD-9283414C9657",
"DBInstanceName": "dds-bpxxxxxxxx"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | IncorrectDBInstanceType | Current DB instance type does not support this operation. | The error message returned because the operation is not supported by the current instance type. |
For a list of error codes, visit the API Error Center.