All Products
Search
Document Center

PolarDB:ModifyDBCluster

Last Updated:Apr 25, 2024

Modifies the configurations of 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:ModifyDBClusterWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The cluster ID.

Note You can call the DescribeDBClusters operation to query information about all PolarDB clusters that are deployed in a specified region, such as cluster IDs.
pc-*************
StandbyHAModestringNo

Specifies whether to enable the cross-zone automatic switchover mode. Valid values:

  • ON: Enable the cross-zone automatic switchover mode.
  • OFF: Disable the cross-zone automatic switchover mode.
  • 0: Enable the customer drill mode.
ON
DataSyncModestringNo

The method used to replicate data across zones. Valid values:

  • AsyncSync: the asynchronous mode.
  • SemiSync: the semi-synchronous mode.
AsynSync
FaultSimulateModestringNo

The fault scenario that you want to simulate for the cluster.

  • Set the value to 0. The value 0 indicates the scenario in which the primary zone of the cluster fails.
Note
  • This parameter takes effect only when you set the StandbyHAMode parameter to 0.

  • If you set this parameter to 0, all compute nodes deployed in the primary zone are unavailable. In this case, the switchover degrades the cluster performance.

0
StorageAutoScalestringNo

Specifies whether to enable automatic storage scaling for the cluster of Standard Edition. Valid values:

  • Enable
  • Disable
Enable
CompressStoragestringNo

Enable storage compression function. The value of this parameter is ON.

ON
StorageUpperBoundlongNo

The maximum storage capacity of the cluster of Standard Edition in automatic scaling. Unit: GB.

Note The maximum value of this parameter is 32000.
800

You can specify only one of the following parameters: StandbyHAMode, DataSyncMode, FaultSimulateMode, and StorageAutoScale. For example, if you specify the StandbyHAMode parameter, you cannot specify another three parameters.

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

DBClusterIdstring

The cluster ID.

pc-*************

Examples

Sample success responses

JSONformat

{
  "RequestId": "CD3FA5F3-FAF3-44CA-AFFF-BAF869******",
  "DBClusterId": "pc-*************",
  "OrderId": "2148126708*****"
}

Error codes

HTTP status codeError codeError messageDescription
400OperationDenied.CreateDBNodesWithStrictConsistencyOn3AZ cluster does not allow create db nodes.Nodes cannot be added for multi-zone clusters.
400InvalidDBProxyClusterClass.MalformedThe specified parameter DBProxyClusterClass is not valid.The specified DBProxyClusterClass parameter is invalid.
400InvalidDBNodeNum.MalformedThe number of parameter DBNode.N is not valid.The specified number of database nodes is invalid.
400OperationDenied.ModifyDBNodeClassWithStrictConsistencyOn3AZ cluster does not allow modify db node class.The specification of the Logger node cannot be changed for multi-zone clusters.
400InvalidDowngradeDBNodeClass.LimitThe specified Downgrade DBNodeClass is limit on the MaxDiskSize.The downgrade of DBNodeClass is limited by the MaxDiskSize parameter.
400InvalidEngine.UnsupportedThe specified Engine does not support this feature.This feature is not supported by the specified engine.
400OperationDenied.ModifyProxyWithStrictConsistencyOn3AZ cluster does not allow modify proxy.The PolarProxy node cannot be changed for multi-zone clusters.
400StandbyClusterTurnOnThe specified dbCluster already turn on hot standby cluster.Hot standby clusters are enabled for the specified dbCluster.
403IncorrectDBInstanceTypeCurrent DB instance type does not support this operation.-
403IncorrectDBInstanceCurrent DB instance does not support this operation.The current DB instance does not support this operation
403OperationDenied.LockModeThe operation is not permitted due to lock of cluster.The PolarDB cluster is locked and does not support this operation.
403OperationDenied.DBClusterStatusThe operation is not permitted due to status of cluster.The PolarDB cluster does not support this operation in the current state.
403OperationDenied.TempUpgradeDuringThis operation is not allowed during the temporary upgrade of the cluster.This operation cannot be performed during the temporary upgrade of the cluster.
403InvalidParam.PgDBNodeSpecThe specification PGO of DB nodes is incorrect.The PGO in the specification of the database cluster is incorrect.
403InvalidParam.NoChangeNo change foundNo changes are detected.
403OperationDenied.DBNodeClassThe target DB node class is invalid for SQL acceleration.The class of the target database node cannot be used for SQL acceleration.
403OperationDenied.ReaderNumThe target reader node number is invalid for SQL acceleration.The number of the target reader node cannot be used for SQL acceleration.
403InvalidParam.DBNodeNumThe number of DB nodes is incorrect.The number of database nodes is incorrect.
403OperationDenied.DBNodeRoleThe operation is not permitted due to the role of node.This operation is not supported by the node role.
403OperationDenied.DeleteNodeThe senormal version cluster does not allow the deletion of ro nodes and standby nodes at the same time.In clusters of the senormal version, the read-only node and standby node cannot be deleted at the same time.
403OperationDenied.EndpointDBNodeNumberThe operation is not permitted due to node number for Endpoint.This operation is not supported by the endpoint.
403OperationDenied.StandbyEqualSpecThe spec of standby must be equal to rwThe specification of the standby node must be rw.
403OperationDenied.DeleteDBNodeNumberThe operation is not permitted due to the node number to delete.This node cannot be deleted.
403OperationDenied.DbVersionThe operation is not permitted due to DbVersion.This operation is not supported by the database version.
403OperationDenied.ClusterCategoryThe operation is not permitted due to cluster category.This series is not supported by the cluster.
403OperationDenied.clusterSingleNodeLimitSingle-node instances are not supported and need to be upgraded to cluster versionSingle-node instances are not supported. You must upgrade them to the Cluster Edition.
403InvalidParam.CRACParamNodeNumThe CRAC nodes cannot exceed 8.The number of CRAC nodes cannot exceed eight.
403InvalidParam.ECSESSDSTANDARDParamNodeNumThe ECSESSDSTANDARD nodes cannot exceed 8.The number of ECESSDSTANDARD nodes cannot exceed eight.
404InvalidParamInvalid Parameter.-
404InvalidEditTypeWrong upgrade type.The upgrade type is incorrect.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.The request failed to be processed because unknown errors, exceptions, or failures have occurred.

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

Change history

Change timeSummary of changesOperation
2023-12-26The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: CompressStorage
2023-09-19The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    Error Codes 404 change
    Added Error Codes: 400
    Added Error Codes: 500
2023-08-03The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: StorageAutoScale
    Added Input Parameters: StorageUpperBound
2023-07-19The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404