Scalr\Service\Aws\Rds\V20141031\RdsApi::restoreDBClusterFromSnapshot PHP Method

restoreDBClusterFromSnapshot() public method

Creates a new DB cluster from a DB cluster snapshot. The target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
public restoreDBClusterFromSnapshot ( Scalr\Service\Aws\Rds\DataType\RestoreDBClusterFromSnapshotRequestData $request ) : DBClusterData
$request Scalr\Service\Aws\Rds\DataType\RestoreDBClusterFromSnapshotRequestData The request object.
return Scalr\Service\Aws\Rds\DataType\DBClusterData Returns DBClusterData on success or throws an exception.
    public function restoreDBClusterFromSnapshot(RestoreDBClusterFromSnapshotRequestData $request)
    {
        $result = null;
        $options = $request->getQueryArray();
        $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->_loadDBClusterData($ptr->DBCluster);
        }
        return $result;
    }
RdsApi