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

RDS for PostgreSQL

Copy page
Download PDF
Managing instances
ModifyDBInstanceSpec
Copy page
Download PDF
ModifyDBInstanceSpec
Call the ModifyDBInstanceSpec API to modify instance configurations.​
Request type​
Asynchronous request.​
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​
Required?​
Example​
Description​
InstanceId​
String​
Yes​
postgres-21a3333b****​
Instance ID.​
NodeInfo​
Array of NodeInfoObject​
No​
Refer to the request example.​
Instance specification configuration. There is exactly one primary node and one secondary node, with 0 to 10 optional read-only nodes.​
tip​
  • One of the parameters Storage space or this parameter must be selected, and both parameters can be modified simultaneously.​
  • Only the nodes involved in the specification modification need to be passed in this parameter.​
ModifyType​
String​
No​
Temporary​
Modification method. Values are:​
  • Usually: regular modification of specification, which takes effect immediately. Default value.​
  • Temporary: elastic upgrade, that is, temporary upgrade.​
tip​
Only instances with the billing method of subscription support the parameter value Temporary. You can query the instance's billing method by calling the DescribeDBInstanceDetail API.​
RollbackTime​
String​
No​
2023-12-16T03:59:10.000Z​
Restoration time. The time format is yyyy-MM-ddTHH:mm:ss.sssZ (UTC time).​
tip​
  • This parameter is required when ModifyType is Temporary.​
  • This parameter is effective only when ModifyType is Temporary.​
  • The set restoration time should not differ from the API call time by more than 2 minutes. The actual restoration time is based on the API call time.​
  • Temporary upgrades can be initiated multiple times to extend the temporary upgrade period, but the total duration cannot exceed 30 days (based on the time of the first temporary upgrade initiation).​
  • Multiple temporary upgrades can be initiated, but their duration cannot be shortened. If the instance is already in the temporary upgrade period:​
  • The new restoration date cannot be earlier than the effective restoration date.​
  • When the subscription instance is within five days of expiration, initiating another temporary upgrade is not allowed.​
StorageType​
String​
No​
LocalSSD​
Instance storage type. Fixed value LocalSSD (local SSD disk).​
tip​
  • One of this parameter and NodeInfo is required, and both can be modified simultaneously.​
  • When ModifyType is set to Temporary, setting this parameter is not supported.​
StorageSpace​
Integer​
No​
100​
Instance storage space. Unit is GB, with a step size of 10 GB.​
tip​
Different specifications have different storage space value ranges. For detailed information on storage space value ranges, refer to Product specifications.​
  • One of this parameter and NodeInfo is required, and both can be modified simultaneously.​
  • When ModifyType is set to Temporary, setting this parameter is not supported.​
SwitchType​
String​
No​
Immediate​
Execution time. The valid values are:​
  • 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​
2024-12-25T14:00:00Z​
The start time for execution within a specific time period. Format is yyyy-MM-ddTHH:mm:ssZ.​
SpecifiedSwitchEndTime​
String​
No​
2024-12-25T15:59:00Z​
The end time for execution within the specific time period. The time format is yyyy-MM-ddTHH:mm:ssZ.​
tip​
  • When SwitchType is set to SpecifiedTime, this parameter is required.​
  • The minimum time period is one hour and fifty-nine minutes.​
EstimateOnly​
Boolean​
No​
true​
Specifies whether to initiate a specification change assessment. Values:​
  • true: yes.​
  • false: no. Default value.​
tip​
If this parameter is specified, the system evaluates the specification change based on the parameters set for other fields without performing the actual change. After you initiate the evaluation, the system returns the EstimationResult parameter, which describes the impact of the specification change.​
​
NodeInfoObject​
​
Parameter​
Type​
Required?​
Example​
Description​
NodeId​
String​
No​
postgres-ca7b7019****​
Node ID. You can call the DescribeDBInstanceDetail API to query.​
tip​
Required when modifying node specification and deleting nodes (ModifyDBInstancesSpec).​
ZoneId​
String​
Yes​
cn-beijing-a​
The availability zone where the node is located. You can call the DescribeAvailabilityZones API to query it.​
tip​
  • Required when creating an instance (CreateDBInstance), restoring to a new instance (RestoreToNewInstance), and adding or modifying nodes (ModifyDBInstancesSpec).​
  • Primary, secondary, and read-only nodes can be deployed in different availability zones within the same region.​
NodeType​
String​
Yes​
Primary​
Node type, with values:​
  • Primary: Primary node.​
  • Secondary: indicates the secondary node.​
  • ReadOnly: Read-only node.​
NodeSpec​
String​
Yes​
rds.postgres.1c2g​
Node specification. Query specifications available for sale via DescribeDBInstanceSpecs API.​
NodeOperateType​
String​
No​
Create​
Operation type. Range:​
  • Create: add.​
  • Delete: delete.​
  • Modify: modify.​
