public delete ( boolean $skipFinalSnapshot = null, string $finalDBSnapshotIdentifier = null ) : |
||
$skipFinalSnapshot | boolean | optional Determines whether a final DB Snapshot is created before the DB Instance is deleted |
$finalDBSnapshotIdentifier | string | optional The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to false |
return | Returns created DBInstance |
public function delete($skipFinalSnapshot = null, $finalDBSnapshotIdentifier = null)
{
$this->throwExceptionIfNotInitialized();
return $this->getRds()->dbInstance->delete($this->dBInstanceIdentifier, $skipFinalSnapshot, $finalDBSnapshotIdentifier);
}
/** * Remove test instance * @param DBInstanceData $dbi * @throws ClientException */ protected function removeDBInstance(DBInstanceData $dbi) { $dbi->delete(true); $this->assertInstanceOf($this->getRdsClassName('DataType\\DBInstanceData'), $dbi); for ($to = 1, $t = time(); time() - $t < 600 && $dbi->dBInstanceStatus == DBInstanceData::STATUS_DELETING; $to += 10) { sleep($to); try { $dbi = $dbi->refresh(); } catch (ClientException $e) { if ($e->getErrorData()->getCode() == ErrorData::ERR_DB_INSTANCE_NOT_FOUND) { break; } throw $e; } } }