Scalr\Service\Aws\Rds\V20130110\RdsApi::describeDBParameters PHP Method

describeDBParameters() public method

Returns the detailed parameter list for a particular DBParameterGroup.
public describeDBParameters ( string $dBParameterGroupName, string $source = null, string $marker = null, integer $maxRecords = null ) : Scalr\Service\Aws\Rds\DataType\ParameterList
$dBParameterGroupName string The name of the DB Parameter Group.
$source string optional The parameter types to return.
$marker string optional An optional pagination token provided by a previous DescribeDBParameterGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
$maxRecords integer optional The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results may be retrieved.
return Scalr\Service\Aws\Rds\DataType\ParameterList Returns ParameterList on success or throws an exception.
    public function describeDBParameters($dBParameterGroupName, $source = null, $marker = null, $maxRecords = null)
    {
        $result = null;
        $options = array('DBParameterGroupName' => (string) $dBParameterGroupName);
        $action = ucfirst(__FUNCTION__);
        if ($source !== null) {
            $options['Source'] = (string) $source;
        }
        if ($marker !== null) {
            $options['Marker'] = (string) $marker;
        }
        if ($maxRecords !== null) {
            $options['MaxRecords'] = (int) $maxRecords;
        }
        $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 = new ParameterList();
            $result->setRds($this->rds);
            $result->marker = $this->exist($ptr->Marker) ? (string) $ptr->Marker : null;
            if (isset($ptr->Parameters->Parameter)) {
                foreach ($ptr->Parameters->Parameter as $v) {
                    $item = $this->_loadParameterData($v);
                    $result->append($item);
                    unset($item);
                }
            }
        }
        return $result;
    }