ModifyDBCluster

更新时间:
复制 MD 格式

Modify the feature configuration of a PolarDB MySQL cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

polardb:ModifyDBCluster

update

*DBCluster

acs:polardb:{#regionId}:{#accountId}:DBCluster/{#DbClusterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The cluster ID.

Note

You can call the DescribeDBClusters operation to query the details of all clusters in a specific region, including their cluster IDs.

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

StandbyHAMode

string

No

The automatic cross-zone failover mode for the cluster. Valid values:

  • ON: enables automatic cross-zone failover.

  • OFF: disables automatic cross-zone failover.

ON

DataSyncMode

string

No

The cross-zone data replication method for the cluster. Valid values:

  • AsyncSync: asynchronous.

  • SemiSync: semi-synchronous.

AsynSync

FaultSimulateMode

string

No

The fault simulation scope for the cluster. Valid values:

  • 0 or FaultInjection: primary zone-level fault simulation.

  • 1: node-level fault simulation.

Note
  • In a primary zone-level fault simulation, all compute nodes in the primary zone become unavailable. The disaster recovery failover in this scenario is lossy.

  • In a node-level fault simulation, you can simulate a fault on only a single compute node. You must specify the target compute node by using the DBNodeCrashList parameter.

0

StorageAutoScale

string

No

Enables or disables automatic storage scaling for a standard cluster. Valid values:

  • Enable: enables automatic storage scaling.

  • Disable: disables automatic storage scaling.

Enable

CompressStorage

string

No

Enables storage compression. Set the value to ON.

ON

StorageUpperBound

integer

No

The upper limit for automatic storage scaling on a standard cluster. Unit: GB.

Note

The maximum value is 32000.

800

DBNodeCrashList

string

No

The names of the nodes to target in the fault simulation.

Note

For a node-level simulation, you can specify only a single node. For a zone-level simulation, you can leave this parameter empty or specify all nodes.

pi-rwxxx

FaultInjectionType

string

No

The fault injection method. Valid values:

  • 0: instance-level fault injection based on Crash SQL.

Valid values:

  • CrashSQLInjection :

0

ImciAutoIndex

string

No

Controls the automatic columnar index feature. Valid values:

  • ON: enables the feature.

  • OFF: disables the feature.

Note

Valid values:

  • OFF :

  • ON :

OFF

TableMeta

string

No

A JSON string that specifies information about the destination databases and tables to be restored. All values in the database and table information must be strings. Example: [ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ].

Note

You can call the DescribeMetaList operation to query for restorable databases and tables. Use the returned information to populate the fields in the example JSON.

[ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ]

ModifyRowCompression

string

No

Enables or disables row-level compression.

OFF

The following parameters are mutually exclusive and cannot be combined with any other parameters in a single request: StandbyHAMode, DataSyncMode, FaultSimulateMode, or StorageAutoScale.

Note

If you set StorageAutoScale to Enable, you must also specify the StorageUpperBound parameter.

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The ID of the request.

CD3FA5F3-FAF3-44CA-AFFF-BAF869******

DBClusterId

string

The ID of the cluster.

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

OrderId

string

The generated order ID.

2148126708*****

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 OperationDenied.CreateDBNodesWithStrictConsistencyOn 3AZ cluster does not allow create db nodes. Nodes cannot be added for multi-zone clusters.
400 InvalidDBProxyClusterClass.Malformed The specified parameter DBProxyClusterClass is not valid. The specified DBProxyClusterClass parameter is invalid.
400 InvalidDBNodeNum.Malformed The number of parameter DBNode.N is not valid. The specified number of database nodes is invalid.
400 OperationDenied.ModifyDBNodeClassWithStrictConsistencyOn 3AZ cluster does not allow modify db node class. The specification of the Logger node cannot be changed for multi-zone clusters.
400 InvalidDowngradeDBNodeClass.Limit The specified Downgrade DBNodeClass is limit on the MaxDiskSize. The downgrade of DBNodeClass is limited by the MaxDiskSize parameter.
400 InvalidEngine.Unsupported The specified Engine does not support this feature. This feature is not supported by the specified engine.
400 OperationDenied.ModifyProxyWithStrictConsistencyOn 3AZ cluster does not allow modify proxy. The PolarProxy node cannot be changed for multi-zone clusters.
400 StandbyClusterTurnOn The specified dbCluster already turn on hot standby cluster. Hot standby clusters are enabled for the specified dbCluster.
500 InternalError The 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.
403 IncorrectDBInstanceType Current DB instance type does not support this operation.
403 IncorrectDBInstance Current DB instance does not support this operation. The current DB instance does not support this operation
403 OperationDenied.LockMode The operation is not permitted due to lock of cluster. The PolarDB cluster is locked and does not support this operation.
403 OperationDenied.DBClusterStatus The operation is not permitted due to status of cluster. The PolarDB cluster does not support this operation in the current state.
403 OperationDenied.TempUpgradeDuring This operation is not allowed during the temporary upgrade of the cluster. This operation cannot be performed during the temporary upgrade of the cluster.
403 InvalidParam.PgDBNodeSpec The specification PGO of DB nodes is incorrect. The PGO in the specification of the database cluster is incorrect.
403 InvalidParam.NoChange No change found No changes are detected.
403 OperationDenied.DBNodeClass The target DB node class is invalid for SQL acceleration. The class of the target database node cannot be used for SQL acceleration.
403 OperationDenied.ReaderNum The target reader node number is invalid for SQL acceleration. The number of the target reader node cannot be used for SQL acceleration.
403 InvalidParam.DBNodeNum The number of DB nodes is incorrect. The number of database nodes is incorrect.
403 OperationDenied.DBNodeRole The operation is not permitted due to the role of node. This operation is not supported by the node role.
403 OperationDenied.DeleteNode The 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.
403 OperationDenied.EndpointDBNodeNumber The operation is not permitted due to node number for Endpoint. This operation is not supported by the endpoint.
403 OperationDenied.StandbyEqualSpec The spec of standby must be equal to rw The specification of the standby node must be rw.
403 OperationDenied.DeleteDBNodeNumber The operation is not permitted due to the node number to delete. This node cannot be deleted.
403 OperationDenied.DbVersion The operation is not permitted due to DbVersion. This operation is not supported by the database version.
403 OperationDenied.ClusterCategory The operation is not permitted due to cluster category. This series is not supported by the cluster.
403 OperationDenied.clusterSingleNodeLimit Single-node instances are not supported and need to be upgraded to cluster version Single-node instances are not supported. You must upgrade them to the Cluster Edition.
403 InvalidParam.CRACParamNodeNum The CRAC nodes cannot exceed 8. The number of CRAC nodes cannot exceed eight.
403 InvalidParam.ECSESSDSTANDARDParamNodeNum The ECSESSDSTANDARD nodes cannot exceed 8. The number of ECESSDSTANDARD nodes cannot exceed eight.
404 InvalidParam Invalid Parameter.
404 InvalidEditType Wrong upgrade type. The upgrade type is incorrect.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.