All Products
Search
Document Center

ApsaraDB for MongoDB:RestoreDBInstance

Last Updated:Mar 15, 2024

Restores data to an ApsaraDB for MongoDB instance.

Operation description

This operation is applicable to replica set instances, but cannot be performed on standalone instances and sharded cluster instances. You can use the following methods to clone an instance: Create an instance from a backup point to clone a standalone instance. Call the CreateShardingDBInstance operation to clone a sharded cluster instance.

Note This operation overwrites the data of the current instance, and the data cannot be recovered. Proceed with caution.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
dds:RestoreDBInstanceWRITE
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

dds-bp2356****
BackupIdintegerYes

The ID of the backup set.

Note You can call the DescribeBackups operation to query the backup set ID.
22536****

Response parameters

ParameterTypeDescriptionExample
object

The data that is returned.

RequestIdstring

The request ID.

973DCB8F-56B3-4102-8777-3A90495927F7

Examples

Sample success responses

JSONformat

{
  "RequestId": "973DCB8F-56B3-4102-8777-3A90495927F7"
}

Error codes

HTTP status codeError codeError message
403InvalidBackupID.NotFoundSpecified backup set ID does not exist.
403OperationDenied.InsufficientResourceCapacityThe operation is not permitted due to InsufficientResourceCapacity of instance.
403OperationDenied.DBInstanceThe operation is not permitted due to type of instance.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403