Scalr\Service\Aws\Rds\V20141031\RdsApi::deleteDBSnapshot PHP Метод

deleteDBSnapshot() публичный Метод

Deletes a DBSnapshot. Note! The DBSnapshot must be in the available state to be deleted
public deleteDBSnapshot ( string $dBSnapshotIdentifier ) : DBSnapshotData
$dBSnapshotIdentifier string The Identifier for the DB Snapshot to delete.
Результат Scalr\Service\Aws\Rds\DataType\DBSnapshotData Returns DBSnapshotData on success or throws an exception.
    public function deleteDBSnapshot($dBSnapshotIdentifier)
    {
        $result = null;
        $options = array('DBSnapshotIdentifier' => (string) $dBSnapshotIdentifier);
        $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->_loadDBSnapshotData($ptr->DBSnapshot);
        }
        return $result;
    }
RdsApi