restoreDbInstanceFromDbSnapshot

Creates a new DB instance from a DB snapshot. The target database is created from the source database restore point with most of the source's original configuration, including the default security group and DB parameter group. By default, the new DB instance is created as a Single-AZ deployment, except when the instance is a SQL Server instance that has an option group associated with mirroring. In this case, the instance becomes a Multi-AZ deployment, not a Single-AZ deployment.

If you want to replace your original DB instance with the new, restored DB instance, then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot operation. RDS doesn't allow two DB instances with the same name. After you have renamed your original DB instance with a different identifier, then you can pass the original name of the DB instance as the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot operation. The result is that you replace the original DB instance with the DB instance created from the snapshot.

If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.

This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora, use RestoreDBClusterFromSnapshot.

Samples


fun main() { 
   //sampleStart 
   // The following example creates a new DB instance named db7 new instance with the db. t3. small DB
// instance class from the specified DB snapshot. The source DB instance from which the snapshot was taken uses
// a deprecated DB instance class, so you can t upgrade it.
val resp = rdsClient.restoreDbInstanceFromDbSnapshot {
    dbInstanceIdentifier = "db7-new-instance"
    dbSnapshotIdentifier = "db7-test-snapshot"
    dbInstanceClass = "db.t3.small"
} 
   //sampleEnd
}