All Products
Search
Document Center

ApsaraDB RDS:CheckCreateDdrDBInstance

Last Updated:Sep 27, 2024

Queries whether an instance can be restored by using a cross-region backup set.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server
Note If your ApsaraDB RDS for PostgreSQL instance uses the new architecture and is created after October 10, 2022, this feature is not supported for the RDS instance. For more information, see [Notice] SLR authorization is required to create an ApsaraDB RDS for PostgreSQL instance from October 10, 2022.

References

Note Before you call this operation, carefully read the following documentation. Make sure that you fully understand the prerequisites and impacts for calling this operation.

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
rds:CheckCreateDdrDBInstanceget
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the destination instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
EnginestringYes

The database engine of the destination instance. Valid values:

  • MySQL
  • SQLServer
  • PostgreSQL
MySQL
EngineVersionstringYes

The major engine version of the destination instance. The value of this parameter varies based on the value of Engine.

  • Valid values when Engine is set to MySQL: 5.5, 5.6, 5.7, and 8.0
  • Valid values when Engine is set to SQLServer: 2008r2, 08r2_ent_ha, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_std_ha, 2017_ent, 2019_std_ha, and 2019_ent
  • PostgreSQL: 10.0, 11.0, 12.0, 13.0, 14.0, and 15.0
5.6
DBInstanceClassstringYes

The instance type of the destination instance. For more information, see Primary ApsaraDB RDS instance types.

rds.mysql.s1.small
DBInstanceStorageintegerYes

The storage capacity of the destination instance. Valid values: 5 to 2000. Unit: GB. You can increase the storage capacity in increments of 5 GB. For more information, see Primary instance types.

20
RestoreTypestringYes

The method that is used to restore data. Valid values:

  • 0: restores data from a backup set. If you set this parameter to 0, you must also specify the BackupSetId parameter.
  • 1: restores data to a point in time. If you set this parameter to 1, you must also specify the RestoreTime, SourceRegion, and SourceDBInstanceName parameters.

Default value: 0.

0
BackupSetIdstringNo

The ID of the backup set that is used for the restoration. You can call the DescribeCrossRegionBackups operation to query the backup set ID.

Note This parameter must be specified when the RestoreType parameter is set to 0.
14358
RestoreTimestringNo

The point in time to which you want to restore data. The point in time that you specify must be earlier than the current time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Note If you set RestoreType to 1, you must also specify this parameter.
2019-05-30T03:29:10Z
SourceRegionstringNo

The region ID of the source instance if you want to restore data to a point in time.

Note If you set RestoreType to 1, you must also specify this parameter.
cn-hangzhou
SourceDBInstanceNamestringNo

The ID of the source instance if you want to restore data to a point in time.

Note This parameter must be specified when the RestoreType parameter is set to 1.
rm-uf6wjk5xxxxxxx
ResourceGroupIdstringNo

The resource group ID. You can call the DescribeDBInstanceAttribute to query the resource group ID.

rg-acfmy****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

IsValidstring

Indicates whether the data of the source instance can be restored across regions. Valid values:

  • true
  • false
true
RequestIdstring

The request ID.

1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC

Examples

Sample success responses

JSONformat

{
  "IsValid": "true",
  "RequestId": "1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC"
}

Error codes

HTTP status codeError codeError messageDescription
400IncorrectDBInstanceTypeCurrent DB instance engine and type does not support operations.The operation failed. The operation is not supported for the database engine of the RDS instance.
400InvalidRestoreType.FormatSpecified restore type is not valid.The restoration type is invalid. Specify a valid restoration type.
400NoBackupSetRegionBackupSetRegion is absence.The backup region does not exist.
400IncorrectBackupSetTypeBackup set type should be ddr.The type of backup set must be DDR.
400NoSourceInstanceNameNo SourceDBInstanceName.The source instance name is not found.
400NoAvailableDisasterRestoreBaksetNo available disaster restore bakset.No available restore set is found.
400IncorrectBackupSetMethodCurrent backup set method does not support operations.The operation failed. The data backup file does not support the restoration of individual databases and tables.
400InvalidBackupType.FormatSpecified backup type is not valid.The operation failed. The backup type is invalid.
400IncorrectEngineVersionCurrent engine version does not support operations.The operation failed. The operation is not supported for the version of the database engine that is run on the RDS instance.
400IncorrectBaksetVersionCurrent bakset version does not support operations.The operation failed. The operation is not supported for the version of the data backup file.
400CrossRegionUnsupportTDECross-region disaster restore not support TDE bakset.-
400DisasterRestoreRegionNotMatchedDisaster restore should be operated in the ddr region or source region.-
400InvalidMinorVersion.NotFoundSpecified minor version does not exists.The operation failed. The database engine version cannot be found.
400InvalidDBInstanceId.MalFormedThe specified parameter DBInstanceId is not valid.The instance ID is invalid. Check the instance ID.
400InvalidEngine.MalformedSpecified engine is not valid.The database engine is invalid. Specify a valid database engine.
400InvalidEngineVersion.MalformedSpecified engine version is not valid.The database engine version is invalid. Check the database engine version and try again.
400MissingUserIDThe request is missing a user_id parameter.The user ID cannot be found.
400MissingUIDThe request is missing a uid parameter.The operation failed. The UID in the request is left unspecified.
400UserPermissionFailureThe request processing has failed due to user permission.-
400InvalidServiceType.FormatSpecified service type is not valid.The service type is invalid. Set the service type to 0 or 1. The value 0 indicates an Alibaba Cloud service, and the value 1 indicates a JST service.
400InvalidStorage.FormatSpecified Storage is not valid.The value of the Storage parameter is invalid. Specify a valid value.
403IncorrectDBTypeThe current DB type does not support this operation.The operation failed. The operation is not supported by the database engine of the RDS instance. Specify a different database engine.
403IncorrectDBInstanceThe current DB instance does not support this operation.The operation failed. The operation is not supported for the RDS instance.
403ResourceConfigErrorThe request processing has failed due to resource config error.-
404RestoreType.NotFoundRestoreType is not found.RestoreType is not found.
404InvalidBackupSetID.NotFoundSpecified backup set ID does not exist.The backup set does not exist. Specify an available backup set.
404InvalidDBInstance.NotFoundThe specified instance does not exist or is not supported.The RDS instance cannot be found. Check the ID or name of the RDS instance.
404InvalidDBInstanceClass.NotFoundSpecified DB instance class is not found.The configuration or the instance type cannot be found or has been discontinued. Specify a different configuration or a different instance type.

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

Change history

Change timeSummary of changesOperation
2023-07-25The Error code has changed. The request parameters of the API has changedView Change Details
2022-09-01The Error code has changedView Change Details