modifyDBParameterGroup method

Future<DBParameterGroupNameMessage> modifyDBParameterGroup({
  1. required String dBParameterGroupName,
  2. required List<Parameter> parameters,
})

Modifies the parameters of a DB parameter group. 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.

May throw DBParameterGroupNotFoundFault. May throw InvalidDBParameterGroupStateFault.

Parameter dBParameterGroupName : The name of the DB parameter group.

Constraints:

  • If supplied, must match the name of an existing DBParameterGroup.

Parameter parameters : An array of parameter names, values, and the application methods for the parameter update. At least one parameter name, value, and application method must be supplied; later arguments are optional. A maximum of 20 parameters can 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.

When the application method is immediate, changes to dynamic parameters are applied immediately to the DB instances associated with the parameter group.

When the application method is pending-reboot, changes to dynamic and static parameters are applied after a reboot without failover to the DB instances associated with the parameter group. For more information on modifying DB parameters, see Working with DB parameter groups in the Amazon RDS User Guide.

Implementation

Future<DBParameterGroupNameMessage> modifyDBParameterGroup({
  required String dBParameterGroupName,
  required List<Parameter> parameters,
}) async {
  final $request = <String, String>{
    'DBParameterGroupName': dBParameterGroupName,
    if (parameters.isEmpty)
      'Parameters': ''
    else
      for (var i1 = 0; i1 < parameters.length; i1++)
        for (var e3 in parameters[i1].toQueryMap().entries)
          'Parameters.Parameter.${i1 + 1}.${e3.key}': e3.value,
  };
  final $result = await _protocol.send(
    $request,
    action: 'ModifyDBParameterGroup',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ModifyDBParameterGroupResult',
  );
  return DBParameterGroupNameMessage.fromXml($result);
}