You need to enable JavaScript to run this app.
RDS for MySQL

RDS for MySQL

Copy page
Download PDF
Managing instances
ModifyDBInstanceType
Copy page
Download PDF
ModifyDBInstanceType
Call the ModifyDBInstanceType API to modify the instance type of a specified MySQL instance.​
Request type​
Synchronous request.​
Precautions​
Only single-node instances can be modified to double-node instances, or double-node instances can be modified to multiple-node instances.​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
​
Parameter​
Type​
Is it required?​
Sample value​
Description​
InstanceId​
String​
Yes​
mysql-46609cf2****​
Instance ID.​
TypeConvertPath​
String​
Yes​
DoubleToMulti​
Type conversion mode. Values:​
  • DoubleToMulti: converts a double-node instance to a multiple-node instance.​
  • SingleToDouble: converts a single-node instance to a double-node instance.​
NodeInfo​
Array of NodeInfoObject​
Yes​
[​
{​
"NodeType": "Primary",​
"NodeSpec":"rds.mysql.1c2g",​
"ZoneId":"cn-beijing-a"​
},​
{​
"NodeType": "Secondary",​
"NodeSpec":"rds.mysql.1c2g",​
"ZoneId":"cn-beijing-b"​
}​
]​
Node configuration of the instance.​
SwitchType​
String​
No​
Immediate​
Type of specification modification. Values:​
  • Immediate: switch now (default).​
  • MaintainTime: switch during the maintenance window.​
  • SpecifiedTime: switch during the specified time period.​
tip​
  • When the value is SpecifiedTime, you must set the start and end time of the time period in the SpecifiedSwitchStartTime and SpecifiedSwitchEndTime parameters.​
SpecifiedSwitchStartTime​
String​
No​
​
The start time of the specific time period for execution(UTC time). The format is yyyy-MM-ddTHH:mm:ssZ.​
tip​
  • When SwitchType is set to SpecifiedTime, this parameter is required.​
  • The start time of the task cannot be later than seven days after the current date.​
SpecifiedSwitchEndTime​
String​
No​
​
The end time of the specific time period (UTC time). The format is yyyy-MM-ddTHH:mm:ssZ.​
tip​
  • This parameter is required when the value of SwitchType is SpecifiedTime.​
  • The minimum time period is one hour and fifty-nine minutes.​
  • Time periods cannot be set across days. The task's start and end times must be within a 24-hour window.​
​
NodeInfoObject​
​
Parameter​
Type​
Is it required?​
Sample value​
Description​
NodeId​
String​
No​
mysql-050b3e08****-r6e25​
Node ID.​
tip​
This parameter is not required when you create an instance or add a node, but is required when you modify the node configuration or delete a node.​
NodeType​
String​
Yes​
Primary​
Node type, with values:​
  • Primary: primary node.​
  • Secondary: secondary node.​
tip​
A multiple-node instance consists of one primary node, and at least one and up to eight secondary nodes. We recommend that you reserve an independent secondary node that does not handle workloads. This allows you to switch it to the primary node when necessary. RDS for MySQL assumes no responsibility for any risks or losses incurred due to the failure to configure independent secondary nodes or the inability to complete the primary node switching due to excessive latency of all secondary nodes.​
NodeSpec​
String​
Yes​
rds.mysql.1c2g​
Node specification. For details on node specification, refer to Product specification.​
tip​
The specification of the secondary node must be the same as that of the primary node.​
ZoneId​
String​
Yes​
cn-beijing-a​
The availability zone where the node is located. You can call the DescribeAvailabilityZones API to query it. Required when creating an instance or adding a node. Optional when changing node configuration or deleting a node.​
tip​
  • The nodes of an instance can be distributed across a maximum of three availability zones.​
  • During a single configuration change, you can add or delete nodes in up to three availability zones.​
NodeOperateType​
String​
No​
Modify​
Operation type. This parameter is not required when you create an instance but is required when you modify the node configuration. Range:​
  • Create: add.​
  • Modify: modify.​
tip​
  • When adding a node (CreateDBNodes), this field can only be Create.​
  • When you modify the configuration, this parameter can only be set to Modify.​
  • This value has no actual meaning when set to Delete.​
​
Response parameters​
​
Parameter​
Type​
Sample value​
Description​
InstanceId​
String​
mysql-46609cf2****​
Instance ID.​
OrderId​
String​
Order709899242175681****​
Order ID.​
​
Sample​
Sample request​
​
POST /?Action=ModifyDBInstanceType&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-mysql.cn-beijing.volcengineapi.com​
X-Date: 20211202T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "mysql-46609cf2****",​
"InstanceTypeConvertPath": "DoubletoMulti",​
"NodeInfo": [​
{​
"NodeType": "Primary",​
"NodeSpec": "rds.mysql.1c2g",​
"ZoneId": "cn-beijing-a"​
},​
{​
"NodeType": "Secondary",​
"NodeSpec": "rds.mysql.1c2g",​
"ZoneId": "cn-beijing-b"​
}​
]​
}​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "20230812000429CE0893BD4EC15DDDD5C2",​
"Action": "ModifyDBInstanceType",​
"Version": "2022-01-01",​
"Service": "rds_mysql",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstanceId": "mysql-46609cf2****",​
"OrderId": "Order726609391875729****"​
}​
}​
​
Error code​
For more details, refer to Error codes.​
Last updated: 2026.06.12 17:17:50