Skip to content

reset_db_parameter_group

reset_db_parameter_group(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_parameter_group_name: Optional[String] = None,
    reset_all_parameters: Optional[Boolean] = None,
    parameters: Optional[ParametersList] = None,
) -> DBParameterGroupNameMessage

Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, provide a list of the following: ParameterName and ApplyMethod. To reset the entire DB parameter group, 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.

Parameters:

  • db_parameter_group_name (Optional[String], default: None ) –

    The name of the DB parameter group.

    Constraints:

    • Must match the name of an existing DBParameterGroup.

  • reset_all_parameters (Optional[Boolean], default: None ) –

    Specifies whether to reset all parameters in the DB parameter group to default values. By default, all parameters in the DB parameter group are reset to default values.

  • parameters (Optional[ParametersList], default: None ) –

    To reset the entire DB parameter group, specify the DBParameterGroup name and ResetAllParameters parameters. To reset specific parameters, provide a list of the following: ParameterName and ApplyMethod. A maximum of 20 parameters can 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.

    MariaDB

    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

Raises:

  • DBParameterGroupNotFoundFault –

    DBParameterGroupName doesn't refer to an existing DB parameter group.

  • InvalidDBParameterGroupStateFault –

    The DB parameter group is in use or is in an invalid state. If you are attempting to delete the parameter group, you can't delete it when the parameter group is in this state.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To reset all parameters to their default values The following example resets all parameter values in a customer-created DB parameter group to their default values.

>>> client.reset_db_parameter_group(db_parameter_group_name='mypg', reset_all_parameters=True)
Source code in docs_src/capo_rds/_services/rds.py
def reset_db_parameter_group(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_parameter_group_name: Optional["capo_rds.types.string.String"] = None,
    reset_all_parameters: Optional["capo_rds.types.boolean.Boolean"] = None,
    parameters: Optional["capo_rds.types.parameters_list.ParametersList"] = None,
) -> "capo_rds.types.db_parameter_group_name_message.DBParameterGroupNameMessage":
    """<p>Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, provide a list of the following: <code>ParameterName</code> and <code>ApplyMethod</code>. To reset the entire DB parameter group, specify the <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters. When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to <code>pending-reboot</code> to take effect on the next DB instance restart or <code>RebootDBInstance</code> request.</p>

    Args:
        db_parameter_group_name: <p>The name of the DB parameter group.</p> <p>Constraints:</p> <ul> <li> <p>Must match the name of an existing <code>DBParameterGroup</code>.</p> </li> </ul>
        reset_all_parameters: <p>Specifies whether to reset all parameters in the DB parameter group to default values. By default, all parameters in the DB parameter group are reset to default values.</p>
        parameters: <p>To reset the entire DB parameter group, specify the <code>DBParameterGroup</code> name and <code>ResetAllParameters</code> parameters. To reset specific parameters, provide a list of the following: <code>ParameterName</code> and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single request.</p> <p> <b>MySQL</b> </p> <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code> </p> <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p> <p> <b>MariaDB</b> </p> <p>Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code> </p> <p>You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB instance reboots.</p> <p> <b>Oracle</b> </p> <p>Valid Values (for Apply method): <code>pending-reboot</code> </p>

    Raises:
        capo_rds.errors.db_parameter_group_not_found_fault.DBParameterGroupNotFoundFault: <p> <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.</p>
        capo_rds.errors.invalid_db_parameter_group_state_fault.InvalidDBParameterGroupStateFault: <p>The DB parameter group is in use or is in an invalid state. If you are attempting to delete the parameter group, you can't delete it when the parameter group is in this state.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To reset all parameters to their default values
        The following example resets all parameter values in a customer-created DB parameter group to their default values.

        >>> client.reset_db_parameter_group(db_parameter_group_name='mypg', reset_all_parameters=True)
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.reset_db_parameter_group_message.ResetDBParameterGroupMessage]",
    ) -> OperationResponse[
        "capo_rds.types.db_parameter_group_name_message.DBParameterGroupNameMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.reset_db_parameter_group

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.reset_db_parameter_group.reset_db_parameter_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ResetDBParameterGroup")
    )
    input_: capo_rds.types.reset_db_parameter_group_message.ResetDBParameterGroupMessage = {}
    if db_parameter_group_name is not None:
        input_["db_parameter_group_name"] = db_parameter_group_name
    if reset_all_parameters is not None:
        input_["reset_all_parameters"] = reset_all_parameters
    if parameters is not None:
        input_["parameters"] = parameters

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output