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

RDS for MySQL

Copy page
Download PDF
Managing instances
ModifyDBNodeTemporarySpec
Copy page
Download PDF
ModifyDBNodeTemporarySpec

Call the ModifyDBNodeTemporarySpec API to temporarily upgrade the configuration of an instance.

Request type

Asynchronous request.

Precautions

Temporary specification upgrade is currently an invitational feature, and there are still a small number of experience optimization points. These optimization points will not affect the normal operation of the instance. If your business has special requirements for this feature, please submit a workorderto apply for access.

Request parameters

Name
Type
Required
Example
Description
InstanceId
String
Yes
mysql-db6d920e****
Instance ID.
NodeInfo
Object[]
Yes
Refer to the request example.
Node configuration change information 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, with the following values:

  • Primary: The primary node.
  • Secondary: The standby node.
  • ReadOnly: The read-only node.

tip

  • In the interface for querying instance price details (DescribeDBInstancePriceDetail), this field is optional.
  • When adding a node (CreateDBNodes), the value of this field can only be ReadOnly (for a two-node instance) or Secondary (for a multi-node instance).
  • For a two-node instance, there is exactly one primary node and one standby node, and 0 to 10 read-only nodes are optional.
  • For a multi-node instance, there is exactly one primary node, a maximum of 8 standby nodes can be added, and at least 1 standby node is required. It is recommended to reserve an independent standby node that does not carry business so that it can be switched to the primary node when necessary. If the master-slave delay of all standby nodes is too high due to the lack of an independent standby node, resulting in a failure to switch the primary node, the Cloud Database MySQL Edition will not bear the relevant responsibilities.
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. 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.
RollbackTime
String
Yes
2024-10-16T03:59:10.000Z
The restore time for the temporary upgrade. The restore time can be set to any time between 5 to 30 days after the current time. The time format is yyyy-MM-ddTHH:mm:ss.sssZ(UTC time).
SwitchType
String
No
MaintainTime

Execution time, options:

  • Immediate: Switch immediately (default).
  • MaintainTime: Switch during the maintenance window.
  • SpecifiedTime: Switch within a specified time period.

tip

  • You can call the DescribeDBInstanceDetail API to query the maintenance window of the instance.
  • When the value is SpecifiedTime, you need to set the start and end times of the period in the parameters SpecifiedSwitchStartTime and SpecifiedSwitchEndTime.
  • If the instance type is multi-node, only the value Immediate is supported.
RequestSource
String
No
EventType_Web

The source of the request. Valid values:

  • EventType_Web: From Web.
  • EventType_OpenAPI: From Open API.
EstimateOnly
Boolean
No
true

Whether to initiate a configuration change evaluation. Valid values:

  • true: Yes.
  • false: No. Default value.

tip

If initiated, the configuration change evaluation will be performed based on the specifications determined by other fields, but no actual configuration change will be executed. After initiating the evaluation, the EstimationResult parameter will be returned, indicating the impact of this configuration change.

SpecifiedSwitchStartTime
String
No
2024-12-25T14:00:00Z

The start time of the specified time period for execution. The time format is yyyy-MM-ddTHH:mm:ssZ.

tip

This parameter is required when SwitchType is set to SpecifiedTime.

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

The end time of the specified time period for execution. The time format is yyyy-MM-ddTHH:mm:ssZ.

tip

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

Response parameters

Name
Type
Example
Description
InstanceId
String
mysql-db6d920e****
Instance ID.
OrderId
String
Order71220115095297****

Order ID.

tip

This field returns empty when EstimateOnly is set to true.

EstimationResult
Object
Refer to the response example.

The estimated impact on the instance after the configuration change based on the current settings.

tip

This field is not returned when EstimateOnly is set to false or when no value is passed for EstimateOnly.

Plans
String[]
[ "AddNode" ]

Estimated impact on the instance after configuration changes based on current settings. Possible values:

  • AddNode: Nodes will be added.
  • DeleteNode: Nodes will be deleted.
  • RebuildPrimary: Primary database may migrate.
  • RebuildReadOnly: Read-only nodes may migrate.
  • RebuildSecondary: Secondary database may migrate.
Effects
String[]
[ "ReadWriteConnectionTransientError", "ReadOnlyConnectionTransientError" ]

Estimated impact on instance read/write connections after configuration changes based on current settings. Possible values:

  • ReadOnlyConnectionTransientError: Read-only connections may experience transient errors.
  • ReadWriteConnectionTransientError: Read/write connections may experience transient errors.

Sample request

POST /?Action=ModifyDBNodeTemporarySpec&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-66347599****",
    "NodeInfo": [
        {
            "NodeId": "mysql-66347599****-rd49e",
            "ZoneId": "cn-beijing-a",
            "NodeType": "ReadOnly",
            "NodeSpec": "rds.mysql.d1.n.2c8g",
            "NodeOperateType": "Modify"
        }
    ],
    "RollbackTime": "2024-11-28T10:59:10.000Z"
}

Sample response

{
    "ResponseMetadata": {
        "RequestId": "2024112020583642C7DB9CF0747D184FAA-f990a2",
        "Action": "ModifyDBNodeTemporarySpec",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-beijing"
    },
    "Result": {
        "InstanceId": "mysql-c9b0dce8****",
        "OrderId": "Order2180008796437128674"
    }
}

Error codes

For more details, refer to Error codes.

Last updated: 2025.12.04 11:25:45