Modifies the parameters of a specified PolarDB cluster or applies existing parameter templates to a specified cluster.

PolarDB supports the parameter template feature to centrally manage clusters. You can configure a number of parameters at a time by using a parameter template and apply the template to a PolarDB cluster. For more information, see Use a parameter template.

Note Only PolarDB for MySQL clusters support parameter templates.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesModifyDBClusterParameters

The operation that you want to perform. The operation that you want to perform. Set this parameter to ModifyDBClusterParameters.

DBClusterIdStringYespc-**************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query information about all your PolarDB clusters that are deployed in a specified region. The returned information includes the ID of each cluster.
ParametersStringNo{"wait_timeout":"86","innodb_old_blocks_time":"10"}

The JSON string that consists of parameters and values. The parameter values are strings, for example, {"wait_timeout":"86","innodb_old_blocks_time":"10"}.

Note
  • You can call the DescribeDBClusterParameters operation to query the parameters of the PolarDB cluster.
  • For PolarDB for PostgreSQL clusters or PolarDB for PostgreSQL(Compatible with Oracle) rclusters, this parameter is required.
  • For PolarDB for MySQL clusters, you must specify this parameter or the ParameterGroupId parameter.
ParameterGroupIdStringNopcpg-**************

The ID of the parameter template.

Note
  • You can call the DescribeParameterGroups operation to query the parameter template ID.
  • You must specify this parameter or the Parameters parameter.
  • This parameter is supported by only PolarDB for MySQL clusters.
PlannedStartTimeStringNo2022-04-28T14:00:00Z

The earliest time to upgrade the specifications within the scheduled time period. Specify the time in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

Note
  • The earliest start time of the task can be a point in time within the next 24 hours. For example, if the current time is 2021-01-14T09:00:00Z, you can specify a point in the time range from 2021-01-14T09:00:00Z to 2021-01-15T09:00:00Z.
  • If this parameter is empty, the upgrade task is immediately performed.
PlannedEndTimeStringNo2022-04-28T14:30:00Z

The lastest time to upgrade the specifications within the scheduled time period. Specify the time in the YYYY-MM-DDThh:mm:ssZ format. The time must be in UTC.

Note
  • The value of this parameter must be at least 30 minutes later than the value of the PlannedStartTime parameter.
  • If you specify the PlannedStartTime parameter but do not specify a value for the PlannedEndTime parameter, the latest start time of the task is set to a value that is calculated by the value of the PlannedEndTime parameter + 30 minutes by default. For example, if you set the PlannedStartTime parameter to 2021-01-14T09:00:00Z and you do not specify the PlannedEndTime parameter, the latest start time of the task is set to 2021-01-14T09:30:00Z.
FromTimeServiceBooleanNofalse

Specifies an immediate or scheduled task to modify parameters and restart the cluster. Default value: false. Valid values:

  • false: scheduled task
  • true: immediate task

Response parameters

ParameterTypeExampleDescription
RequestIdStringC5D526E5-91B5-48B8-B980-FE07FF******

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=ModifyDBClusterParameters
&DBClusterId=pc-**************
&<Common request parameters>

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyDBClusterParametersResponse>
<RequestId>C5D526E5-91B5-48B8-B980-FE07FF******</RequestId>
</ModifyDBClusterParametersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "C5D526E5-91B5-48B8-B980-FE07FF******"
}

Error codes

HttpCodeError codeError messageDescription
400InvalidParameters.FormatSpecified parameters is not valid.The error message returned because a specified parameter is invalid.
400InvalidParameters.FormatThe specified parameters are invalid.The error message returned because the specified parameters are invalid.
400MinorVersionNotSupportCustins minor version does not support current action.The error message returned because the operation is not supported while the cluster is of the current minor version. Update the minor version to the latest.

For a list of error codes, visit the API Error Center.