All Products
Search
Document Center

ApsaraDB RDS:ModifyParameter

Last Updated:May 22, 2024

Modifies the parameter values of an instance.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server
  • MariaDB

References

Note Before you call this operation, carefully read the following documentation. Make sure that you fully understand the prerequisites and impacts for calling this operation.

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
rds:ModifyParameterWrite
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
  • rds:TLSVersion
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 instance ID.

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.

Note If 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 parameter template ID.

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.
  • ScheduleTime: modifies the parameter 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.

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

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.
400StorageEngine.NotSupportedCurrent instance storage engine dose not support this operation.-
400InvalideStatus.FormatThe instance status does not support this operation.-
403IncorrectDBInstanceTypeThe current database instance type does not support the operation.This operation is not supported for the database engine of the current instance.
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).
403IncorrectDBInstanceThe current DB instance does not support this operation.The operation failed. The operation is not supported for the RDS instance.
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-12-21The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
2023-06-28The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-06-20The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
2023-05-09The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-04-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change
    delete Error Codes: 400
    delete Error Codes: 403
2022-10-28The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
2021-10-26The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
2021-10-26The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: SwitchTimeMode
    Added Input Parameters: SwitchTime
2021-10-26The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change
    delete Error Codes: 400
    delete Error Codes: 403