Restores PolarDB databases and tables.
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 |
---|---|---|---|---|
polardb:RestoreTable | update | *dbcluster acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The cluster ID. Note
You can call the DescribeDBClusters operation to query the details of all clusters within your account.
| pc-bp*************** |
TableMeta | string | Yes | The JSON string that contains the information of the database and the table that you want to restore. All values of the database and table information are of the string type. Example: Note
You can call the DescribeMetaList operation to query the names and details of databases and tables that can be restored and enter their information into the corresponding locations in the preceding example.
| [ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ] |
BackupId | string | No | The ID of the backup set. Note
You must specify this parameter if you need to restore a database or a table by using a backup set. You can call the DescribeBackups operation to query the ID of the backup set.
| 111111 |
RestoreTime | string | No | The point in time for the restoration. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time must be in UTC. Note
| 2020-10-04T01:40:00Z |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0C47508C-9DC8-455B-985E-2F2FA8******"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRestoreType.Format | Specified restore type is not valid. | The specified restore type is invalid. |
400 | InvalidRestoreTime.Format | Specified restore time is not valid. | The specified restoration time is invalid. |
400 | InvalidBackupSetID.NotFound | Specified backup set ID does not exist. | The specified backup set ID does not exist. |
400 | IncorrectBackupSetState | Current backup set state does not support operations. | This operation is not supported while the backup set is in the current state. |
400 | InvalidDBName.Duplicate | Specified DB name already exists in the This instance. | The specified DBName parameter already exists in the cluster. |
400 | InvalidParameters.Format | Specified parameters is not valid. | The specified parameters are invalid. |
400 | InsufficientResourceCapacity | There is insufficient capacity available for the requested instance. | Insufficient storage capacity for the specified cluster. |
400 | InvalidRestoreType.NotFound | At least one of BackupId and RestoreTime is malformed. | The format of the specified BackupId or RestoreTime parameter is invalid. |
400 | MissingUserID | The request is missing a user_id parameter. | You must specify the UserID parameter in the request. |
400 | MissingUID | The request is missing a uid parameter. | You must specify the UID parameter in the request. |
403 | OperationDenied.ArchiveRestore | Archive instance does not support restore table. | Archive Database does not support the database and table restoration feature. |
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
404 | InvalidBackup.NotFound | The available backup does not exist in recovery time. | The specified backup does not exist within the time range for restoration. |
404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-12 | The Error code has changed | View Change Details |