You can call the CreateParameterGroup operation to create a parameter template.
You can configure a number of parameters at a time by using a parameter template and then apply the parameter template to an instance. For more information, see Use a parameter template to configure the parameters of ApsaraDB RDS for MySQL instances and Use a parameter template to configure the parameters of ApsaraDB RDS for PostgreSQL instances.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateParameterGroup | The operation that you want to perform. Set the value to CreateParameterGroup. |
RegionId | String | Yes | cn-hangzhou | The region ID of the parameter template. You can call the DescribeRegions operation to query the most recent region list. |
ParameterGroupName | String | Yes | test1234 | The name of the parameter template.
|
Engine | String | Yes | mysql | The database engine. Valid values:
|
EngineVersion | String | Yes | 5.7 | The database engine version that is run on the instance. Valid values:
|
Parameters | String | Yes | {"back_log":"3000","wait_timeout":"86400"} | 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 more information about the parameters that can be modified, see Modify the parameters of an ApsaraDB RDS for MySQL instance or Modify the parameters of an ApsaraDB RDS for PostgreSQL instance. |
ParameterGroupDesc | String | No | test | The description of the parameter template. The description can be up to 200 characters in length. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ParameterGroupId | String | rpg-q488w14xvsk**** | The ID of the parameter template. You can call the DescribeParameterGroups operation to query the IDs of parameter templates. |
RequestId | String | 7A41C147-C8D0-4DAE-A1A2-17EBCD60DFA1 | The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=CreateParameterGroup
&RegionId=cn-hangzhou
&ParameterGroupName=test1234
&Engine=mysql
&EngineVersion=5.7
&Parameters={"back_log":"3000","wait_timeout":"86400"}
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateParameterGroupResponse>
<ParameterGroupId>rpg-q488w14xvsk****</ParameterGroupId>
<RequestId>7A41C147-C8D0-4DAE-A1A2-17EBCD60DFA1</RequestId>
</CreateParameterGroupResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"ParameterGroupId" : "rpg-q488w14xvsk****",
"RequestId" : "7A41C147-C8D0-4DAE-A1A2-17EBCD60DFA1"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameters.Malformed | The specified parameter "Parameters" is not valid. | The error message returned because the value of the Parameters parameter is invalid. Specify a valid value. |
400 | ParamGroupsNameInvalid | The specified 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 (.), and underscores (_). The name must start with a letter. |
400 | InvalidEngine.Malformed | Specified engine is not valid. | The error message returned because the database engine is invalid. Specify a valid database engine. |
400 | InvalidEngineVersion.Malformed | Specified engine version is not valid. | The error message returned because the specified database engine version is invalid. Check the database engine version and try again. |
400 | ParamGroupsDbTypeNotSupport | The parameter group does not support the specified database type. | The error message returned because the parameter template is supported only for instances that run MySQL. |
400 | ParamGroupsDbVersionNotSupport | The parameter group does not support the database version. | The error message returned because the parameter template is supported only for instances that run MySQL 5.6, MySQL 5.7, or MySQL 8.0. |
400 | ParamNotExist | This param Not Exist | The error message returned because the parameter does not exist. Check the configuration of the Parameters parameter. |
400 | ParamTypeError | The parameter type error. | The error message returned because the parameter type is invalid. |
400 | ParamGroupsNotExistOrTypeNotSupport | The parameter group does not exist or its type is not supported. | The error message returned because the parameter template does not exist or the parameter template type is not supported. |
400 | InvalidRegion.Format | Specified Region is not valid. | The error message returned because the specified region is invalid. |
400 | InvalidParameters.Format | Specified parameter is not valid | The error message returned because the format of a specified parameter is invalid. |
400 | ParamGroupsDescInvalid | The maximum length of parameter group description is exceeded. | The error message returned because the description of the parameter template exceeds 200 characters in length. |
For a list of error codes, see Service error codes.