tip​
  • In the CreateDBInstance and RestoreToNewInstance APIs, this field can only be set to Create.​
  • When modifying instance configuration, the specified NodeOperateType must be passed in for the involved nodes.​
​
Response parameters​
​
Parameter​
Type​
Example​
Description​
InstanceId​
String​
postgres-21a3333b****​
Instance ID.​
OrderId​
String​
Order725743560891294****​
Order ID.​
tip​
When EstimateOnly is true, this field returns empty.​
EstimationResult​
Refer to the sample response.​
Estimated impact on the instance after changing the current configuration.​
tip​
This field is not returned if the EstimateOnly parameter is set to false or is not specified.​
​
ModifyDBInstanceSpecEstimationResult​
​
Parameter​
Type​
Example​
Description​
Plans​
Array of String​
["AddNode", "RebuildPrimary"]​
The estimated impact on the read/write connection of the instance after the configuration change. Values:​
  • AddNode: there are nodes to be added.​
  • DeleteNode: there are nodes to be deleted.​
  • RebuildPrimary: the primary database may be migrated.​
  • RebuildReadOnly: the read-only node may be migrated.​
  • RebuildSecondary: the secondary database may be migrated.​
Effects​
Array of String​
["ReadWriteConnectionTransientError",​
"ReadOnlyConnectionTransientError"​
]​
The estimated impact on the read/write connection of the instance after the configuration change. Values:​
  • ReadOnlyConnectionTransientError: read-only connection transient disconnection.​
  • ReadWriteConnectionTransientError: read-write connection transient disconnection.​
​
Example​
Request example 1 Regular modification of specification​
​
POST /?Action=ModifyDBInstanceSpec&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.volcengineapi.com​
X-Date: 20231002T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "postgres-ca7b7019****",​
"StorageType": "LocalSSD",​
"StorageSpace": 60,​
"NodeInfo": [​
{​
"NodeId": "postgres-ca7b7019****",​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "Primary"​
},​
{​
"NodeId": "postgres-ca7b7019****-wmjy",​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "Secondary"​
},​
{​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "ReadOnly",​
"NodeOperateType": "Create"​
}​
]​
}​
​
Sample response 1​
​
{​
"ResponseMetadata": {​
"RequestId": "202308011557433BA18653C86F63A04B1B",​
"Action": "ModifyDBInstanceSpec",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstanceId": "postgres-21a3333b****",​
"OrderId": "Order725743560891294****"​
}​
}​
​
Request example 2 Temporary upgrade example (upgrade primary and secondary node specification)​
​
POST /?Action=ModifyDBInstanceSpec&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.volcengineapi.com​
X-Date: 20231002T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "postgres-ca7b7019****",​
"NodeInfo": [​
{​
"NodeId": "postgres-ca7b7019****",​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.2c4g",​
"NodeType": "Primary",​
"NodeOperateType": "Modify"​
},​
{​
"NodeId": "postgres-ca7b7019****-wmjy",​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.2c4g",​
"NodeType": "Secondary",​
"NodeOperateType": "Modify"​
}​
],​
"ModifyType": "Temporary",​
"RollbackTime": "2023-12-16T03:59:10.000Z"​
}​
​
Sample response 2​
​
{​
"ResponseMetadata": {​
"RequestId": "202308011557433BA18653C86F63A04B1B",​
"Action": "ModifyDBInstanceSpec",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstanceId": "postgres-21a3333b****",​
"OrderId": "Order725743560891294****"​
}​
}​
​
Request example 3 Modification impact estimation​
​
POST /?Action=ModifyDBInstanceSpec&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.volcengineapi.com​
X-Date: 20231002T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "postgres-ca7b7019****",​
"StorageType": "LocalSSD",​
"StorageSpace": 60,​
"NodeInfo": [​
{​
"NodeId": "postgres-ca7b7019****",​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "Primary"​
},​
{​
"NodeId": "postgres-ca7b7019****-wmjy",​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "Secondary"​
},​
{​
"ZoneId": "cn-beijing-a",​
"NodeSpec": "rds.postgres.1c2g",​
"NodeType": "ReadOnly",​
"NodeOperateType": "Create"​
}​
],​
"EstimateOnly": true​
}​
​
Sample response 3​
​
{​
"ResponseMetadata": {​
"RequestId": "202510101646419FA4685B4AC9EDAF4B05-85d668",​
"Action": "ModifyDBInstanceSpec",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"EstimationResult": {​
"Effects": [​
"ReadWriteConnectionTransientError"​
],​
"Plans": [​
"AddNode"​
]​
},​
"InstanceId": "postgres-36cd1f06e9f3",​
"OrderId": ""​
}​
}​
​
Last updated: 2026.03.31 10:45:18