恢复PolarDB库表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
polardb:RestoreTable |
update |
*dbcluster
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DBClusterId |
string |
是 |
集群 ID。 说明
您可以通过 DescribeDBClusters 接口查询账号下所有集群的信息详情。 |
pc-bp*************** |
| TableMeta |
string |
是 |
需要还原的目标库表信息的 JSON 串,库表信息的值都是字符串类型。
例如, 说明
您可以通过 DescribeMetaList 接口查看支持恢复的库表名称详情,并将支持恢复的库表信息填入上述例子中的对应位置。 |
[ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ] |
| BackupId |
string |
否 |
备份集 ID。 说明
若需要按备份集还原目标库表,该参数必传。您可以通过 DescribeBackups 接口查看备份集 ID。 |
111111 |
| RestoreTime |
string |
否 |
还原时间点,格式为 YYYY-MM-DDThh:mmZ(UTC 时间)。 说明
|
2020-10-04T01:40:00Z |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
0C47508C-9DC8-455B-985E-2F2FA8****** |
示例
正常返回示例
JSON格式
{
"RequestId": "0C47508C-9DC8-455B-985E-2F2FA8******"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidRestoreType.Format | Specified restore type is not valid. | 操作失败,指定的还原类型无效。 |
| 400 | InvalidRestoreTime.Format | Specified restore time is not valid. | 操作失败,指定的恢复时间无效。 |
| 400 | InvalidBackupSetID.NotFound | Specified backup set ID does not exist. | |
| 400 | IncorrectBackupSetState | Current backup set state does not support operations. | |
| 400 | InvalidDBName.Duplicate | Specified DB name already exists in the This instance. | 操作失败,此实例中已存在指定的数据库名称。 |
| 400 | InvalidParameters.Format | Specified parameters is not valid. | 指定的参数无效。 |
| 400 | InsufficientResourceCapacity | There is insufficient capacity available for the requested instance. | 操作失败,请求的实例没有足够的可用容量。 |
| 400 | InvalidRestoreType.NotFound | At least one of BackupId and RestoreTime is malformed. | BackupId和RestoreTime中至少有一个格式不正 |
| 400 | MissingUserID | The request is missing a user_id parameter. | 请求缺少user_id参数 |
| 400 | MissingUID | The request is missing a uid parameter. | 请求缺少uid参数 |
| 403 | OperationDenied.ArchiveRestore | Archive instance does not support restore table. | 历史库不支持库表恢复 |
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 |
| 404 | InvalidBackup.NotFound | The available backup does not exist in recovery time. | 操作失败,可用备份在恢复时间内不存在。 |
| 404 | InvalidDBClusterId.NotFound | The DBInstanceId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。