public function deleteDBInstance($dBInstanceIdentifier, $skipFinalSnapshot = null, $finalDBSnapshotIdentifier = null)
{
$result = null;
$options = array('DBInstanceIdentifier' => (string) $dBInstanceIdentifier);
if ($skipFinalSnapshot !== null) {
$options['SkipFinalSnapshot'] = $skipFinalSnapshot ? 'true' : 'false';
}
if ($finalDBSnapshotIdentifier !== null) {
$options['FinalDBSnapshotIdentifier'] = (string) $finalDBSnapshotIdentifier;
if (isset($options['SkipFinalSnapshot']) && $options['SkipFinalSnapshot'] === 'true') {
throw new \InvalidArgumentException(sprintf('Specifiying FinalDBSnapshotIdentifier and also setting the ' . 'SkipFinalSnapshot parameter to true is forbidden.'));
}
}
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
if (!$this->exist($sxml->DeleteDBInstanceResult)) {
throw new RdsException(sprintf(self::UNEXPECTED, 'delete DBIntance'));
}
$result = $this->_loadDBInstanceData($sxml->DeleteDBInstanceResult->DBInstance);
}
return $result;
}