All Products
Search
Document Center

PolarDB:CreateParameterGroup

Last Updated:Jun 17, 2024

Creates a parameter template.

Operation description

You can use parameter templates to manage multiple parameters at a time and apply existing parameters to a PolarDB cluster. For more information, see Use a parameter template.

Note You can call this operation only on a PolarDB for MySQL cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
polardb:CreateParameterGroupWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

Note You can call the DescribeRegions operation to query available regions.
cn-hangzhou
DBTypestringYes

The type of the database engine. Only MySQL is supported.

MySQL
DBVersionstringYes

The version of the database engine. Valid values:

  • 5.6
  • 5.7
  • 8.0
8.0
ParameterGroupNamestringYes

The name of the parameter template. The name must meet the following requirements:

  • It can contain letters, digits, and underscores (_). It must start with a letter and cannot end with an underscore.**
  • It must be 8 to 64 characters in length.
test_group
ParameterGroupDescstringNo

The description of the parameter template. It must be 0 to 199 characters in length.

test_group
ParametersstringYes

The JSON string that consists of parameters and values. The parameter values are strings. Example: {"wait_timeout":"86400","innodb_old_blocks_time":"1000"}.

Note You can call the DescribeParameterTemplates operation to query the details of all parameters in the cluster of a specified engine version, such as the parameter name and valid values.
{"wait_timeout":"86400","innodb_old_blocks_time":"1000"}
ResourceGroupIdstringNo

The ID of the resource group.

rg-**********

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

514D1D87-E243-4A5F-A87D-2785C3******
ParameterGroupIdstring

The ID of the parameter template.

Note You can call the DescribeParameterGroups operation to query the details of all parameter templates of a specified region, such as the ID of a parameter template.
pcpg-**************

Examples

Sample success responses

JSONformat

{
  "RequestId": "514D1D87-E243-4A5F-A87D-2785C3******",
  "ParameterGroupId": "pcpg-**************"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRegionId.Malformedhe specified parameter RegionId is not valid.-
400InvalidDBVersion.MalformedThe Specified DBVersion is not valid.The specified DBVersion parameter is invalid.
400InvalidParameterGroupName.MalformedThe Specified parameter ParameterGroupName is not valid.The specified ParameterGroupName parameter is invalid.
400NumberExceed.parameterGroupDescThe ParameterGroupDesc parameter`s number is exceed.The maximum number of ParameterGroupDesc values is reached.
400InvalidEngine.UnsupportedThe specified Engine does not support this feature.This feature is not supported by the specified engine.
400ParamGroupsNameInvalidThe Specified parameter ParameterGroupName is not valid.The specified ParameterGroupName parameter is invalid.
404InvalidDBType.NotFoundThe Specified DBType does not found.The specified DBType parameter does not exist.
404InvalidUser.NotFoundSpecified user does not exist.The specified account does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-04-24The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change
    delete Error Codes: 400