public function deleteDBCluster($dBClusterIdentifier, $skipFinalSnapshot = true, $finalDBSnapshotIdentifier = null)
{
$result = null;
$options = ['DBClusterIdentifier' => (string) $dBClusterIdentifier];
$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->DeleteDBClusterResult)) {
throw new RdsException(sprintf(self::UNEXPECTED, 'delete DBCluster'));
}
$result = $this->_loadDBClusterData($sxml->DeleteDBClusterResult->DBCluster);
}
return $result;
}