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

RDS for MySQL

Copy page
Download PDF
Managing instances
ModifyDBInstanceSpec
Copy page
Download PDF
ModifyDBInstanceSpec

Call the ModifyDBInstanceSpec API to modify instance configurations.

Request type

Asynchronous request.

Precautions

This API is deprecated. Please use the following APIs to modify instance configurations:

Request parameters

Name
Type
Required
Example
Description
InstanceId
String
Yes
mysql-e26822cf****
Instance ID.
NodeInfo
Object[]
No
[ { "NodeId": "mysql-7d1efb9f****-0","NodeType": "Primary", "NodeSpec": "rds.mysql.1c2g", "NodeOperateType": "Modify" }, { "NodeId": "mysql-7d1efb9f****-1", "NodeType": "Secondary", "NodeSpec": "rds.mysql.1c2g", "NodeOperateType": "Modify" }, { "NodeId": "mysql-7d1efb9f****-r****", "NodeType": "ReadOnly", "NodeSpec": "rds.mysql.1c2g", "NodeOperateType": "Delete" }, { "NodeType": "ReadOnly", "NodeSpec": "rds.mysql.1c2g", "NodeOperateType": "Create" }, { "NodeId": "mysql-7d1efb9f****-r****", "NodeType": "ReadOnly", "NodeSpec": "rds.mysql.1c2g", "NodeOperateType": "Modify" } ]

Instance specification configuration. There must be exactly one primary node and one secondary node, and 0~10 optional read-only nodes. Except for the scenario of adding read-only nodes, ZoneId is ignored in other scenarios.

tip

  • Either this parameter or StorageSpace must be specified, and both parameters can be modified simultaneously.
  • MySQL instances support creating primary and secondary nodes in different availability zones, but read-only nodes must be added to the same availability zone as the primary or secondary node.
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.
  • ReadOnly: Read-only node.
NodeSpec
String
Yes
rds.mysql.1c2g

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

tip

  • The specifications of the standby node need to be consistent with those of the primary node.
  • The specifications of the read-only node can be lower than those of the primary node. However, it should be noted that when the specifications of the read-only node are lower than those of the primary node, there may be a delay in the read-only node or even OOM of the read-only node due to the high load of the primary node. It is recommended to select the same or higher specifications for the read-only node as 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. Not required when creating an instance, but required when modifying node configurations. Valid values:

  • Create: Add.
  • Modify: Modify.
  • Delete: Delete.
ModifyType
String
No
Usually
Type of instance specification modification. Valid value: Usually, regular configuration change.
StorageType
String
Yes
LocalSSD

The storage type of the instance. The value range is:

  • LocalSSD: Local disk.
  • CloudESSD_FlexPL: FlexPL cloud disk.
  • CloudESSD_PL0: PL0 cloud disk.

tip

  • If the StorageSpace parameter needs to be set, the StorageType parameter is required.
  • In different interfaces, the value range of this parameter is different. The specific rules are as follows:
    • When used as a request parameter in the following interfaces, the value of StorageType can only be LocalSSD.
      • CreateDBBlueGreenInstance
      • RestoreToCrossRegionInstance
      • RestoreToNewInstanceFromUserTos
    • When used as a request parameter in some interfaces, the value range of this parameter is related to the storage type of the original instance. The specific rules are as follows:
      • When the storage type of the original instance is LocalSSD or CloudESSD_FlexPL, changing the storage type is not supported.
      • When the storage type of the original instance is CloudESSD_PL0, the value can be CloudESSD_PL0 or CloudESSD_FlexPL.
        The involved interfaces are:
      • RebuildDBInstance
      • RestoreToNewInstance
      • ModifyDBNodeSpec
StorageSpace
Integer
No
100

Instance storage space. Valid range: [20, 3000], unit: GB, step: 10GB. Defaults to the current value.

tip

Either this parameter or NodeInfo must be specified, and both parameters can be modified simultaneously.

SwitchType
String
No
MaintainTime

Execution time, values:

  • Immediate: Switch immediately (default).
  • MaintainTime: Switch within the maintainable time period.
  • SpecifiedTime: Switch within the specified time period.

tip

  • You can call the DescribeDBInstanceDetail interface to query the maintainable time period of the instance.
  • When the value is SpecifiedTime, you need to set the start and end time of the time period in the parameters SpecifiedSwitchStartTime and SpecifiedSwitchEndTime.
SpecifiedSwitchStartTime
String
No
2024-12-25T14:00:00Z

Start time of the specified execution time window. The format is yyyy-MM-ddTHH:mm:ssZ.

tip

This parameter is required when SwitchType is SpecifiedTime.

SpecifiedSwitchEndTime
String
No
2024-12-25T15:59:00Z

End time of the specified execution time window. The format is yyyy-MM-ddTHH:mm:ssZ.

tip

  • This parameter is required when SwitchType is SpecifiedTime.
  • The minimum duration of the specified time window is one hour and fifty-nine minutes.

Response parameters

Name
Type
Example
Description
InstanceId
String
mysql-7d1efb9f****
Instance ID.
OrderId
String
Order71220115095297****
Order ID.

Sample request

POST /?Action=ModifyDBInstanceSpec&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-f4cba23f****",
    "NodeInfo": [
        {
            "NodeId": "mysql-f4cba23f****-0",
            "NodeType": "Primary",
            "NodeSpec": "rds.mysql.2c4g",
            "NodeOperateType": "Modify"
        },
        {
            "NodeId": "mysql-f4cba23f****-1",
            "NodeType": "Secondary",
            "NodeSpec": "rds.mysql.2c4g",
            "NodeOperateType": "Modify"
        },
        {
            "ZoneId": "cn-beijing-a",
            "NodeType": "ReadOnly",
            "NodeSpec": "rds.mysql.2c4g",
            "NodeOperateType": "Create"
        }
    ],
    "StorageType": "LocalSSD",
    "StorageSpace": 200
}

Sample response

{
    "ResponseMetadata": {
        "RequestId": "20220719173634010212035227001977AC",
        "Action": "ModifyDBInstanceSpec",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-beijing"
    },
    "Result": {
        "InstanceId": "mysql-f4cba23f****",
        "OrderId": "Order71220115095297****"
    }
}

Error codes

For more details, refer to Error codes.

Last updated: 2025.08.15 18:32:42