调用RestoreTable接口恢复RDS实例的某些数据库或表到原实例。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
rds:RestoreTable | WRITE |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
ClientToken | string | 否 | 用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符。 | ETnLKlblzczshOTUbOCzxxxxxxxxxx |
DBInstanceId | string | 是 | 实例ID。 | rm-uf6wjk5xxxxxxxxxx |
BackupId | string | 否 | 9026262 | |
RestoreTime | string | 否 | 备份保留周期内的任意时间点。格式:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 说明 | 2011-06-11T16:00:00Z |
TableMeta | string | 是 | 指定恢复的库表。格式:
| [{"type":"db","name":"testdb1","newname":"testdb1_new","tables":[{"type":"table","name":"testdb1table1","newname":"testdb1table1_new"}]}] |
InstantRecovery | boolean | 否 | true |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "EA2D4F34-01A7-46EB-A339-D80882135206"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidRestoreType.Format | Specified restore type is not valid. | 指定的恢复类型无效。请设置合理的恢复类型。 |
400 | InvalidRestoreTime.Format | Specified restore time is not valid. | 操作失败,当前指定的恢复时间无效,请重新设置恢复时间。 |
400 | InvalidBakset.Invalid | Specified bakset is not valid. | - |
400 | InvalidParamTableMeta | Invalid parameter TableMeta is null or not json format | 参数TableMeta不合法,请检查该参数的正确性。 |
400 | InvalidBakHistoryDO | BakHistory is inbalid when check restore TableMeta | - |
400 | InvalidBakTableMetaDO | BakTableMeta in BakHistory.Info is invalid | - |
400 | InvalidParamTableMeta.Content | TableMeta missing old dbname or new dbname, please check | 指定的table_meta参数缺少指定恢复的旧表和新表。 |
400 | InvalidParamTableMeta.Duplicate | TableMeta has duplicate db or table with other newname, commons or system | 操作失败,数据库中已存在指定恢复的库表。 |
400 | InvalidSourceRestoreDBName.NotFound | specific source restore dbname is not found in db list | 操作失败,备份集中不存在指定恢复的数据库。 |
400 | InvalidParamTableMetaForRestore.Content | new dbname or table in TableMeta cannot be same with old when restore to source instance | - |
400 | InvalidDBName.Duplicate | Specified DB name already exists in the This instance. | 当前实例中已存在相同的数据库名称。请更换名称。 |
400 | InvalidParameters.Format | Specified parameters is not valid. | 无效的参数。 |
400 | InvalidAvZone.Format | Specified AvZone is not valid. | 指定的AvZone不合法,请检查该参数的正确性。 |
400 | InvalidRegion.Format | Specified Region is not valid. | 指定的地域不合法,请检查该参数的正确性。 |
400 | InvalidIP.Format | Specified ip is not valid. | - |
400 | InvalidVpcParameter | Specified VPCId VSwitchId or IPAddress or TunnelId is not valid. | VPCId VSwitchId不合法,请检查VPCId VSwitchId的正确性。 |
400 | MissingUserID | The request is missing a user_id parameter. | 用户ID不存在。 |
400 | MissingUID | The request is missing a uid parameter. | 操作失败,当前请求缺失UID。 |
400 | MissBackupSetAndRestoreTime.NotFound | Both BackupSet and RestoreTime are null. | 操作失败,BackupSet和RestoreTime都为空。 |
400 | InvalidBakHistory.DbVersionMismatch | db version of bakhistory is mismatch with custins | 库表恢复不允许备份数据的版本和原实例版本不同 |
400 | DiskSize.NotEnough | The disk size is not enough to restore tables. | 磁盘剩余空间不足。 |
400 | InvalidSourceCategory | specified source category is not supported for this function. | - |
400 | RestoreTableException | RestoreTable Exception, result is null. | RestoreTable异常,结果为null。 |
403 | InvalidBackupLogStatus | Current backup log enable status does not support this operation. | 操作失败,日志备份未开启,无法按时间点恢复。 |
403 | IncorrectDBInstanceType | Current DB instance type does not support this operation. | 操作失败,该实例状态下不支持此操作。 |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | 当前实例状态不支持此操作。 |
403 | IncorrectBackupSetMethod | Current backup set method does not support operations. | 操作失败,指定的备份集不支持库表恢复。 |
403 | IncorrectBackupSetState | Current backup set state does not support operations. | 操作失败,当前备份集状态不支持此操作。 |
403 | ChildDBInstanceExists | Current DB instance had child instance. | 操作失败,只读实例已存在。 |
404 | InvalidBackup.NotFound | The available backup does not exist in recovery time. | 没有可用的备份集用于恢复数据。 |
404 | InvalidBinlog.NotFound | The available binlog does not exist in recovery time. | 指定恢复时间点的binlog无效。 |
404 | InvalidBackupSetID.NotFound | Specified backup set ID does not exist. | 备份集不存在。请查看已存在的备份集。 |
404 | InvalidDB.NotFound | Specified db does not exist or DB status does not support. | 指定的数据库不存在或数据库状态不支持。 |
404 | InvalidRegion.NotFound | Specified Region does not exist in RDS. | - |
404 | InsufficientResourceCapacity | There is insufficient capacity available for the requested instance. | - |
404 | InvalidDBInstance.NotFound | Specified instance does not exist or not support. | 指定的实例不存在指定的实例被删除或者实例不支持当前操作。 |
500 | ResourceConfigError | The request processing has failed due to resource config error. | 由于资源配置错误,请求处理失败。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-04-18 | OpenAPI 错误码发生变更 | |||||||||||
| ||||||||||||
2023-03-31 | OpenAPI 错误码发生变更 | |||||||||||
| ||||||||||||
2022-01-10 | OpenAPI 错误码发生变更 | |||||||||||
|