You can call the ModifyParameterGroup operation to modify a parameter template of an ApsaraDB RDS instance.

You can batch configure parameters in a parameter template and then apply it to your RDS instance. For more information, see Use a parameter template.

Note Parameter templates are supported only for RDS instances that run MySQL.

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 of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyParameterGroup

The operation that you want to perform. The operation that you want to perform. Set the value to ModifyParameterGroup.

ParameterGroupId String Yes rpg-xxxxxxx

The ID of the parameter template. You can call the DescribeParameterGroups operation to query the IDs of parameter templates.

ParameterGroupName String No testgroup1

The name of the parameter template.

  • The name can contain letters, digits, periods (.), and underscores (_) and must start with a letter.
  • The name can be 8 to 64 characters in length.
Note If you do not specify this parameter, the original name of the parameter template is retained.
ParameterGroupDesc String No test

The new description of the parameter template. The description can be up to 200 characters in length.

Note If you do not specify this parameter, the original description of the parameter template is retained.
Parameters String No null

A JSON string that consists of parameters and their values in the parameter template. Format: {"Parameter 1":"Value of Parameter 1","Parameter 2":"Value of Parameter 2"...}. For information about configurable parameters, see Configure the parameters of an ApsaraDB RDS for MySQL instance.

Note
  • If you set ModifyMode to Individual and specify this parameter, the new parameters overwrite the parameters in the original parameter template.
  • If you set ModifyMode to collectivity and specify this parameter, the new parameters are added to the original parameter template, or the parameters in the original parameter template are modified.
  • If you do not specify this parameter, the parameters in the original parameter template remain unchanged.
RegionId String Yes cn-hangzhou

The ID of the region where the instance resides. You can call the DescribeRegions operation to query the most recent region list.

Note The region of a parameter template cannot be changed. You can call the CloneParameterGroup operation to replicate a parameter template to a specific region.
ModifyMode String No collectivity

The modification mode of the parameter template. Valid values:

  • collectivity: adds new parameters or modifies original parameters. This is the default value.
    Note If you set ModifyMode to collectivity, the system adds the value of the parameters parameter to the original parameter template or modifies the corresponding parameters in the original parameter template. Other parameters in the original parameter template are not affected.
  • Individual: overwrites original parameters.
    Note If you set ModifyMode to Individual, the system uses the value of the parameters parameter to overwrite the original parameters.

Response parameters

Parameter Type Example Description
ParameterGroupId String rpg-13ppdh**********

The ID of the parameter template.

RequestId String 857DC00B-7B85-4853-8B27-AD65EB618BC6

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=ModifyParameterGroup
&RegionId=cn-hangzhou
&ParameterGroupId=rpg-13ppdhxxxxxxx
&Parameters={"back_log":"3000"}
&<Common request parameters>

Sample success responses

XML format

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

<ModifyParameterGroupResponse>
    <ParameterGroupId>rpg-13ppdh**********</ParameterGroupId>
    <RequestId>857DC00B-7B85-4853-8B27-AD65EB618BC6</RequestId>
</ModifyParameterGroupResponse>

JSON format

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

{
  "ParameterGroupId" : "rpg-13ppdh**********",
  "RequestId" : "857DC00B-7B85-4853-8B27-AD65EB618BC6"
}

Error codes

HTTP status code Error code Error message Description
400 ParamGroupsNameInvalid The parameter group name is invalid. The error message returned because the name of the parameter template is invalid. The name must be 8 to 64 characters in length and can contain letters, digits, periods (.), or underscores (_). The name must start with a letter.

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