全部產品
Search
文件中心

PolarDB:ModifyDBCluster

更新時間:Jul 01, 2026

修改 PolarDB MySQL 叢集的功能配置。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

polardb:ModifyDBCluster

update

*DBCluster

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

請求參數

名稱

類型

必填

描述

樣本值

DBClusterId

string

叢集 ID。

說明

您可以呼叫 DescribeDBClusters 介面查看目標地域下所有的叢集資訊,包括叢集 ID。

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

StandbyHAMode

string

叢集的跨可用區自動切換模式,取值範圍如下:

  • ON:開啟跨可用區自動切換。

  • OFF:關閉跨可用區自動切換。

ON

DataSyncMode

string

叢集的跨可用區資料複製方式,取值範圍如下:

  • AsyncSync:非同步。

  • SemiSync:半同步。

AsynSync

FaultSimulateMode

string

叢集的故障演練維度。取值範圍如下:

  • 0FaultInjection:主可用區維度故障演練。

  • 1:節點維度故障演練。

說明
  • 主可用區維度故障演練場景,主可用區所有的運算節點均不可用,該場景的容災切換是有損的。

  • 節點維度故障演練場景,僅支援單個運算節點進行演練,透過DBNodeCrashList傳入期望運算節點名。

0

StorageAutoScale

string

標準版叢集是否開啟儲存自動擴容。取值範圍如下:

  • Enable:開啟儲存自動擴容。

  • Disable:關閉儲存自動擴容。

Enable

CompressStorage

string

開啟儲存壓縮。取值為 ON

ON

StorageUpperBound

integer

標準版叢集儲存自動擴容上限,單位:GB。

說明

取值最大為 32000。

800

DBNodeCrashList

string

演練節點執行個體名列表。

說明

節點維度的演練只支援單個節點,可用區維度的演練可不傳該參數,或傳入所有節點。

pi-rwxxx

FaultInjectionType

string

故障注入方式。取值範圍如下:

  • 0:基於Crash SQL的執行個體故障注入。

枚舉值:

  • CrashSQLInjection :

    CrashSQLInjection

0

ImciAutoIndex

string

自動列存索引提速功能。取值範圍如下:

  • ON:開啟。

  • OFF:關閉。

說明

枚舉值:

  • OFF :

    OFF

  • ON :

    ON

OFF

TableMeta

string

需要還原的目標庫表資訊的 JSON 串,庫表資訊的值都是字串類型。 例如,[ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ]

說明

您可以透過 DescribeMetaList 介面查看支援恢復的庫表名稱詳情,並將支援恢復的庫表資訊填入上述例子中的對應位置。

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

ModifyRowCompression

string

修改列壓縮設定。

OFF

對於參數 StandbyHAMode、DataSyncMode、FaultSimulateMode 和 StorageAutoScale,每次呼叫只能設定一個。如設定了 StandbyHAMode 參數的值後,不支援再同時設定其它的請求參數的值。

說明

當參數 StorageAutoScale 的值設定為 Enable 後,還需要設定叢集儲存自動擴容上限 StorageUpperBound 參數的值。

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

請求 ID。

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

DBClusterId

string

叢集 ID。

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

OrderId

string

產生的訂單 ID。

2148126708*****

樣本

正常返回樣本

JSON格式

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

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 OperationDenied.CreateDBNodesWithStrictConsistencyOn 3AZ cluster does not allow create db nodes. 3AZ 叢集不允許增加節點。
400 InvalidDBProxyClusterClass.Malformed The specified parameter DBProxyClusterClass is not valid. 指定的參數DBProxyClusterClass無效。
400 InvalidDBNodeNum.Malformed The number of parameter DBNode.N is not valid. 參數DBNode的數量無效。
400 OperationDenied.ModifyDBNodeClassWithStrictConsistencyOn 3AZ cluster does not allow modify db node class. 3AZ 叢集不允許變更 Logger 節點規格。
400 InvalidDowngradeDBNodeClass.Limit The specified Downgrade DBNodeClass is limit on the MaxDiskSize. DBNodeClass降配被MaxDiskSize的限制。
400 InvalidEngine.Unsupported The specified Engine does not support this feature. 指定的引擎不支援此功能。
400 OperationDenied.ModifyProxyWithStrictConsistencyOn 3AZ cluster does not allow modify proxy. 3AZ 叢集不允許變更資料庫代理。
400 StandbyClusterTurnOn The specified dbCluster already turn on hot standby cluster. 指定的 dbCluster 已開啟熱備叢集。
500 InternalError The request processing has failed due to some unknown error, exception or failure. 由於某些未知錯誤、異常或失敗,請求處理失敗。
403 IncorrectDBInstanceType Current DB instance type does not support this operation. 目前資料庫執行個體類型不支援此操作。
403 IncorrectDBInstance Current DB instance does not support this operation. 目前資料庫執行個體不支援此操作。
403 OperationDenied.LockMode The operation is not permitted due to lock of cluster. 來源 RDS 執行個體目前狀態不允許執行該操作。
403 OperationDenied.DBClusterStatus The operation is not permitted due to status of cluster. PolarDB叢集當前狀態下不允許執行該操作。
403 OperationDenied.TempUpgradeDuring This operation is not allowed during the temporary upgrade of the cluster. 在叢集的臨時升級過程中,不允許執行此操作。
403 InvalidParam.PgDBNodeSpec The specification PGO of DB nodes is incorrect. DB 節點的規格 PGO 不正確。
403 InvalidParam.NoChange No change found 未找到變更。
403 OperationDenied.DBNodeClass The target DB node class is invalid for SQL acceleration. 目標DB節點類對於SQL加速無效。
403 OperationDenied.ReaderNum The target reader node number is invalid for SQL acceleration. 目標讀取器節點號對於 SQL 加速無效。
403 InvalidParam.DBNodeNum The number of DB nodes is incorrect. 資料庫節點的數量不正確。
403 OperationDenied.DBNodeRole The operation is not permitted due to the role of node. 由於節點的角色,不允許該操作。
403 OperationDenied.DeleteNode The senormal version cluster does not allow the deletion of ro nodes and standby nodes at the same time. senormal版本叢集不允許同時刪除ro節點和備用節點。
403 OperationDenied.EndpointDBNodeNumber The operation is not permitted due to node number for Endpoint. 該Endpoint不允許執行該操作。
403 OperationDenied.StandbyEqualSpec The spec of standby must be equal to rw 備用的規格必須為 rw。
403 OperationDenied.DeleteDBNodeNumber The operation is not permitted due to the node number to delete. 該節點不允許被刪除。
403 OperationDenied.DbVersion The operation is not permitted due to DbVersion. 由於DB版本問題,不允許執行此操作。
403 OperationDenied.ClusterCategory The operation is not permitted due to cluster category. 該叢集不支援此產品系列。
403 OperationDenied.clusterSingleNodeLimit Single-node instances are not supported and need to be upgraded to cluster version 不支援單節點執行個體,需要將其升級到叢集版本。
403 InvalidParam.CRACParamNodeNum The CRAC nodes cannot exceed 8. CRAC 節點不能超過 8 個。
403 InvalidParam.ECSESSDSTANDARDParamNodeNum The ECSESSDSTANDARD nodes cannot exceed 8. ECESSDSTANDARD 節點不能超過 8 個。
404 InvalidParam Invalid Parameter.
404 InvalidEditType Wrong upgrade type. 升級類型錯誤。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情