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

It only supports changing a single-node instance to a two-node instance, or a two-node instance to a multi-node instance.

Request parameters

Name
Type
Required
Example
Description
InstanceId
String
Yes
mysql-46609cf2****
Instance ID.
TypeConvertPath
String
Yes
DoubleToMulti

Type conversion mode, currently only DoubleToMulti is supported.

tip

Only converting a double-node instance to a multi-node instance is supported.

NodeInfo
Object[]
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.
NodeId
String
No
mysql-050b3e08****-r6e25

Node ID.

tip

It is not required to pass in when creating an instance or adding a new node, and it is required to pass in when changing the node configuration or deleting a node.

NodeType
String
Yes
Primary

Node type, valid values:

  • Primary: Primary node.
  • Secondary: Secondary node.

tip

For multi-node instances, there is exactly 1 primary node, and you can add up to 8 secondary nodes (minimum of 1). It is recommended to reserve an independent secondary node that does not carry business traffic, so it can be switched to the primary node when necessary. If the failure to set up an independent secondary node results in excessive primary-secondary replication lag across all secondary nodes, leading to a failed primary node switchover, the cloud database MySQL service will not be held responsible.

NodeSpec
String
Yes
rds.mysql.1c2g

Node specifications. For detailed information about node specifications, refer to Product Specifications.

tip

The specification of the secondary node must match that of the primary node.

ZoneId
String
Yes
cn-beijing-a

The availability zone where the node is located can be queried by calling the DescribeAvailabilityZones interface. It must be passed when creating an instance and adding a new node, and it may not be passed when changing the node configuration or deleting a node.

tip

  • The nodes of an instance can be distributed in up to three availability zones.
  • In one configuration change, nodes in up to three availability zones can be added or deleted.
NodeOperateType
String
No
Modify

Operation type. It is not required to be passed in when creating an instance, but is required to be passed in when modifying the node configuration. Value range:

  • Create: Add.
  • Modify: Modify.

tip

  • When adding a node (CreateDBNodes), this field can only take the value of Create.
  • When changing the configuration, this field can only take the value of Modify.
SwitchType
String
No
Immediate

Resizing type, valid values:

  • Immediate: Switch immediately (default).
  • MaintainTime: Switch during the maintenance window.

tip

You can call the DescribeDBInstanceDetail API to query the maintenance window of the instance.

Response parameters

Name
Type
Example
Description
InstanceId
String
mysql-46609cf2****
Instance ID.
OrderId
String
Order709899242175681****
Order ID.

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 codes

For more details, refer to Error codes.

Last updated: 2025.12.04 11:25:44