reset_db_parameter_group ( $db_parameter_group_name, $opt )

Modifies the parameters of a DBParameterGroup to the engine/system default value. To reset specific parameters submit a list of the following: ParameterName and ApplyMethod. To reset the entire DBParameterGroup specify the DBParameterGroup name and ResetAllParameters parameters. When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to pending-reboot to take effect on the next DB instance restart or RebootDBInstance request.

Access

public

Parameters

Parameter

Type

Required

Description

$db_parameter_group_name

string

Required

The name of the DB Parameter Group. Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • ResetAllParameters - boolean - Optional - Specifies whether (true) or not (false) to reset all parameters in the DB Parameter Group to default values. Default: true
  • Parameters - array - Optional - An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request. MySQL Valid Values (for Apply method): immediate | pending-reboot You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when DB Instance reboots. Oracle Valid Values (for Apply method): pending-reboot
    • x - array - Optional - This represents a simple array index.
      • ParameterName - string - Optional - Specifies the name of the parameter.
      • ParameterValue - string - Optional - Specifies the value of the parameter.
      • Description - string - Optional - Provides a description of the parameter.
      • Source - string - Optional - Indicates the source of the parameter value.
      • ApplyType - string - Optional - Specifies the engine specific parameters type.
      • DataType - string - Optional - Specifies the valid data type for the parameter.
      • AllowedValues - string - Optional - Specifies the valid range of values for the parameter.
      • IsModifiable - boolean - Optional - Indicates whether (true) or not (false) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.
      • MinimumEngineVersion - string - Optional - The earliest engine version to which the parameter can apply.
      • ApplyMethod - string - Optional - Indicates when to apply parameter updates. [Allowed values: immediate, pending-reboot]
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Reset database parameter group values.

// Instantiate the class
$rds = new AmazonRDS();

$response = $rds->reset_db_parameter_group('myParamGroup', array(
	'Parameters' => array(
		array('ParameterName' => 'max_user_connections', 'ApplyMethod' => 'pending-reboot'),
		array('ParameterName' => 'max_allowed_packet',   'ApplyMethod' => 'immediate'),
	)
));

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/rds.class.php | Toggle source view (16 lines) | View on GitHub

public function reset_db_parameter_group($db_parameter_group_name, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['DBParameterGroupName'] = $db_parameter_group_name;
    
    // Optional list + map
    if (isset($opt['Parameters']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'Parameters' => $opt['Parameters']
        ), 'member'));
        unset($opt['Parameters']);
    }

    return $this->authenticate('ResetDBParameterGroup', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback