Scalr\Service\Aws\Rds\V20141031\RdsApi::restoreDBInstanceFromDBSnapshot PHP Method

restoreDBInstanceFromDBSnapshot() public method

Creates a new DB Instance from a DB snapshot.The target database is created from the source database restore point with the same configuration as the original source database, except that the new RDS instance is created with the default security group.
public restoreDBInstanceFromDBSnapshot ( Scalr\Service\Aws\Rds\DataType\RestoreDBInstanceFromDBSnapshotRequestData $request ) : DBInstanceData
$request Scalr\Service\Aws\Rds\DataType\RestoreDBInstanceFromDBSnapshotRequestData The request object.
return Scalr\Service\Aws\Rds\DataType\DBInstanceData Returns DBInstanceData on success or throws an exception.
    public function restoreDBInstanceFromDBSnapshot(RestoreDBInstanceFromDBSnapshotRequestData $request)
    {
        $result = null;
        $options = $request->getQueryArray();
        $action = ucfirst(__FUNCTION__);
        $response = $this->client->call($action, $options);
        if ($response->getError() === false) {
            $sxml = simplexml_load_string($response->getRawContent());
            if (!$this->exist($sxml->{$action . 'Result'})) {
                throw new RdsException(sprintf(self::UNEXPECTED, $action));
            }
            $ptr = $sxml->{$action . 'Result'};
            $result = $this->_loadDBInstanceData($ptr->DBInstance);
        }
        return $result;
    }
RdsApi