Skip to content

modify_db_cluster_parameter_group

modify_db_cluster_parameter_group(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_cluster_parameter_group_name: Optional[String] = None,
    parameters: Optional[ParametersList] = None,
) -> DBClusterParameterGroupNameMessage

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

There are two types of parameters - dynamic parameters and static parameters. Changes to dynamic parameters are applied to the DB cluster immediately without a reboot. Changes to static parameters are applied only after the DB cluster is rebooted, which can be done using RebootDBCluster operation. You can use the Parameter Groups option of the Amazon RDS console or the DescribeDBClusterParameters operation to verify that your DB cluster parameter group has been created or modified.

For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide.

For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide.

Parameters:

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

    The name of the DB cluster parameter group to modify.

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

    A list of parameters in the DB cluster parameter group to modify.

    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 clusters 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 clusters associated with the parameter group.

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 modify parameters in a DB cluster parameter group The following example modifies the values of parameters in a DB cluster parameter group.

>>> client.modify_db_cluster_parameter_group(db_cluster_parameter_group_name='mydbclusterpg', parameters=[{'ParameterName': 'server_audit_logging', 'ParameterValue': '1', 'ApplyMethod': 'immediate'}, {'ParameterName': 'server_audit_logs_upload', 'ParameterValue': '1', 'ApplyMethod': 'immediate'}])
Source code in docs_src/capo_rds/_services/rds.py
def modify_db_cluster_parameter_group(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_cluster_parameter_group_name: Optional[
        "capo_rds.types.string.String"
    ] = None,
    parameters: Optional["capo_rds.types.parameters_list.ParametersList"] = None,
) -> "capo_rds.types.db_cluster_parameter_group_name_message.DBClusterParameterGroupNameMessage":
    """<p>Modifies the parameters of a DB cluster parameter group. To modify more than one parameter, submit a list of the following: <code>ParameterName</code>, <code>ParameterValue</code>, and <code>ApplyMethod</code>. A maximum of 20 parameters can be modified in a single request.</p> <important> <p>There are two types of parameters - dynamic parameters and static parameters. Changes to dynamic parameters are applied to the DB cluster immediately without a reboot. Changes to static parameters are applied only after the DB cluster is rebooted, which can be done using <code>RebootDBCluster</code> operation. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon RDS console</a> or the <code>DescribeDBClusterParameters</code> operation to verify that your DB cluster parameter group has been created or modified.</p> </important> <p>For more information on Amazon Aurora DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p> <p>For more information on Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html"> Multi-AZ DB cluster deployments</a> in the <i>Amazon RDS User Guide.</i> </p>

    Args:
        db_cluster_parameter_group_name: <p>The name of the DB cluster parameter group to modify.</p>
        parameters: <p>A list of parameters in the DB cluster parameter group to modify.</p> <p>Valid Values (for the application method): <code>immediate | pending-reboot</code> </p> <note> <p>You can use the <code>immediate</code> value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters.</p> <p>When the application method is <code>immediate</code>, changes to dynamic parameters are applied immediately to the DB clusters associated with the parameter group. When the application method is <code>pending-reboot</code>, changes to dynamic and static parameters are applied after a reboot without failover to the DB clusters associated with the parameter group.</p> </note>

    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 modify parameters in a DB cluster parameter group
        The following example modifies the values of parameters in a DB cluster parameter group.

        >>> client.modify_db_cluster_parameter_group(db_cluster_parameter_group_name='mydbclusterpg', parameters=[{'ParameterName': 'server_audit_logging', 'ParameterValue': '1', 'ApplyMethod': 'immediate'}, {'ParameterName': 'server_audit_logs_upload', 'ParameterValue': '1', 'ApplyMethod': 'immediate'}])
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.modify_db_cluster_parameter_group_message.ModifyDBClusterParameterGroupMessage]",
    ) -> OperationResponse[
        "capo_rds.types.db_cluster_parameter_group_name_message.DBClusterParameterGroupNameMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.modify_db_cluster_parameter_group

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyDBClusterParameterGroup")
    )
    input_: capo_rds.types.modify_db_cluster_parameter_group_message.ModifyDBClusterParameterGroupMessage = {}
    if db_cluster_parameter_group_name is not None:
        input_["db_cluster_parameter_group_name"] = db_cluster_parameter_group_name
    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