All Products
Search
Document Center

ApsaraDB RDS:ModifyDBInstanceSpec

Last Updated:May 29, 2023

Changes the instance type or storage capacity of an instance. This operation is supported for regular instances and read-only instances. This operation is not supported for disaster recovery instances or temporary instances.

Operation Description

Before you call this operation, make sure that the following requirements are met:

  • The instance is in the Running state.
  • The instance has no ongoing backup tasks.
  • At least one of DBInstanceClass and DBInstanceStorage is specified in the request.
  • If you want to decrease the storage capacity, the new storage capacity that you specify must be greater than or equal to 1.1 times the used storage.
  • The instance is a primary instance or read-only instance.
NoteIf you want to upgrade the RDS edition of the instance, you must select an instance type that supports the new RDS edition. For example, if you want to upgrade the RDS edition of the instance from RDS Basic Edition to RDS High-availability Edition, you must select an instance type that supports RDS High-availability Edition.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
rds:ModifyDBInstanceSpecWRITE
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

N/A

rm-uf6wjk5*******
DBInstanceClassstringNo

The ID of the dedicated cluster.

rds.mys2.small
DBInstanceStorageintegerNo

The ID of the zone.

20
PayTypestringNo

The time at which you want to change the specifications. We recommend that you apply the specification during off-peak hours. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note
  • You must specify a point in time later than the current time. Otherwise, the specification change task fails. The current time refers to the time to call this operation. If the specification change task fails, you must wait for the order to be automatically canceled, and then call this operation again.

  • If you want to increase the storage capacity or change the ESSD storage type between different PLs, the specification change immediately takes effect and does not affect your workloads. You do not need to configure this parameter.

Postpaid
EffectiveTimestringNo

The ID of the resource group.

MaintainTime
EngineVersionstringNo

The validity period of the specification changes on an ApsaraDB RDS for SQL Server instance. Unit: day.

5.6
DBInstanceStorageTypestringNo

The specification changes of a serverless ApsaraDB RDS for MySQL instance.

local_ssd
DirectionstringNo

The maximum number of RDS Capacity Units (RCUs).

Enumeration Value:
  • Up
  • Down
  • Auto
  • TempUpgrade
  • Serverless
Up
SourceBizstringNo

The minimum number of RCUs.

Specifies whether to enable the automatic suspension feature.
DedicatedHostGroupIdstringNo

Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:

  • true
  • false (default)
dhg-7a9********
ZoneIdstringNo

The RDS edition of the instance. Valid values:

  • Basic: RDS Basic Edition.
  • HighAvailability: RDS High-availability Edition.
  • AlwaysOn: RDS Cluster Edition for SQL Server.
  • Finance: RDS Enterprise Edition. This edition is available only on the China site (aliyun.com).
NoteIf you set EngineVersion to an SQL Server version number, you must also specify this parameter.
cn-hangzhou-b
SwitchTimestringNo

The response parameters.

2019-07-10T13:15:12Z
ResourceGroupIdstringNo

The ID of the request.

rg-acfmy**********
UsedTimelongNo

The ID of the order.

3

Response parameters

ParameterTypeDescriptionExample
object

Examples

Sample success responses

JSONformat

{
  "DBInstanceId": "rm-uf6wjk5*******",
  "RequestId": "3C5CFDEE-F774-4DED-89A2-1D76EC63C575",
  "OrderId": 0
}

Error codes

