All Products
Search
Document Center

ApsaraDB RDS:ModifyParameter

Last Updated:May 29, 2023

Modifies the parameters of an instance.

Operation Description

You can modify the parameters directly or by using a parameter template. After you submit the parameter modification request, ApsaraDB RDS starts a task to apply the new parameter values to the instance. If a new parameter value takes effect only after the instance restarts, ApsaraDB RDS restarts the instance. For information about configurable parameters, see Configure the parameters of an ApsaraDB RDS for MySQL instance.

NoteBefore the system runs a parameter modification task, the system checks whether the parameters exist, whether they are configurable, and whether the new parameter values are valid.

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
rds:ModifyParameterWRITE
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCzxxxxxxxxxx
DBInstanceIdstringYes

The ID of the instance.

rm-uf6wjk5xxxxxxx
ParametersstringNo

The JSON strings of parameters and their values. All the parameter values are of the string type. Format: {"Parameter name 1":"Parameter value 1","Parameter name 2":"Parameter value 2"...}. You can call the DescribeParameterTemplates operation to query parameter names and values.

NoteIf you specify this parameter, you do not need to specify ParameterGroupId.
{"delayed_insert_timeout":"600","max_length_for_sort_data":"2048"}
ForcerestartbooleanNo

Specifies whether to restart the instance for a new parameter value to take effect. Valid values:

  • true: The system forcefully restarts the instance. If a new parameter value takes effect only after the instance restarts, you must set this parameter to true. Otherwise, the new parameter value cannot take effect.
  • false: The system does not forcefully restart the instance.

Default value: false.

false
ParameterGroupIdstringNo

The ID of the parameter template.

Note
  • If you specify this parameter, you do not need to specify Parameters.

  • If the parameter template can be applied only after the instance is restarted, you must specify Forcerestart.

rpg-xxxxxxxxx
SwitchTimeModestringNo

The time at which the modification takes effect. Valid values:

  • Immediately: immediately modifies the parameter. This is the default value.
  • MaintainTime: modifies the parameter during the maintenance window of the instance. You can call the ModifyDBInstanceMaintainTime operation to change the maintenance window of the instance.
  • ScheduleTime: The modification takes effect at the point in time that you specify. If you specify this value, you must also specify SwitchTime.
ScheduleTime
SwitchTimestringNo

The time at which the modification takes effect. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

NoteThis time must be later than the time at which you call this operation.
2022-05-06T09:24:00Z

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

542BB8D6-4268-45CC-A557-B03EFD7AB30A

Examples

Sample success responses

JSONformat

{
  "RequestId": "542BB8D6-4268-45CC-A557-B03EFD7AB30A"
}

Error codes

HTTP status codeError codeError messageDescription
400PendingActionOverduethe action execution time is already overdueThe specified execution time has expired.
400EngineMigration.ActionDisabledSpecified action is disabled while custins is in engine migration.The specified operation is disabled when the instance is being migrated across engines.
400%sThe following parameters are prohibited: <br />%s-
400Invalid.ParamGroupDBCategoryParamGroup category is basic, not standard.The parameter group is a basic parameter group not a standard parameter group.
400InvalidEffectiveTime.SpecialTimeIsNullSpecialTime is not valid.-
400InvalidParameters.FormatSpecified parameters is not valid.The values of some parameters are invalid.
403IncorrectDBInstanceTypeThe current database instance type does not support the operation.-
403IncorrectDBInstanceStateThe current database status does not support the operation.The operation failed. The RDS instance is not running.
403ParamNotSupportedForCurrentVersionParameter is not supported for current version.-
403Invalid.ParameterSpecified parameters is not valid.The specified parameter is invalid.
403IncorrectEffectiveTimeThe specified EffectiveTime params is not valid.The value of the EffectiveTime parameter is invalid.
403GroupReplicationNotSupport.InvalidEngineVersionGroup Replication requires the instance engine version to be 8.0.-
403GroupReplicationNotSupport.InvalidNodeClassCodeGroup Replication requires the ClassCode of each node to be consistent.-
403GroupReplicationNotSupport.InvalidNodeNumGroup Replication is not supported, the number of nodes must be an odd number greater than or equal to 3.-
403GroupReplicationNotSupport.InvalidXengineGroup Replication is not supported because the instance has xengine tables.-
403GroupReplicationNotSupport.MemoryTooSmallGroup Replication is not supported because the memory is too small.-
403IncorrectMinorVersionCurrent engine minor version does not support operations.This operation is not supported for the current minor engine version.
403GroupReplicationNotSupport.TableWithoutPrimaryKeyGroup Replication is not supported because the instance exists table has no primary key.The instance has tables without primary keys and does not support MySQL group replication (MGR).
404InvalidDBInstance.NotFoundThe specified instance does not exist or is not supported.The RDS instance cannot be found. Check the ID or name of the RDS instance.
404InvalidParamSepcified wal_level Parameter is invalid. There are still logical slots in instance, so it can not be set as replica.-

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

Change history

Change timeSummary of changesOperation
2023-05-09The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-04-25The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 404 change
    delete Error Codes: 400
    delete Error Codes: 403
2022-10-28The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
2021-10-26The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
2021-10-26The error codes of the API operation change.,The input parameters of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: SwitchTimeMode
    Added Input Parameters: SwitchTime
2021-10-26The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 404 change
    delete Error Codes: 400
    delete Error Codes: 403