All Products
Search
Document Center

ApsaraDB RDS:ModifyDBInstanceSpec

Last Updated:Mar 25, 2024

Changes the instance type and storage capacity of an ApsaraDB RDS instance.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server
  • MariaDB

References

Note Fees are generated if the call is successful. Before you call this operation, carefully read the following documentation:

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

rm-uf6wjk5*******
DBInstanceClassstringNo

The new instance type of the instance. For more information, see Primary ApsaraDB RDS instance types. You can also call the DescribeAvailableClasses operation to query the instance types that are supported by an instance.

Note
  • You must specify at least one of DBInstanceClass and DBInstanceStorage.
  • You can call the DescribeDBInstanceAttribute operation to query the current instance type of the instance.
  • rds.mys2.small
    DBInstanceStorageintegerNo

    The new storage capacity of the instance. Unit: GB. You can increase the storage capacity in increments of 5 GB. For more information, see Primary ApsaraDB RDS instance types. You can also call the DescribeAvailableClasses operation to query the storage capacity range that is supported by the new instance type.

    Note
  • You must specify at least one of the DBInstanceStorage and DBInstanceClass.
  • You can call the DescribeDBInstanceAttribute to query the current storage capacity of the instance.
  • 20
    PayTypestringNo

    The billing method of the instance. Valid values:

    Postpaid
    EffectiveTimestringNo

    The time when you want the change to take effect. Valid values:

    • Immediate: This is the default value.
    • MaintainTime: The effective time is within the maintenance window. For more information, see ModifyDBInstanceMaintainTime.
    MaintainTime
    EngineVersionstringNo

    The database engine version of the instance.

    • Regular instance

      • Valid values if you set the Engine parameter to MySQL: 5.5, 5.6, 5.7, and 8.0
      • Valid values if you set the Engine parameter to SQLServer: 2008r2, 08r2_ent_ha, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_std_ha, 2017_ent, 2019_std_ha, and 2019_ent
      • Valid values if you set the Engine parameter to PostgreSQL: 10.0, 11.0, 12.0, 13.0, 14.0, and 15.0
      • Valid value if you set the Engine parameter to MariaDB: 10.3
    • Serverless instance

      • Valid values if you set the Engine parameter to MySQL: 5.7 and 8.0
      • Valid values if you set the Engine parameter to SQLServer: 2016_std_sl, 2017_std_sl, and 2019_std_sl
      • Valid values if you set the Engine parameter to PostgreSQL: 14.0, 15.0, 16.0
    Note ApsaraDB RDS for MariaDB does not support serverless instances.
    5.6
    DBInstanceStorageTypestringNo

    The storage type of the instance. Valid values:

    • local_ssd: local SSD.
    • cloud_ssd: standard SSD. This storage type is not recommended and is unavailable in some Alibaba Cloud regions.
    • cloud_essd: enhanced SSD (ESSD) of performance level 1 (PL1).
    • cloud_essd2: ESSDs of PL2.
    • cloud_essd3: ESSD of PL3.

    To change the storage type, take note of the following items:

    If the instance runs PostgreSQL, you can upgrade the storage type of the instance from standard SSD to ESSD. However, you cannot downgrade the storage type of the instance from ESSD to standard SSD. ESSDs provide the following PLs: PL1, PL2, and PL3. You can upgrade or downgrade the storage type between ESSD of PL1, ESSD of PL2, and ESSD of PL3. For more information, see Configuration items.

    local_ssd
    DirectionstringNo

    The type of change that you want to perform on the instance. Valid values:

    • Up (default): upgrades a subscription instance, or upgrades or downgrades a pay-as-you-go instance.
    • Down: downgrades a subscription instance.
    • TempUpgrade: performs auto scaling on a subscription instance that runs SQL Server. This value is required for auto scaling.
    • Serverless: modifies the auto scaling settings of a serverless instance. This value is required if you want to modify the auto scaling settings of a serverless instance.
    Note If you specify only DBInstanceStorageType, you can leave Direction empty. For example, if you want to change only the storage type of the instance from standard SSD to ESSD, you do not need to specify Direction.
    Up
    SourceBizstringNo

    A deprecated parameter. You do not need to specify this parameter.

    Specifies whether to enable the automatic suspension feature.
    DedicatedHostGroupIdstringNo

    The ID of the dedicated cluster.

    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).
    Note If 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 resource group.

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

    The ID of the order.

    3
    MaxCapacitydoubleNo

    The maximum number of RDS Capacity Units (RCUs). Valid values:

    • Serverless ApsaraDB RDS for MySQL instances: 1 to 32
    • Serverless ApsaraDB RDS for SQL Server instances: 2 to 8
    • Serverless ApsaraDB RDS for PostgreSQL instances: 1 to 14
    Note The value of this parameter must be greater than or equal to the value of MinCapacity and can be specified only to an integer.
    8
    MinCapacitydoubleNo

    The minimum number of RCUs. Valid values:

    • Serverless ApsaraDB RDS for MySQL instances: 0.5 to 32.
    • Serverless ApsaraDB RDS for SQL Server instances: 2 to 8. Only integers are supported.
    • Serverless ApsaraDB RDS for PostgreSQL instances: 0.5 to 14.
    Note The value of this parameter must be less than or equal to the value of MaxCapacity.
    0.5
    AutoPausebooleanNo

    Specifies whether to enable the automatic start and stop feature for the serverless instance. Valid values: Valid values:

    • true
    • false (default)
    Note This parameter is required only for serverless instances that run MySQL and PostgreSQL. After the automatic start and stop feature is enabled, if no connections to the instance are established within 10 minutes, the instance is suspended. After a connection to the instance is established, the instance is resumed.
    true
    SwitchForcebooleanNo

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

    • true
    • false (default)
    Note
  • This parameter is required only for serverless instances that run MySQL and PostgreSQL. If you set this parameter to true, a service interruption that lasts 30 to 120 seconds occurs during forced scaling. Process with caution.
  • The RCU scaling for a serverless instance immediately takes effect. In some cases, such as the execution of large transactions, the scaling does not immediately take effect. In this case, you can enable this feature to forcefully scale the RCUs of the instance.
  • false
    CategorystringNo

    The RDS edition of the instance. Valid values:

    • Regular instance

      • Basic: RDS Basic Edition.
      • HighAvailability: RDS High-availability Edition.
      • AlwaysOn: RDS Cluster Edition for ApsaraDB RDS for SQL Server.
      • Cluster: RDS Cluster Edition for ApsaraDB RDS for MySQL.
    • Serverless instance

      • serverless_basic: RDS Basic Edition. This edition is available only for serverless instances that run MySQL and PostgreSQL.
      • serverless_standard: RDS High-availability Edition. This edition is available only for serverless instances that run MySQL and PostgreSQL.
      • serverless_ha: RDS High-availability Edition for ApsaraDB RDS for SQL Server.

      **

      Note If you set the EngineVersion parameter to an SQL Server version number, you must also specify this parameter.

    HighAvailability
    AutoUseCouponbooleanNo

    Specifies whether to use vouchers to offset fees. Valid values:

    • true
    • false (default)
    false
    TargetMinorVersionstringNo

    The number of the minor version.

    This parameter is required only for instances that run PostgreSQL. If the minor engine version does not support changing the instance type, you must specify the minor engine version to update the minor engine version when you change the instance type.

    Format: rds_postgres_<Major engine version>00_<Minor engine version>. Example: rds_postgres_1200_20200830.

    Note For more information about minor engine versions, see Release notes for AliPG.
    rds_postgres_1200_20200830
    IoAccelerationEnabledstringNo

    A reserved parameter.

    None
    ColdDataEnabledbooleanNo

    A reserved parameter.

    true

    Response parameters

    ParameterTypeDescriptionExample
    object

    The response parameters.

    DBInstanceIdstring

    The instance ID.

    rm-uf6wjk5*******
    RequestIdstring

    The ID of the request.

    3C5CFDEE-F774-4DED-89A2-1D76EC63C575
    OrderIdlong

    The ID of the order.

    20793850608****

    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.
    400InvalidPayType.NotSupportedcurrent instance pay type not support this operation.-
    400nvalidStorageType.NotSupportcurrent storage type does not support this operation.-
    400OperationDenied.DurationLimitThe duration between two operations should be greater than specified time.-
    400AccountMoneyValidate.errorInsufficient funds available in the account.-
    400ChangeEngineVersionNotSupportedThis operation does not support modifying the engine version.You cannot modify the major engine version during this operation.
    400InvalidDBInstanceStorageTypeThe specified DBInstanceStorageType is invalid.The specified DBInstanceStorageType parameter is invalid.
    400EncryptionInstancesNotSupportCloud disk encryption instances that use byok do not support modify to multi tenant.Cloud disk encryption instances that use custom keys do not support changing configuration to general-purpose specifications.
    400Commodity.InvalidComponentThe module you purchased is not legal, please buy it again.The module you purchased is not legal, please buy it again.
    400CommodityServiceCalling.ExceptionFailed to call commodity service.Failed to call commodity service return.
    400Pay.InsufficientBalanceInsufficient available balance.Insufficient available balance.
    400Price.CommoditySysCommodity system call exception.Commodity system call exception.
    400CurrentInsHasColdDBThe current instance has cold storage db.The current instance has cold storage db.
    400CurrentInsHasColdStorageCurrent instance has cold storage.The current instance has cold storage enabled.
    400InsufficientResourceCapacityCheckThere is insufficient capacity available for the requested instance with precheck.The available capacity of the instance to be prechecked is insufficient.
    400InvalidStorageSize.DirectionThe specified parameter StorageSize does not meet the updating direction constraint requirements.The storage space does not meet the constraint requirements of the current change direction.
    400InvalidStorageType.DirectionThe specified parameter StorageType does not meet the updating direction constraint requirements.The storage type does not satisfy the change direction constraint.
    400Order.ComboInstanceNotAllowOperateA package instance is not allowed to operate independently.A package instance is not allowed to operate independently.
    400Price.PricingPlanResultNotFoundPricing plan price result not found.Pricing plan price result not found.
    400Order.NoRealNameAuthenticationYou have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication.You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication.
    400InsufficientAvailableQuotaYour account quota limit is less than 0, please recharge before trying to purchase.Your account available limit is less than 0, please recharge before trying to purchase.
    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.
    403MinorVersionNotSupportCustins minor version does not support current action.-
    403ShrinkCountReachedLimitCurrent DB shrink count reached the limit.-
    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
    2024-03-11The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2024-02-29The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2024-02-27The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2024-01-04The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      delete Error Codes: 404
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: BurstingEnabled
      Added Input Parameters: IoAccelerationEnabled
      Added Input Parameters: ColdDataEnabled
    2023-12-25The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 403 change
      delete Error Codes: 400
      delete Error Codes: 404
    2023-11-21The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2023-10-13The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2023-08-29The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2023-07-26The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      delete Error Codes: 404
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: TargetMinorVersion
    2023-07-04The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      delete Error Codes: 404
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: AutoUseCoupon
    2023-06-05The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      Error Codes 403 change
      delete Error Codes: 404
    2023-05-09The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 403 change
      delete Error Codes: 400
      delete Error Codes: 404
    2023-04-28The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2023-04-19The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 403 change
      delete Error Codes: 400
      delete Error Codes: 404
    2023-03-16The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404
    2022-12-13The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
      Added Error Codes: 404
    2022-07-05API Description Update. The Error code has changedsee changesets
    Change itemChange content
    API DescriptionAPI Description Update.
    Error CodesThe Error code has changed.
      delete Error Codes: 400
      delete Error Codes: 403
    2022-06-23The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
    2021-10-19The Error code has changed. The request parameters of the API has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: ResourceGroupId
      Added Input Parameters: UsedTime