HTTP status codeError codeError messageDescription
400CannotDecreaseEssdPerfLevelcannot decrease cloud essd performance level.The storage type change failed the verification check. The storage type of an RDS instance that runs SQL Server with standard SSDs or ESSDs cannot be changed to local SSDs.
400InvalidEssdStorageSizeinvalid cloud essd storage size.The storage size of cloud disks is invalid. Check the storage size.
400Postpaid.NotSupportPostpaid not supported.-
400InvalidConcurrentOperateSystem concurrent operate.-
400NotSupportReduceDiskSizeNot support reduce disk size.You cannot decrease the disk size.
400IncorrectStorageTypeIncorrect storage type.-
400TargetStorageLessThanBottomLineTarget storage less than bottom line-
400InstanceHasUnpaidOrderThe specified Instance has unpaid order.-
400InsufficientBalanceOpen volume paid cloud database. Your account balance is less than 100 RMB. Top-up and try again.-
400InvalidDBInstanceClass.NotFoundSpecified DB instance class is not found.The configuration or the instance type cannot be found or has been discontinued. Specify a different configuration or a different instance type.
400InvalidParameterThe specified parameter "%s" is not valid.-
400InvalidAvZone.FormatSpecified AvZone is not valid.The value of the AvZone parameter is invalid. Check the value of this parameter.
400OperationDenied.OrderUnPaidThe operation is not permitted due to the wrong Order status (Unpaid).The operation failed. You have unpaid orders. Check the unpaid orders in Account Center.
400OperationDenied.InvalidStorageSizeThe storage size limit is exceeded.The disk usage exceeds the upper limit. Free or expand disk space.
400InsufficientResourceCapacityThe instance cluster does not support this operation.The operation is not supported for the RDS instance.
400InvalidUsedTimeThe parameter usedTime is invalid.The specified usedTime parameter is invalid.
400CannotChangeStorageTypeTemp upgrade does not support changing storage type.Elastic upgrade cannot change the storage type.
400TempUpgrade.NotSupportThe instance does not support temp upgrade.This instance does not support elastic upgrade.
400EngineNotSupportedEngine specified cannot be supported the operation.The operation failed. This operation is not supported for the database engine version of the RDS instance. Update the minor engine version of the RDS instance.
400MaxscaleNotSupportMaxscale not supportedDedicated proxy is not supported by the instance. Please check the configuration information about enabling dedicated proxy.
400ADInstanceNotSupportThisOperationThe AD instance is not supported this operationThis operation is not supported for instances that have been joined to an AD domain.
400BYOKInstanceNotSupportThisOperationThe BYOK instance is not supported this operationThis operation is not supported for instances that have disk encryption enabled.
400BYOLInstanceNotSupportThisOperationThe BYOL instance is not supported this operationThis operation is not supported for instances that are created from BYOL images.
400SSLInstanceNotSupportThisOperationThe instance opened SSL, upgrade is not this operationThis operation is not supported for instances that have SSL enabled.
400TDEInstanceNotSupportThisOperationThe instance opened TDE, this operation is not supportedThis operation is not supported for instances that have TDE enabled.
400InstanceIsSnapshotBackupNotSupportThisOperationThe instance backup method is snapshot backup, this operation is not supportedThis operation is not supported for instances that have snapshot backup enabled.
400InstanceHasReadOnlyInstanceNotSupportThisOperationThe instance has read-only instance or is read-only instance, this operation is not supportedThis operation is not supported because this instance has read-only instances or it is a read-only instance.
400InvalidTargetStorageTypeCan not change storage type when modify instance class or storage.-
400InvalidTargetCategorySpecified classcode is not matched with current product type.-
400IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
400BackupReadInstanceModifyNotAllowedModify Backup Read Instance Is Not Allowed.You are not allowed to modify the instance from which the backup comes.
400MinorVersionNotSupportThe current database minor version does not support the operation.The operation is not supported for the minor engine version of the instance.
400LX.ARGUMENT.ILLEGALThe parameters that you specified for the specification change are invalid.
400ORD.S.QUERY.PROD.ERRORAn error occurred while querying the ordering informationAn order query error occurred.
400InvalidParameter.NotSupportDiskTypeModifyServerless not support modify disk type!-
400InvalidParameter.NotSupportModifyServerlessConfigAndDiskTogetherServerless not support modify serverlessconfig and disk together!-
400InvalidParameters.MalformedOne or more of the request parameters provided are not valid.One or more of the request parameters provided are not valid, please check the API document
400DBInstancePayTypeNotSupportCurrent instance PayType not support this operation or the param PayType not match current instance PayType.-
400InvalidDBInstanceClass.OfflineThe specified instance type is no longer provided. Please specify another instance type.The instance type that you select is no longer available. Select another instance type.
400IncorrectTargetClasscodeThe current instance type does not support this operation.This operation is not supported by the instance type.
403IncorrectDBInstanceTypeThe database instance type does not support the operation.The operation failed. The operation is not supported for the database engine of the RDS instance.
403OperationDenied.NotSupportedBackupMethodWhen the storage is larger than 4000 GB, only snapshot backup is supported.If the storage capacity is larger than 4,000 GB, only snapshot backup is supported.
403IncorrectReadDBInstanceDisksizeRead instance disk size must be equal or higher than primary instance.The disk size of the read-only instance must be equal to or greater than that of the primary instance.
403BetaServerlessNotSupportThisActionBeta Serverless Not Support This Feature-
403GroupReplicationNotSupport.InvalidEngineVersionGroup Replication requires the instance engine version to be 8.0.-
403GroupReplicationNotSupport.InvalidNodeClassCodeGroup Replication requires the ClassCode of each node to be consistent.-
403GroupReplicationNotSupport.InvalidNodeNumGroup Replication is not supported, the number of nodes must be an odd number greater than or equal to 3.-
403GroupReplicationNotSupport.InvalidXengineGroup Replication is not supported because the instance has xengine tables.-
403GroupReplicationNotSupport.MemoryTooSmallGroup Replication is not supported because the memory is too small.-
403ARMNotSupportARM arch does not support this operation.-
403HostTypeNotSupportHost type is inconsistent, please check that the original host type is the same as the target host type.-
403CloudSSDNotSupportCloud ssd does not support this operation, please upgrade to essd.-
403MaxscaleInstanceNotSupportInstances with maxscale instance do not support this operation.-
403ReadInstanceNotSupportInstances with read-only do not support this operation.-
403UnSupportReduceDiskSizeCurrent instance type does not support reducing disk space.-
403CloudboxInstanceNotSupportCloud-box instance does not support this operation.This operation is not supported for instances in cloud boxes.
403ReadOnlyInstanceNotSupportRead-only instance does not support this operation.This operation is not supported for read-only instances.
404InvalidClusterKmsThe current instance does not authorized to access the Key Management Service.The instance does not have permissions to access Key Management Service (KMS).

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-05-09The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
2023-04-28The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2023-04-19The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 403 change
    delete Error Codes: 400
    delete Error Codes: 404
2023-03-16The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
2022-12-13The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 403
    Added Error Codes: 404
2022-07-05API Description Update,The error codes of the API operation change.
Change itemChange content
API DescriptionAPI Description Update
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 403
2022-06-23The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
2021-10-19The error codes of the API operation change.,The input parameters of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: ResourceGroupId
    Added Input Parameters: UsedTime