public function promoteReadReplica($dBInstanceIdentifier, $backupRetentionPeriod = null, $preferredBackupWindow = null)
{
$result = null;
if ($dBInstanceIdentifier !== null) {
$options['DBInstanceIdentifier'] = (string) $dBInstanceIdentifier;
}
if ($backupRetentionPeriod !== null) {
$options['BackupRetentionPeriod'] = (int) $backupRetentionPeriod;
}
if ($preferredBackupWindow !== null) {
$options['PreferredBackupWindow'] = (string) $preferredBackupWindow;
}
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
if (!$this->exist($sxml->PromoteReadReplicaResult)) {
throw new RdsException(sprintf(self::UNEXPECTED, 'promote DBInstance Read Replica'));
}
$result = $this->_loadDBInstanceData($sxml->PromoteReadReplicaResult->DBInstance);
}
return $result;
}