modify_db_parameter_group ( $db_parameter_group_name, $parameters, $opt )

Modifies the parameters of a DBParameterGroup. To modify more than one parameter submit a list of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters can be modified in a single request.

The apply-immediate method can be used only for dynamic parameters; the pending-reboot method can be used with MySQL and Oracle DB Instances for either dynamic or static parameters. For Microsoft SQL Server DB Instances, the pending-reboot method can be used only for static parameters.

Access

public

Parameters

Parameter

Type

Required

Description

$db_parameter_group_name

string

Required

The name of the DB Parameter Group. Constraints:

  • Must be the name of an existing DB Parameter Group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

$parameters

array

Required

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. Valid Values (for the application 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.

  • 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]

$opt

array

Optional

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

  • 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

Modify database parameter group values.

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

$response = $rds->modify_db_parameter_group('myParamGroup', array(
	array('ParameterName' => 'max_user_connections', 'ParameterValue' => '24',   'ApplyMethod' => 'pending-reboot'),
	array('ParameterName' => 'max_allowed_packet',   'ParameterValue' => '1024', 'ApplyMethod' => 'immediate'),
));

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

Related Methods

Source

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

public function modify_db_parameter_group($db_parameter_group_name, $parameters, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['DBParameterGroupName'] = $db_parameter_group_name;
    
    // Required list + map
    $opt = array_merge($opt, CFComplexType::map(array(
        'Parameters' => (is_array($parameters) ? $parameters : array($parameters))
    ), 'member'));

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback